Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Linear Programming: Interpretation of Solution & Sensitivity Analysis

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Linear Programming :

Interpretation of Solution & Sensitivity


Analysis

Debabrata Das
IIM Kashipur
Summary
 Formulate LP Model
 Solution of LP Model
1) Graphical Method: when the formulation involves only 2 variables then this
can be used.
2) Computer Method: when there are more than 2 variables it should be solved
using some analytical approaches, such as
 Simplex
 Karmarkar’s Method

There are many software available to solve a LP.

Free and Open Source Proprietary


Scilab CPLEX
JOptimizer Lingo
OpenOpt MATLAB
OptaPlanner Mathematica
Lp_solve Excel solver (200 decision variables)
2
QUIZ

3
Quiz
Par. Inc, a manufacturer of Golf Bag, has decided to move into the market for medium-
priced (i.e. standard model) and high-priced (i.e. deluxe model) golf bags. Par’s
distributor is enthusiastic about the new product line and has agreed to buy all the golf
bags Par produces over the next three months.
 After a thorough investigation of the steps involved in manufacturing a golf bag, management
determined that each golf bag produced will require the following operations:

Production Time (Hrs) Resource


Constraints
Cutting & Dyeing Standard Bag Deluxe Bag
(Hrs)
Cutting &
7/10 1
Dyeing 630
Sewing Sewing 1/2 5/6 600
Finishing 1 2/3 708
Finishing Inspection
1/4
& Packaging 1/10 135

Inspection & Packaging Profit


10 9
Contribution ($)

 How many Standard and Deluxe bags should Par. Inc produce to maximize the profit ?
 Use graphical method to solve the model.

4
Learning through Example
Par. Inc, a manufacturer of Golf Bag, has decided to move into the market for medium-
priced (i.e. standard model) and high-priced (i.e. deluxe model) golf bags. Par’s
distributor is enthusiastic about the new product line and has agreed to buy all the golf
bags Par produces over the next three months.
 After a thorough investigation of the steps involved in manufacturing a golf bag, management
determined that each golf bag produced will require the following operations:

Production Time (Hrs) Resource


Constraints
Cutting & Dyeing Standard Bag Deluxe Bag
(Hrs)
Cutting &
7/10 1
Dyeing 630
Sewing Sewing 1/2 5/6 600
Finishing 1 2/3 708
Finishing Inspection
1/4
& Packaging 1/10 135

Inspection & Packaging Profit


10 9
Contribution ($)

 How many Standard and Deluxe bags should Par. Inc produce to maximize the profit ?
 How will you solve this? We can formulate this problem as a LP model to find the optimal
solution.
5
Model Formulation
 Decision Variables
S = number of Standard bags produced.
D= number of Deluxe bags produced.
 Objective
Maximize total profit i.e. 10S  9D
 Constraints
 Hours required for all the operations should be less than the hours available.
7 S  D  630 (Cutting & Dyeing Hrs available)
10
1 S  5 D  600 (Sewing Hrs available)
2 6
S  2 D  708 (Finishing Hrs available)
3
1 S  1 D  135 (Inspection & Packaging Hrs available)
10 4
 Non-negativity Constraints
S  0, D  0

6
Model Formulation
 Complete LP model for Par. Inc – A Manufacturer of Golf Bag

Max 10S  9D (Total Profit)


Subject to 7 S  D  630 (Cutting & Dyeing Hrs available)
10
1 S  5 D  600 (Sewing Hrs available)
2 6
S  2 D  708 (Finishing Hrs available)
3
1 S  1 D  135 (Inspection & Packaging Hrs available)
10 4
S  0, D  0 (Non-negativity constraints)

Way Forward
 Solution of developed LP : How many standard and deluxe bags to produce so that
profit is maximized ????

7
Graphical Methods
Constraint #1
Cutting and Dyeing Constraint: 7 10 S  1D  630

1200

1000

800 (0, 630)


600

400
(900, 0)
200

0 200 400 600 800 1000 1200 1400


S

8
Graphical Methods
Constraint # 2
Sewing Constraint: 1 2 S  5 6 D  600

1200

1000 (0, 720)


800

600

400
(1200, 0)
200

0 200 400 600 800 1000 1200 1400


S

9
Graphical Methods
Constraint # 3
Finishing Constraint: S  2 3 D  708

D
(0, 1062)
1200

1000

800

600

400

200
(708, 0)

0 200 400 600 800 1000 1200 1400


S

10
Graphical Methods
Constraint # 4
Inspection and Packaging Constraint: 110 S  1 4 D  135

1200

1000

800 (0, 540)


600

400
(1350, 0)
200

0 200 400 600 800 1000 1200 1400


S

11
Graphical Methods
Constraint # 1, 2, 3, 4 (combined)

Feasible solution: Solution that satisfies all the


D constraints.
See how many solutions are possible?
1200 Can you enumerate all these in your head?
Cons #3 1000 Optimal solution: A feasible solution that results
in the largest possible objective function.
Cons #2 800
Can you find out the optimal solution?
Cons #1 600

Cons #4 400

200

0 200 400 600 800 1000 1200 1400


S

12
Graphical Solution

D Step 1: Graph the Objective Function


Set the objective function equal to an
600 arbitrary constant and graph it.

400

(0, 200) Profit Line


200 10S  9D  1800

(180, 0)
0 200 400 600 800
S

13
Graphical Solution

D Step 2: Move the Objective Function


Line Toward Optimality
(An iso-profit line
600
with profit=5400) Move it in the direction which
improves its value (up), since we are
maximizing, until it touches the last
400 point of the feasible region

200

(An iso-
profit line 0 200 400 600 800
S
with
profit=0)
14
Graphical Solution

D Step 3: Solve for the Extreme Point at


the Intersection of the Two Binding
Constraints
600
Optimal Solution
Solving 7/10 S+1D=630 and
1S+2/3D=708, we get S=540, D=252.
400 Hence, Maximum Profit = $7668

S=540,
D=252 An optimal
200
solution to an
LP problem can
be found at an
S extreme point
0 200 400 600 800 of the feasible
region.
15
Summary of Graphical Solution Procedure
(For Maximization Problems)
 Prepare a graph of the feasible solutions for each of the constraints.
 Determine the feasible region that satisfies all the constraints simultaneously.
 Draw an objective function line.
 Move parallel objective function lines toward larger objective function values without
entirely leaving the feasible region.
 Any feasible solution on the objective function line with the largest value is an
optimal solution.

Way Forward
 Solution of developed LP using Excel Solver.

16
Solution of LP
1. Graphical Method
 When the formulation involves only 2 variables then this can be used.

2. Computer Method
When there are more than 2 variables it should be solved using some analytical
approaches, such as
 Simplex
 Karmarkar’s Method

There are many software available to solve a LP.


Free and Open Source Proprietary
Scilab CPLEX
JOptimizer Lingo
OpenOpt MATLAB
OptaPlanner Mathematica
Lp_solve Excel solver (200 decision variables)

17
Excel Solver Solution: Example

18
Excel Solver Solution: Example

19
Excel Solver Solution: Example

20
Interpretation of Output

 First, we will discuss the following output:


– objective function value
– values of the decision variables
– slack/surplus
 Later, we will discuss sensitivity (e.g., how an optimal solution
is affected by a change in:
– a coefficient of the objective function
– the right-hand side value of a constraint

21
Example
Original LP: with inequality constraints:
Maximize 10 S  9 D
Subject to 7 S  D  630
10
1 S  5 D  600
2 6
S  2 D  708
3
1 S  1 D  135
10 4
S  0, D  0
LP in Standard Form: constraints converted into equalities with addition of slack
variables, s1, s2 , s3 and s4
Maximize 10S  9 D  0s1  0s2  0s3  0s4
Subject to 7 S  D  s1  630
10
1 S5 D s  600
2 6 2

S2 D  s3  708
3
1 S1 D  s4  135
10 4
S , D, s1 , s2 , s3 , s4  0
22
Standard Form, Slack Variables and Surplus Variables

 A linear program in which all the variables are nonnegative and all
the constraints are equalities is said to be in standard form.
 Standard form is attained by adding slack variables to "less than or
equal to" constraints, and by subtracting surplus variables from
"greater than or equal to“ constraints.
 Slack and surplus variables represent the difference between the left
and right sides of the constraints.
 Slack and surplus variables have objective function coefficients equal
to 0.

23
Excel Solver Solution: Example

Objective Function Value = 7668


Decision Variable #1 (S) = 540
Decision Variable #2 (D) = 252
Slack in Constraint #1 = 0 (= 630 - 630)
Slack in Constraint #2 = 120 (= 600 - 480)
Slack in Constraint #3 = 0 (= 708 - 708)
Slack in Constraint #4 = 18 (= 135 - 117)

Cutting and dyeing;


Sewing;
Finishing;
Inspection and Packaging

Managerial implications of Binding Constraint, Not Binding constraint and


Slack variable???
24
LP: Special Cases and Sensitivity Analysis

 Special Cases
 Alternate optimal solution
 Infeasible solution
 Unbounded solution

 Sensitivity Analysis - how an optimal solution is affected by a


change in:
 a coefficient of the objective function
 the right-hand side value of a constraint

25
Graphical Solution

Max 10S  9D
Subject to 7 S  D  630
10
D 1 S  5 D  600
2 6
S  2 D  708
600 3
Optimal Solution 1 S  1 D  135
10 4

400
S  0, D  0

S=540,
200 D=252

0 200 400 600 800


S

26
Special Case : Alternate Optimal Solution
Let us assume that the profit for the standard golf bag (S) has been
decreased to $6.30 per unit. The revised objective function becomes
6.3S+9D. What would be optimal value of S and D?

D
600

5
400
4

3
200

1 2
S
0 200 400 600 800

27
Special Case : Alternate Optimal Solution
Let us assume that the profit for the standard golf bag (S) has been
decreased to $6.30 per unit. The revised objective function becomes
6.3S+9D. What would be optimal value of S and D?

D
600

5
400
4

3
200

1 2
S
0 200 400 600 800

28
Special Case : Alternate Optimal Solution
Let us assume that the profit for the standard golf bag (S) has been
decreased to $6.30 per unit. The revised objective function becomes
6.3S+9D. What would be optimal value of S and D?

D
600

5
400
4

3
200

1 2
S
0 200 400 600 800

29
Special Case : Alternate Optimal Solution
Let us assume that the profit for the standard golf bag (S) has been
decreased to $6.30 per unit. The revised objective function becomes
6.3S+9D. What would be optimal value of S and D?

D
600

(300, 420)
5
400
4 (540, 252)

3
200

1 2
S
0 200 400 600 800

30
Special Case : Alternate Optimal Solution
Let us assume that the profit for the standard golf bag (S) has been
decreased to $6.30 per unit. The revised objective function becomes
6.3S+9D. What would be optimal value of S and D?

D
600

(300, 420)
5
400
4 (540, 252)

3
200

1 2
S
0 200 400 600 800

31
Special Case : Alternate Optimal Solution
In the graphical method, if the objective function line is parallel to a boundary
constraint in the direction of optimization, there are alternate optimal solutions, with
all points on this line segment being optimal.
Let us assume that the profit for the standard golf bag (S)
has been decreased to $6.30. The revised objective
D function becomes 6.3S+9D. Optimal solution occurs at
two extreme points: extreme point 4 i.e. (300,420) and 3
i.e. (540,252).
600
Furthermore, any point on the line connecting the two
(300, 420) optimal extreme points also provides an optimal
5 solution.
400
4 (540, 252)
A LP problem with alternative optimal
3 solutions is generally a good situation for
200 the decision maker. It means that several
combinations of the decision variables are
1 2 optimal and that the manager can select
S the most desirable optimal solution.
0 200 400 600 800

32
Special Case : Alternate Optimal Solution
While solving Linear Programming Problems, MS Excel does not consider the
presence of multiple optimal Solutions. It simply gives out one of the many optimal
solutions.
Max, z= 6.3 S + 9 D D: No of Deluxe Bags
st 7/10 S + 1 D <= 630 Cutting and Dyeing S: No of Standard Bags
1/2 S + 5/6 D <= 600 Sewing
1 S + 2/3 D <= 708 Finishing
1/10 S + 1/4 D <= 135 Inspection and Packaging
S, D >= 0

Decision S D  Names
Variables 300 420  Values
Obj function 6.3 9 5670 Z Note: Objective function becomes parallel to "cutting and dyeing" constraint

Coefficients LHS RHS


0.70 1.00 630 <= 630 Cutting and Dyeing
0.50 0.83 500 <= 600 Sewing
Constraints
1.00 0.67 580 <= 708 Finishing
0.10 0.25 135 <= 135 Inspection and Packaging
33
Special Case: Infeasibility
Suppose, management specified that at least 500 of the standard bags and at
least 360 of the deluxe bags must be manufactured. Find out the feasible region
and optimal solution (if any).

600

5
400
4

3
200

1 2
S
0 200 400 600 800

34
Special Case: Infeasibility
Suppose, management specified that at least 500 of the standard bags and at
least 360 of the deluxe bags must be manufactured. Find out the feasible region
and optimal solution (if any).

D
D>=360

600

5 S>=500
400
4

3
200

1 2
S
0 200 400 600 800

35
Special Case: Infeasibility
Suppose, management specified that at least 500 of the standard bags and at
least 360 of the deluxe bags must be manufactured. Find out the feasible region
and optimal solution (if any).

D
D>=360

600

5 S>=500
400
4

3
200

1 2
S
0 200 400 600 800

36
Special Case: Infeasibility
Suppose, management specified that at least 500 of the standard bags and at
least 360 of the deluxe bags must be manufactured. Find out the feasible region
and optimal solution (if any).

D
Points satisfying
minimum
D>=360

600
production
requirement
5 S>=500
400
4
Points satisfying
departmental 3
200 constraints on
the availability
1 of time 2
S
0 200 400 600 800

37
Special Case: Infeasibility
A LP which is overconstrained so that no point satisfies all the constraints (including
non-negativity) is said to be infeasible.

Suppose, management specified that at least


D 500 of the standard bags and at least 360 of
the deluxe bags must be manufactured.
Points satisfying
minimum There are no points that satisfy all the
D>=360

600
production constraints, hence this problem has no
requirement feasible region, and no optimal solution.

S>=500 Hence, given the resources available (i.e.,


400

Points satisfying production time for cutting and dyeing,


departmental sewing, finishing, and inspection and
constraints on packaging), it is not possible to make 500
200
the availability standard bags and 360 deluxe bags.
of time

S
0 200 400 600 800

38
Special Case: Infeasibility

39
Thank You !!!

Contact:
debabrata.das@iimkashipur.ac.in

You might also like