Lect 2 - CM
Lect 2 - CM
Programming Models
Dr Surendra Bhosale
01/02/2025 1
1 Introduction to Linear Programming
• A Linear Programming model seeks to maximize or minimize a
linear function, subject to a set of linear constraints.
01/02/2025 2
Introduction to Linear Programming
• The Importance of Linear Programming
– Many real world problems lend themselves to linear
programming modeling.
– Many real world problems can be approximated by linear
models.
– There are well-known successful applications in:
• Manufacturing
• Marketing
• Finance (investment)
• Advertising
• Agriculture
01/02/2025 3
Introduction to Linear Programming
• The Importance of Linear Programming
– There are efficient solution techniques that solve linear
programming models.
– The output generated from linear programming packages
provides useful “what if” analysis.
01/02/2025 4
Introduction to Linear Programming
• Assumptions of the linear programming model
– The parameter values are known with certainty.
– The objective function and constraints exhibit
constant returns to scale.
– There are no interactions between the decision
variables (the additivity assumption).
– The Continuity assumption: Variables can take on
any value within a given feasible range.
01/02/2025 5
Galaxy Industries Production Problem –
A Prototype Example
• Galaxy manufactures two toy doll models:
– Space Ray.
– Zapper.
• Resources are limited to
– 1000 pounds of special plastic.
– 40 hours of production time per week.
01/02/2025 6
Galaxy Industries Production Problem –
A Prototype Example
• Marketing requirement
– Total production cannot exceed 700 dozens.
– Number of dozens of Space Rays cannot exceed
number of dozens of Zappers by more than 350.
• Technological input
– Space Rays requires 2 pounds of plastic and
3 minutes of labor per dozen.
– Zappers requires 1 pound of plastic and
4 minutes of labor per dozen.
01/02/2025 7
Galaxy Industries Production Problem –A Prototype Example
01/02/2025 8
Management is seeking a production
schedule that will increase the
company’s profit.
01/02/2025 9
A linear programming model
can provide an insight and an
intelligent solution to this problem.
01/02/2025 10
Galaxy Linear Programming Model
• Decisions variables:
– X1 = Weekly production level of Space Rays (in dozens)
– X2 = Weekly production level of Zappers (in dozens).
• Objective Function:
– Weekly profit, to be maximized
01/02/2025 11
Galaxy Linear Programming Model
01/02/2025 12
3 Graphical Analysis of Linear Programming
The set of all points that satisfy all the constraints of the
model is called
a
FEASILE REGION
01/02/2025 13
Using a graphical presentation
we can represent all the constraints,
the objective function, and the three
types of feasible points.
01/02/2025 14
Graphical Analysis – the Feasible Region
X2
X1
01/02/2025 15
Graphical Analysis – the Feasible Region
X2
Infeasible
Production Feasible
Time
3X1+4X2 £ 2400 X1
500 700
01/02/2025 16
Graphical Analysis – the Feasible Region
X2
1000 The Plastic constraint
2X1+X2 £ 1000
700 Total production constraint:
X1+X2 £ 700 (redundant)
500
Infeasible
Production mix
constraint:
Production Feasible X1-X2 £ 350
Time
3X1+4X2£ 2400
X1
500 700
Interior points. Boundary points. Extreme points.
• There are three types of feasible points
01/02/2025 17
Solving Graphically for an Optimal Solution
01/02/2025 18
Search for an optimal solution
X1
01/02/2025 19
500
Summary of optimal solution
Space Rays = 320 dozen
Zappers = 360 dozen
Profit = $4360
– This solution utilizes all the plastic and all the production
hours.
40 dozens.
01/02/2025 20
Extreme points and optimal solutions
01/02/2025 21
Multiple optimal solutions
01/02/2025 22
4 Role of Sensitivity Analysis of the Optimal Solution
01/02/2025 23
Sensitivity Analysis of Objective Function Coefficients.
• Range of Optimality
– The optimal solution will remain unchanged as long as
• An objective function coefficient lies within its range of
optimality
• There are no changes in any other input parameters.
01/02/2025 24
Sensitivity Analysis of
Objective Function Coefficients.
1000 X2
M
Ma ax 4
x3
.75 X1 +
X 5X
1 +
Ma
5X 2
x8
2
X1
+5
500
X2
Max
2X + 5X
1
2
X1
01/02/2025 25
500 800
Sensitivity Analysis of
Objective Function Coefficients.
X2
1000
Ma
x8
X1
Ma
x1
500
0 X1
Ma
x3
+5
.75
X1
X2
+5
X2
01/02/2025
400 600 800 X1 26
• Reduced cost
Assuming there are no other changes to the input
parameters, the reduced cost for a variable Xj that has a
value of “0” at the optimal solution is:
– The negative of the objective coefficient increase of the
variable Xj (-DCj) necessary for the variable to be positive
in the optimal solution
– Alternatively, it is the change in the objective value per
unit increase of Xj.
• Complementary slackness
At the optimal solution, either the value of a variable is
zero, or its reduced cost is 0.
01/02/2025 27
Sensitivity Analysis of Right-Hand Side Values
01/02/2025 28
Sensitivity Analysis of Right-Hand Side Values
• Any change to the right hand side of a binding constraint
will change the optimal solution.
01/02/2025 29
Shadow Prices
01/02/2025 30
Shadow Price – graphical demonstration
The Plastic
constraint X2
When more plastic becomes available (the
plastic constraint is relaxed), the right hand
side of the plastic constraint increases.
1000
2X 1
+1
+1
x 2<
x 2<
=10
01
500
00
Shadow price =
4363.40 – 4360.00 = 3.40
Production time X1
constraint
01/02/2025 500 31
Range of Feasibility
01/02/2025 32
Range of Feasibility
The Plastic
constraint X2
1000
x 2<
constraint constraint
X1 + X2 £ 700
500
This is an infeasible solution
Production time
constraint
X1
01/02/2025
500 33
Range of Feasibility
The Plastic
constraint 2X 1 X2
1000
as the amount of plastic
x 2£
increases.
100
0
500
Production time
constraint
X1
01/02/2025
500 34
Range of Feasibility
X2
500
2X1 + 1X2 £ 1100
A new active
constraint
X1
01/02/2025
500 35
Correct interpretation of shadow prices
– Sunk costs: The shadow price is the value of an
extra unit of the resource, since the cost of the
resource is not included in the calculation of the
objective function coefficient.
01/02/2025 36
Other Post - Optimality Changes
• Addition of a constraint.
• Deletion of a constraint.
• Addition of a variable.
• Deletion of a variable.
• Changes in the left - hand side coefficients.
01/02/2025 37
5 Using Excel Solver to Find an Optimal
Solution and Analyze Results
• To see the input screen in Excel click Galaxy.xls
• Click Solver to obtain the following dialog box.
$D$7:$D$10<=$F$7:$F$10
Click on ‘Options’
and check ‘Linear
Programming’ and
‘Non-negative’.
01/02/2025 39
Using Excel Solver
• To see the input screen in Excel click Galaxy.xls
• Click Solver to obtain the following dialog box.
$D$7:$D$10<=$F$7:$F$10
01/02/2025 40
Using Excel Solver – Optimal Solution
GALAXY INDUSTRIES
Space Rays Zappers
Dozens 320 360
Total Limit
Profit 8 5 4360
Plastic 2 1 1000 <= 1000
Prod. Time 3 4 2400 <= 2400
Total 1 1 680 <= 700
Mix 1 -1 -40 <= 350
01/02/2025 41
Using Excel Solver – Optimal Solution
GALAXY INDUST RIES
Space Rays Zappers
Dozens 320 360
Total Limit
Profit 8 5 4360
Plastic 2 1 1000 <= 1000
Prod. Time 3 4 2400 <= 2400
Total 1 1 680 <= 700
Mix 1 -1 -40 <= 350
Adjustable Cells
Cell Name Original Value Final Value
$B$4 Dozens Space Rays 320 320
$C$4 Dozens Zappers 360 360
Constraints
Cell Name Cell Value Formula Status Slack
$D$7 Plastic Total 1000 $D$7<=$F$7 Binding 0
$D$8 Prod. Time Total 2400 $D$8<=$F$8 Binding 0
$D$9 Total Total 680 $D$9<=$F$9 Not Binding 20
$D$10 Mix Total -40 $D$10<=$F$10 Not Binding 390
01/02/2025 43
Using Excel Solver –Sensitivity Report
Microsoft Excel Sensitivity Report
Worksheet: [Galaxy.xls]Sheet1
Report Created:
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$4 Dozens Space Rays 320 0 8 2 4.25
$C$4 Dozens Zappers 360 0 5 5.666666667 1
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$D$7 Plastic Total 1000 3.4 1000 100 400
$D$8 Prod. Time Total 2400 0.4 2400 100 650
$D$9 Total Total 680 0 700 1E+30 20
$D$10 Mix Total -40 0 350 1E+30 390
01/02/2025 44
7 Models Without Unique Optimal Solutions
01/02/2025 45
Infeasible Model
No point, simultaneously,
lies both above line 1 and
below lines 2 and 3
2
.
3 1
01/02/2025 46
Solver – Infeasible Model
01/02/2025 47
Unbounded solution
the
Ob
Ma
xim
jec ize
Th t ive
ef Fu
ea nc
re si ti o
gio ble n
n
01/02/2025 48
Solver – Unbounded solution
01/02/2025 49
Solver – An Alternate Optimal Solution
01/02/2025 50
Solver – An Alternate Optimal Solution
• Observe that for some variable Xj the
Allowable increase = 0, or
Allowable decrease = 0.
• Add a constraint of the form:
Objective function = Current optimal value.
• If Allowable increase = 0, change the objective to
Maximize Xj
• If Allowable decrease = 0, change the objective to
Minimize Xj
01/02/2025 51
8 Cost Minimization Diet Problem
01/02/2025 52
Cost Minimization Diet Problem
• Decision variables
– X1 (X2) -- The number of two-ounce portions of
Texfoods (Calration) product used in a
serving.
• The Model
Minimize 0.60X1 + 0.50X2 Cost per 2 oz.
Subject to
20X1 + 50X2 ³ 100 Vitamin A
% Vitamin A 25X1 + 25X2 ³ 100 Vitamin D
provided per 2 oz.
50X1 + 10X2 ³ 100 Iron % required
X1, X2 ³ 0
01/02/2025 53
The Diet Problem - Graphical solution
10
The Iron constraint
Feasible Region
01/02/2025 2 4 5 54
Cost Minimization Diet Problem
,
,
01/02/2025 56