Linear Programming - Solver
Linear Programming - Solver
Solver
• Linear implies that the the variables in the objective function and
constraints are raised to the power 1 only.
Typical Applications
The profit per unit of product 1 is $ 15, and product 2 is $ 21. The maximum
quantity of product 1 that can be sold is 4 units. You will have to help this small-
scale unit decide how many units of product 1 and product 2 to produce so as to
maximize the total profit.
Graphical Method Example Cont.
Formulation
The maximum availability of raw material 1 is 18 kg. To produce x1 units of product1 and x2
units of product 2, you need 2x1 + 3x2 kg. So, 2x1 + 3x2 18 (raw material 1 availability)
Similarly we can work out the raw material availability constraint for raw material 2. And
it is x1 + x2 8 (raw material 2 availability)
Graphical Method Formulation at a glance
Subject to:
x1 4
2x1 + 3x2 18
x1 + x2 8
6
x1 = 4
1 (4, 0)
x1
1 2 3 4 5 6 7 8 9 10
Example Problem: Graphical Solution
• Constraint #2 Line Drawn
x2
8
(0, 6 )
7
6 2x1 + 3x2 = 18
5
4
3
1 (9 , 0)
x1
1 2 3 4 5 6 7 8 9 10
Example Problem:Graphical Solution
• Constraint #3 Line Drawn
x2
(0, 8)
8
7
x1 + x2 = 8
6
1 (8, 0)
x1
1 2 3 4 5 6 7 8 9 10
Example Problem: Graphical Solution
Constraint Lines and Feasibility Region Drawn in
a combined manner
x2
x1 + x2= 8
8
6 A(0,6) X1=4
4
B (4, 3 1/3)
3 Feasibility Region
2x1 + 3x2 =18
2
D(0,0) C(4,0) x1
1 2 3 4 5 6 7 8 9 10
Optimal Solution
• Shadow Price
Shadow price for raw material 2 is 0. It does not make any impact on the
objective function.
Thus shadow prices for Sale of Product 1, Raw Material 1, and Raw Material 2
are $1, $7, and $0 respectively.
The allowable increase and allowable decrease shown in the output indicates
the range for which the shadow prices will hold true.
Computer Solution
2 0.75 25 45
3 2.00 28 40
4 0.50 35 55
Portfolio Optimization Cont.
Mr. Joseph has been asked to maximize growth in $ value excluding
dividends of this portfolio of shares in the coming year. It is Wizard’s
policy to get at least $2500 as annual dividend from this portfolio of
shares. Wizard also wants to play safe by stipulating the following
conditions. Amount invested in stock 4 cannot be more than 55% of
amount invested in stock 1. Further the company requires that at least
15% of total investment be in stock 2.
4) Certainty: In linear programming, you assume all variables are known without any
doubt. Thus, you assume a deterministic or certainty scenario. But in reality, you may
have to assess carefully the magnitude of uncertainty.
Programmers Recruitment Planning
A Case Study
Decide and set up the hiring and training schedule of programmers, which will
meet the company's requirements at minimum cost
Problem Formulation for the Case
Minimize Z=47000X1+5000X2+47000X3+5000X4+47000X5+5000X6
Subject to constraints:
X1+X2 = 30(Month 1)
6X1-X3-X4 = 70(Month 2
6X1+6X3-X5-X6 = 120(Month 3)
6X1+6X3+6X5 = 170(Month 4)
X1, X2, X3, X4, X5, X6 are 0 (Non-negativity)
Spreadsheet Displaying Model
formulation for the Case
Spreadsheet Displaying Optimum Solution for the Case
Computer Solution from Solver
As you can see that the minimum cost is $1416531. The optimum values of the
decision variables are:
9-Aug-17 34