The process of optimization starts with a mathematical model of some aspect of your business - also known as a "Business Model". The business model is then extended into a "Decision Model" which includes the resources that are required for your business process (people, trucks, raw materials), the constraints to be satisfied (parts available, minimum order satisfied, geographical availability), and your objective (minimizing cost, minimizing late deliveries, maximizing profit). "Decision variables" are items whose values can be changed to find the best possible value of the objective. A mathematical optimization "solver" then combs through all possible solutions to find the best one.
The following examples are provided to help users better grasp the use case for such analyses and models
- An e-commerce company wants to minimize the time taken to complete an order - this is the objective. The constraints might include the space available in different parts of the warehouse, and the logistics of moving items from one part of the warehouse to another. The decision variables are what items to put in different areas.
- A landlord wants to optimize the performance of their elevators at different times of day. Their high-performance elevators are designed to learn traffic patterns by time of day and place themselves in the optimal positions. For example, the restaurant floors at the top of a building might be busy in the evenings, so the elevators should be positioned there - whereas a lot of people are coming into the building early in the morning, so the elevators should be at the bottom. The objective is the time that people must wait for an elevator, which must be minimized. The constraints are the number and capacity of the elevators, and the number of floors - a full elevator must empty its passengers before it can take on another load. The decision variables here are the positions at which the empty elevators wait.
- A solar panel manufacturer needs to reduce costs regularly to remain competitive. The objective here is the unit cost, which must be minimized; the constraints are the costs of running the factories, and the expense of the machines required. The decision variables might relate to the time of day to run the machines, or how long to run them for continuously.
- A marketing team tries different pricing strategies and promotions for a given product, location, and customer. The objective in this case is to maximize the revenue from sales of the product. The constraints might relate to the cost price of the product - there is no point in discounting a product so much that it becomes unprofitable to make. The decision variables relate to the selling price - not so low that it makes the product 'not viable', not so high that it becomes unattractive to purchasers.
Explanation of Terms used in Optimization
The following terms are frequently used in optimization. Variables can be integers, and optimization problems always involve constraints, and decision variables. Optimization often focuses on finding a local maximum, rather than a global one, and optimization techniques are often referred to as linear programming.
When some, or all, of the variables are integers (whole numbers) - for example, numbers of people, cities, or engineering parts - the problem can be more difficult to solve than one with no integers.
Tip: When using Solve, you may want to make use of some of the Advanced Settings that help with integer problems such as this. For more information, see Advanced Settings.
Constraints specify limits on resources, which must be followed for the solution to be valid. Decision variables are values that can be adjusted to find the best solution that satisfies the constraints.
You want to maximize profit (or revenue) for the manufacture of cake. There is a maximum amount of ingredients available, and a specified minimum number of different ingredients that need to be used to improve the flavor. In this example:
- The optimization objective is to maximize profit or revenue.
- The constraints are that a minimum amount of different ingredients must be used, but there is also a maximum amount available of each.
- The decision variable is the amount of each ingredient to use. This amount can be varied to maximize the profit (or revenue), so long as the constraints are satisfied.
Global Maximum, versus Local Maximum
While a local maximum is the best answer in a certain range of values, a global maximum is the best of all possible answers.
Finding the global maximum (over all possible values) might take too much time, or too many resources, or the maximum might not satisfy the constraints. If this happens, the local maximum is found, with all constraints satisfied.
Your business sells to people in a certain geographical area. You want to set an appropriate price, which will maximize your profit, but which your customers also find acceptable. You think that people in a different part of the country will probably be willing to pay more, so your profits might be higher there - but for a variety of reasons, you don't want to take your business there. Perhaps costs are too high, or the logistics of shipping are too difficult. Therefore, instead of seeking a global maximum for your profit (over all possible values), you are happy to find the maximum within the region where you are comfortable selling.
Linear programming (LP), also called linear optimization, seeks to achieve the best outcome (such as maximum profit or minimum cost) in a model whose requirements are represented by linear relationships.
Suppose that you have a bakery that bakes different kinds of pies, and you want to maximize profit (or revenue) for the manufacture of those pies. The cost of each pie depends on the cost of each ingredient, and the amount of each ingredient that is included in each pie. There is a maximum amount of ingredients available, and a specified minimum number of different ingredients that need to be used to improve the flavor. For example:
Apple Pie - Ingredients: Flour (225g), Butter (140g), Apples (3), Egg (1)
Let us call the cost of an apple pie CA, and let a gram of each ingredient be represented by the first letter of its name. Then we have a cost equation:
CA = 225F + 140B + 3A + E
The constraints might be a restriction on the amount of an ingredient available, for example, you might only have a limited amount of flour and butter, and a limited number of apples, so these constraints might be represented as:
F ≤ 100,000
B ≤ 100,000
A ≤ 10,000
On the other hand, while the number of eggs might be limited in the same way, you might have a constraint to use a minimum number of eggs - perhaps you have a discounted deal with a local supplier. So the constraint on eggs might take the form:
100 ≤ E ≤ 500
Note: This type of constraint would need to be modeled as two constraints in Solve:
E >= 100 and
E <= 500.
Optimization can involve finding either the maximum value (profit, for example), or minimum value (cost, for example) for a given scenario. The optimization solution might require you to set a particular price or produce a specific number of items. The solution can be constrained, depending on factors such as lack of resources, or a requirement to use a certain minimum number of items. Any solution that finds the optimal value must satisfy these constraints if it is to be usable.