Notes 4
Notes 4
Lecture 4
Optimization Modeling
Linear Programming
Satish Ukkusuri
Outline
2
Example of an optimization problem
• Your company
You are the manager of an asphalt company. Your company produces two products: B2 and
B2Plus.
• Your products
Producing a ton of B2Plus implies producing a ton of B2. When the production of B2 starts at
least 2 ton have to be produced. However, these 2 ton do not contribute to the production of
B2Plus (quality reasons). Several supplies are used to produce the asphalts. One of them is
additive x41. Although you have unlimited supply for other inputs, only 42 liters of x41 are
available in inventory. B2 requires 6 liters of x41 per ton and B2Plus requires 7 liters per ton.
The profits per ton of B2 and B2Plus are $300 and $1000 respectively. Likewise, 8 miles can be
paved with a ton of B2 and 3 miles with a ton of B2Plus.
• Demand scenario
Your company just signed a contract with the city of Imaginopolis to pave 24 miles with any
combination of B2 and B2Plus. On the other hand, you where contacted by officers of SimCity
in order to buy as much as possible of your products.
• Decision
What is the optimal combination of B2 and B2Plus that maximizes your profits?
3
How to formulate the problem as a
mathematical program?
• What do we know?
Item B2 B2Plus Constraint
Production At least 2 Made with B2 Tons of B2 has to be at least 2 + tons
tons after 2 ton B2Plus
Additive 6 liter / ton 7 liter / ton 42 liters available
Demand 8 miles / 3 miles / ton Pave at least 24 miles in
ton Imaginopolis
Profits $300 / ton $1000 / ton Maximize profits
x >2 +y
6 * x + 7 * y < 42
8 * x + 3 * y > 24
x>0
y>0
7
How to formulate the problem as a
mathematical program?
9
Using Microsoft Solver
• Open Excel
• Make sure Microsoft Solver is installed
– Go to “Data” tab
– Go to “Analysis” box
– Check if “Solver” is there
10
Using Microsoft Solver
11
Using Microsoft Solver
12
Using Microsoft Solver
13
The Excel file
14
The Excel file
Description
Numbers
Notation
15
The Excel file
Description
Expression with cells
Notation
16
The Excel file
Description
18
Solver setup
• Objective function
– In “Set target cell:” select the cell where you wrote the
objective function
• Variables
– In “By Changing Cells” select the column for the
numerical value of the variables
20
Solver setup
21
Solver Solution
22
Summary
23