GOAL solver: a hybrid local search based solver for high ...
19 –Solver - Baldwin Wallace...
Transcript of 19 –Solver - Baldwin Wallace...
19 – Solver
1
Professor Shoemaker
There is class of problems known as Product Mix problems.
Suppose you need to make two kinds of widgets and you have only so much material/time/money to make them.
How many of each widget should I make?◦ i.e. what should be the “mix” of widgets?
Excel - Professor Shoemaker
19 – Solver
2
Mix problems are an example of optimizationproblems.
That is: to find the optimal solution given the limitations you have to live with.
Excel - Professor Shoemaker
In our example the objective is to make as many widgets as possible
◦ To Maximize the number of Widgets produced
Excel - Professor Shoemaker
19 – Solver
3
Mix problems always have constraints that limit the choices you can make to solve the problem.
Excel - Professor Shoemaker
Constraints are just the facts of life…
Some Examples◦ You have only 5,000 pounds of Nickel available◦ You have only 8,000 pounds of Copper available◦ You must make at least 50 small widgets◦ You must make at least 75 large widgets
Constraints limit the objective
Excel - Professor Shoemaker
19 – Solver
4
Optimization problems always have variablesthat are adjusted in an attempt to achieve the objective.
In our example, the quantity of each type of widget will be varied in an effort to make the maximum number of widgets.
Excel - Professor Shoemaker
The three important aspects of an optimization problem:
An Objective to minimize or maximize
Constraints – that limit your choices
Variables – values that are changed in an attempt to achieve the objective
Excel - Professor Shoemaker
19 – Solver
5
17-Solver.xlsx
Excel - Professor Shoemaker
Two types of Widgets to make
Amount of metals each
Widget needs
Amount of each metal needed to make that quantity of Widgets
If we make 2 Small and 3 Large this is the total pounds of Nickel and
Copper we’ll need
Excel - Professor Shoemaker
19 – Solver
6
How many of each type we’ll
make - Variables
Total Widgets produced. The
Objective. We want to maximize this number.
Constraints
Excel - Professor Shoemaker
The Constraints limit the values in the plan at the top
Excel - Professor Shoemaker
19 – Solver
7
You must produce at least 50 small and 75 large widgets. These will have to be
at least 50 and 75 when the solution is
complete.
Excel - Professor Shoemaker
You have at most 5,000 pounds of Nickel and 8,000 pounds of Copper available
These cannot exceed 5,000 and 8,000
when the solution is complete.
Excel - Professor Shoemaker
19 – Solver
8
You can’t produce 1/3 of a widget. You have to produce them in whole number – integer amounts. These will have to be
integers when the solution is complete.
Excel - Professor Shoemaker
It’s not available by default. You may have to add it
Excel - Professor Shoemaker
19 – Solver
10
First link the Objective and Variable Cells
Try running the Solve now. What happens?
Excel - Professor Shoemaker
Adding a Constraint. Click on Add
Excel - Professor Shoemaker
19 – Solver
11
Constraint: Limit the Nickel to 5,000 pounds
Also add the constraint for Copper
Excel - Professor Shoemaker
With just the metal constraints in, try running the solver.
What happens?
Excel - Professor Shoemaker
19 – Solver
12
The Solver found a solution, but didn’t make any of the Large model widgets.
Why?
Excel - Professor Shoemaker
Add the two constraints to require some of each model of widget
Also add the Integer constraint
Excel - Professor Shoemaker
19 – Solver
13
The complete setup
Go ahead and Solve it
Then select Answer before you click on Ok
Excel - Professor Shoemaker
283 is the maximum number of widgets we can make given the constraints
The solution has us making 208 small and 75 large widgets.
Excel - Professor Shoemaker
19 – Solver
14
Whenever a solver achieves an optimal solution one or more of the constraints prevented it from going further.
In this case, one or more constraints prevented the solution from making more widgets
Two of the constraints prevented us from making any more widgets. Which ones?
Excel - Professor Shoemaker
The requirement to make at least 75 large widgets limited the total
Try changing the Minimum quantity of Large constraint from 75 to 25 and solve again. How many more widgets can you then make?
Excel - Professor Shoemaker
19 – Solver
15
The 5,000 pound limit on Nickel also prevented us from making more widgets
We used up 4,995 of the available 5,000 pounds of Nickel. With only 5 pounds left over, we couldn’t make one more of either widget.
Excel - Professor Shoemaker
When a constraint limits further optimization the constraint is called binding.
If a constraints binds but there’s still a little left over the amount left is called the slack.
The Answer Report shows the constraints
Excel - Professor Shoemaker
19 – Solver
16
The Nickel isn’t shown as binding since there was some slack,
But in fact it did bind the solution since there wasn’t enough Nickel to make one more widget
Excel - Professor Shoemaker
Your boss: How can we make more widgets? Answer: Get me more Nickel or let me make
fewer Large widgets.
How many widgets can you make if I get you a additional 1,000 pounds of Nickel? ◦ Then what binds the solution?
Excel - Professor Shoemaker
19 – Solver
17
The three important aspects of an optimization problem:
An Objective to minimize or maximize
Constraints – that limit your choices
Variables – values that are changed in an attempt to achieve the objective
Excel - Professor Shoemaker
The Solver feature lets you determine the optimal solution
It shows you which constraints limited further optimization
It lets you answer What If questions
Excel - Professor Shoemaker