Professional Documents
Culture Documents
Stochastic Processes
Topic 1-Week 1
Learning Outcome
LO1: Explain objectives and constraints based on
problem descriptions in mathematical optimization
models
VARIOUS TYPES OF LP MODELS
- Blending
- Capital budgeting
- Diet problem
- Inventory model
- Multi-period financial model
- Multi-period work scheduling
- Production process
- Graphical method for two variable LP
Linear Programming
Problem
x1 ≥0 (sign restriction)
x2 ≥0 (sign restriction)
Linear Programming
My diet requires that all the food I get come from one of the
four “basic food groups”.
At present, the following four foods are available for
consumption: brownies, chocolate ice cream, cola and
pineapple cheesecake.
Each brownie costs 50¢, each scoop of ice cream costs 20 ¢,
each bottle of cola costs 30 ¢,, and each piece of pineapple
cheesecake costs 80 ¢.
Each day, I must ingest at least 500 calories, 6 oz of
chocolate, 10 oz of sugar, and 8 oz of fat.
Diet Problem - continued
1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint
600 Infeasible
Production mix
constraint:
Production Feasible X1-X2<=450
Time
3X1+4X2<=2400
X1
600 800
We now demonstrate the search for
an optimal solution
Start at some arbitrary profit, say profit = $2,000...
X2 Then increase the profit, if possible...
1200
...and continue until it becomes infeasible
ion
eg
Profit
Profit = $=$5040
4, 000
3,
2, le R
800
ea sib
e f
l t h
600
cal
Re
X1
800 Infeasible
600
Feasible
Feasible
region
region
X1
400 600 800
X2
1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint
600
A (0,600)
Infeasible
Production mix
constraint:
Production Feasible B
(480,240) X1-X2<=450
Time C (550,100)
3X1+4X2<=2400E (0,0)
D (450,0)
X1
600 800
59
Graphical Method
2X1+X2=1200
3X1+4X2=2400 X1= 480
X2= 240
Production mix
Production constraint:
Time X1-X2<=450
3X1+4X2<=2400
2X1+X2=1200
X1-X2=450 X1= 550
X2= 100
Graphical Method
By Compensation on :
Max 8X1 + 5X2
(X1, X2) Objective fn
(0,0) 0
(450,0) 3600
(480,240) 5040
(550,100) 4900
(0,600) 3000
1200
The plastic constraint:
2X1+X2<=1200
The Plastic constraint
600
Production Infeasible
Time
Production mix
3X1+4X2
constraint:
<=2400 (200, 200) (550,100) X1-X2<=450
*
(300,0) *
X1
600 800
-Daily demand for interior paint cannot exceed that of exterior paint by more
than 1 ton
-Maximum daily demand of interior paint is 2 tons
-Reddy Mikks wants to determine the optimum product mix of interior and
exterior paints that maximizes the total daily profit
Solution
Objective:
Maximize z = 5 x1 + 4 x2
(Usage of a raw material by both paints) < (Maximum raw material
availability)
subject to
6x1 + 4x2 < 24 (raw material M1)
x1 + 2x2 < 6 (raw material M2)
x2 - x1 < 1
x2 < 2
x1 > 0
x2 > 0
1) Proportionality:
- contribution of each decision variable in both the objective
function and constraints to be directly proportional to the
value of the variable
2) Additivity:
- total contribution of all the variables in the objective function
and in the constraints to be the direct sum of the individual
contributions of each variable
Properties of the LP model:
3) Certainty:
- All the objective and constraint coefficients of the LP model are
deterministic (known constants)
- LP coefficients are average-value approximations of the probabilistic
distributions
- If standard deviations of these distributions are sufficiently small , then the
aproximation is acceptable
- Large standard deviations can be accounted for directly by using stochastic
LP algorithms or indirectly by applying sensitivity analysis to the optimum
solution
(Problem Mix Model)
77
Solution
Let x1 = number of products of type A
x2 = number of products of type B
Objective:
-Profit of Rs.4 on type A , therefore 4x1 will be the profit on selling x1
units of type A
-Profit of Rs.5 on type B, therefore 5x2 will be the profit on selling x2
units of type B
subject to
2x1 + 2x2 < 330 minutes
3x1 + 2x2 < 480 minutes
x1 > 0
x2 > 0
GRAPHICAL LP SOLUTION
80
Solution of a Maximization
model (Reddy Mikks
model)
Step 1:
1) Determination of the feasible solution space:
- Find the coordinates for all the 6 equations of the
restrictions (only take the equality sign)
1
6x1 + 4x2 < 24
2
x1 + 2x2 < 6
3
x2 - x1 < 1
4
x2 < 2
5
x1 > 0 6
x2 > 0
81
Change all equations to equality signs
6x1 + 4x2 = 24 1
x1 + 2x2 = 6 2
x2 - x1 1 =
3
x = 2
2
4
x1 = 0 5
x2 = 0 6
82
1. Plot graphs of x1 = 0 and x2 = 0
2. Plot graph of 6x1 + 4x2 = 24 by using the
coordinates of the equation
3. Plot graph of x1 + 2x2 = 6 by using the
coordinates of the equation
4. Plot graph of x2 - x1 = 1 by using the coordinates
of the equation Plot graph of x2 = 2 by using the
coordinates of the equation
83
84
Now include the inequality of all the 6 equations
Inequality divides the (x1, x2) plane into two half spaces ,
one on each side of the graphed line
Only one of these two halves satisfies the inequality
To determine the correct side , choose (0,0) as a reference
point If (0,0) coordinate satisfies the inequality, then the
side in which (0,0) coordinate lies is the feasible half-space
, otherwise the other side is
If the graph line happens to pass through the origin (0,0) ,
then any other point can be used to find the feasible half-
space
Step 2:
2) Determination of the optimum solution from
among
all the feasible points in the solution space:
-After finding out all the feasible half-spaces
of all the 6 equations, feasible space is
obtained by the line segments joining all the
corner points A, B, C,D ,E and F
- Any point within or on the boundary of the
solution space ABCDEF is feasible as it
satisfies all the constraints
- Feasible space ABCDEF consists of infinite 86
number of feasible points
- To find optimum solution identify the direction in which the maximum profit
increases , that is z = 5x1 + 4x2
- Assign random increasing values to z , z = 10 and z = 15
5x1 + 4x2 = 10
5x1 + 4x2 = 15
- Plot graphs of above two equations
- Thus in this way the optimum solution occurs at corner point C which is the
point in the solution space
- Any further increase in z that is beyond corner point C will put points
outside the boundaries of ABCDEF feasible space
- Values of x1 and x2 associated with optimum
1 corner2 point C are
determined by solving the equations and
1
6x1 + 4x2 = 24 2
x1 + 2x2 = 6
- x1 = 3 and x2 = 1.5 with z = 5 X 3 + 4 X 1.5 = 21
- So daily product mix of 3 tons of exterior paint and 1.5 tons of interior paint
produces the daily profit of $21,000 . 87
88
- Important characteristic of the optimum LP solution is that it is always
associated with a corner point of the solution space (where two lines
intersect)
- This is even true if the objective function happens to be parallel to a
constraint
- For example if the objective function is,
z = 6x + 4x
1 2 1
- The above equation is parallel to constraint of equation
- So optimum occurs at either corner point B or corner point C when
parallel
- Actually any point on the line segment BC will be an alternative
optimum
- Line segment BC is totally defined by the corner points B and C
89
- Since optimum LP solution is always associated with a corner
point of the solution space, so optimum solution can be found by
enumerating all the corner points as below:-
______Corner point ( x1 , x2 ) z_______
A (0,0) 0
B (4,0) 20
C (3,1.5) 21 (optimum solution)
D (2,2) 18
E (1,2) 13
F (0,1) 4
- Market survey indicates that during the month of April there will be a
demand of 200,000 bottles of Coca-cola , 400,000 bottles of Fanta ,
and 440,000 bottles of Thumps-up
- For how many days each plant be run in April so as to minimize the
production cost , while still meeting the market demand?
92
Solution:
Let x1 = number of days to produce all the three types of bottles
by
plant at Coimbatore
x2 = number of days to produce all the three types of bottles
by
plant at Chennai
Objective:
Minimize z = 600 x1 + 400 x2
Constraint:
15,000 x1 + 15,000 x2 > 200,000
30,000 x1 + 10,000 x2 > 400,000
20,000 x1 + 50,000 x2 > 440,000
x1 > 0
94
Corner points (x1,x2) z = 600 x1 + 400 x2
A (0, 40) 16000
B (12,4) 8800
C (22,0) 13200
In 12 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are
produced by plant at Coimbatore
In 4 days all the three types of bottles (Coca-cola, Fanta, Thumps-up) are
produced by plant at Chennai
So minimum production cost is 8800 units to meet the market demand of all
the three types of bottles (Coca-cola, Fanta, Thumps-up) to be produced in
April
95
The Graphical Solution to a
Two-Variable LP Problem
• Any LP with only two variables can be
solved graphically.
– The variables are always labeled x1 and x2
and the coordinate axes the x1 and x2 axes.
X2
X1
-1 1 2 3 4
-1
Giapetto Problem
demand constraint
z = 100
carpentry constraint
F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
Giapetto Problem
• Having identified the feasible region for the Giapetto
LP, a search can begin for the optimal solution which
will be the point in the feasible region with the largest
z-value.
• To find the optimal solution, graph a line on which the
points have the same z-value. In a max problem, such
a line is called an isoprofit line while in a min problem,
this is called the isocost line. The figure shows the
isoprofit lines for z = 60, z = 100, and z = 180
• Lindo Example
• A constraint is binding if the left-hand and right-hand side
of the constraint are equal when the optimal values of
the decision variables are substituted into the constraint.
– In the Giapetto LP, the finishing and carpentry constraints are
binding.
• A constraint is nonbinding if the left-hand side and the
right-hand side of the constraint are unequal when the
optimal values of the decision variables are substituted
into the constraint.
– In the Giapetto LP, the demand constraint for wooden soldiers
is nonbinding since at the optimal solution (x1 = 20), x1 < 40.
• A set of points S is a convex set if the line segment
jointing any two pairs of points in S is wholly contained
in S.
• For any convex set S, a point p in S is an extreme point
if each line segment that lies completely in S and
contains the point P has P as an endpoint of the line
segment.
• Extreme points are sometimes called corner points,
because if the set S is a polygon, the extreme points
will be the vertices, or corners, of the polygon.
– The feasible region for the Giapetto LP will be a convex set.
• It is possible for an LP’s feasible region to be empty,
resulting in an infeasible LP.
• Because the optimal solution to an LP is the best
point in the feasible region, an infeasible LP has no
optimal solution.
• For a max problem, an unbounded LP occurs if it is
possible to find points in the feasible region with
arbitrarily large z-values, which corresponds to a
decision maker earning arbitrarily large revenues or
profits.
• For a minimization problem, an LP is unbounded if there are
points in the feasible region with arbitrarily small z-values.
• Every LP with two variables must fall into one of the
following four cases.
– The LP has a unique optimal solution.
– The LP has alternative or multiple optimal solutions: Two or more
extreme points are optimal, and the LP will have an infinite number
of optimal solutions.
– The LP is infeasible: The feasible region contains no points.
– The LP unbounded: There are points in the feasible region with
arbitrarily large z-values (max problem) or arbitrarily small z-values
(min problem).
• Class Problem
SENSITIVITY ANALYSIS USING
GRAPHICAL METHOD
A Graphical Introduction to
Sensitivity Analysis
• Sensitivity analysis is concerned with how changes in
an LP’s parameters affect the optimal solution.
• Reconsider the Giapetto problem from Chapter 3.
max z = 3x1 + 2x2
2 x1 + x2 ≤ 100 (finishing constraint)
x1 + x2 ≤ 80 (carpentry constraint)
x1 ≤ 40 (demand constraint)
x1,x2 ≥ 0 (sign restriction)
Where:
• x1 = number of soldiers produced each week
• x2 = number of trains produced each week.
Giapeto Problem
• The optimal solution for this LP was z X2
100
finishing constraint
A Feasible Region
80
the demand constraint) as basic demand constraint
60
B Slope = -3/2
• How would changes in the problem’s
objective function coefficients or D
40
carpentry constraint
optimal solution?
20
C
10 20 40 50 60 80 X1
• Graphical analysis of the effect of a change in an
objective function value for the Giapetto LP shows:
– By inspection, we can see that making the slope of the
isoprofit line more negative than the finishing constraint
(slope = -2) will cause the optimal point to switch from
point B to point C.
– Likewise, making the slope of the isoprofit line less
negative than the carpentry constraint (slope = -1) will
cause the optimal point to switch from point B to point
A.
– Clearly, the slope of the isoprofit line must be between -
2 and -1 for the current basis to remain optimal.
• A graphical analysis can also be used to determine
whether a change in the rhs of a constraint will
make the current basis no longer optimal. For
example, let b1 = number of available finishing
hours.
• The current optimal solution (point B) is where the
carpentry and finishing constraints are binding.
• If the value of b1 is changed, then as long as where
the carpentry and finishing constraints are binding,
the optimal solution will still occur where the
carpentry and finishing constraints intersect.
X2
finishing constraint, b1 = 120
100
• In the Giapetto problem to the finishing constraint, b1 = 100
80
will be greater than 40 and will demand constraint
60
Also, if b1 < 80, x1 will be less than B
40
carpentry constraint
20
C
• The current basis remains optimal
for 80 ≤b1≤ 120, but the decision
variable values and z-value will 20 40 50 60 80 X1
change.
• It is often important to determine how a change in a constraint’s
rhs changes the LP’s optimal z-value.
• The shadow price for the ith constraint of an LP is the amount by
which the optimal z-value is improved if the rhs of the ith
constraint is increased by one.
– This definition applies only if the change in the rhs of constraint i
leaves the current basis optimal.
• For the finishing constraint, 100 + finishing hours are available.
– The LP’s optimal solution is then
x1 = 20 + and x2 = 60 – with z = 3x1 + 2x2 = 3(20 + ) + 2(60 - ) =
180 + .
– Thus, as long as the current basis remains optimal, a one-unit
increase in the number of finishing hours will increase the optimal z-
value by $1. So, the shadow price for the first (finishing hours)
constraint is $1.
Sensitivity analysis is important for several reasons:
– Values of LP parameters might change. If a parameter
changes, sensitivity analysis shows it is unnecessary to
solve the problem again.
• For example in the Giapetto problem, if the profit contribution
of a soldier changes to $3.50, sensitivity analysis shows the
current solution remains optimal.
– Uncertainty about LP parameters.
• In the Giapetto problem for example, if the weekly demand for
soldiers is at least 20, the optimal solution remains 20 soldiers
and 60 trains. Thus, even if demand for soldiers is uncertain,
the company can be fairly confident that it is still optimal to
produce 20 soldiers and 60 trains.
The Computer and
Sensitivity Analysis
• If an LP has more than two decision variables,
the range of values for a rhs (or objective
function coefficient) for which the basis remains
optimal cannot be determined graphically.
• These ranges can be computed by hand but this
is often tedious, so they are usually determined
by a packaged computer program.
• LINDO will be used and the interpretation of its
sensitivity analysis discussed.
Example 1: Winco Products 1
• Winco sells four types of products. The resources
needed to produce one unit of each are known.
Raw material 2 3 4 7
Hours of labor 3 4 5 6
Sales price $4 $6 $7 $8
s.t. x1 + x2 + x3 + x4 = 950
x4 ≥ 400
2x1 + 3x2 + 4x3 + 7x4 ≤ 4600
3x1 + 4x2 + 5x3 + 6x4 ≤ 5000
x1,x2,x3,x4 ≥ 0
Ex. 1 – Solution continued
MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
• The LINDO output. 2) X1 + X2 + X3 + X4 = 950
3) X4 >= 400
• Reduced cost is the amount 4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
NO. ITERATIONS= 4
Ex. 1 – Solution
continued
RANGES IN WHICH THE BASIS IS UNCHANGED:
output X1
COEF
4.000000
INCREASE
1.000000
DECREASE
INFINITY
• Allowable range (w/o X2 6.000000 0.666667 0.500000
change in basis). 2)
3)
0.000000
0.000000
3.000000
-2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000
NO. ITERATIONS= 4
• Shadow price signs
≤ ∞ = value of slack
≥ = value of excess ∞
• When the optimal solution is degenerate (a bfs is
degenerate if at least one basic variable in the optimal
solution equals 0), caution must be used when interpreting
the LINDO output.
• For an LP with m constraints, if the optimal LINDO output
indicates less than m variables are positive, then the optimal
solution is degenerate bfs.
MAX 6 X1 + 4 X2 + 3 X3 + 2 X4
SUBJECT TO
2) 2 X1 + 3 X2 + X3 + 2 X4 <= 400
3) X1 + X2 + 2 X3 + X4 <= 150
4) 2 X1 + X2 + X3 + 0.5 X4 <= 200
5) 3 X1 + X2 + X4 <= 250
• Since the LP has four constraints and in the optimal solution only
two variables are positive, the optimal solution is a degenerate bfs.
THE TABLEAU
ROW (BASIS) X1 X2 X3 X4 SLK 2
1 ART 0.000 0.000 0.000 1.500 0.500
2 X2 0.000 1.000 0.000 0.500 0.500
3 X3 0.000 0.000 1.000 0.167 -0.167
4 SLK 4 0.000 0.000 0.000 -0.500 0.000
5 X1 1.000 0.000 0.000 0.167 -0.167
Optimal z-Value
• In a minimization LP, the slope z c 1
of the graph of the optimal z-
200
value as a function of an
objective function coefficient
will be nonincreasing. 100
0
0 2 4 6 8 10
0 c1 10
C1
z-value
Graphical Introduction to Sensitivity
Analysis (Giapetto Problem)
100
finishing constraint
• If the isoprofit line is flatter than Slope = -2
the carpentry constraint, Point
Feasible Region
A(0,80) is optimal. A
80
• Point B(20,60) is optimal if the demand constraint
isoprofit line is steeper than the
carpentry constraint but flatter Isoprofit line z = 120
60
than the finishing constraint. B Slope = -3/2
• Finally, Point C(40,20) is optimal if
the slope of the isoprofit line is D
steeper than the slope of the
40
carpentry constraint
finishing constraint. Slope = -1
20 40 50 60 80 X1
• A graphical analysis can also be used to
determine whether a change in the rhs of a
constraint will make the basis no longer
optimal.
cj
• Let be the ccoefficient
c Bof1xj,
a then
c it can be shown
j BV j j
that
and
Right-hand side of optimal tableau’s row 0=cBVB-1b
• Coefficient of slack variable si in optimal row 0
= ith element of cBVB-1
• Coefficient of excess variable ei in optimal row 0
= -(ith element of cBVB-1)
• Coefficient of artificial variable ai in optimal row
0 = (ith element of cBVB-1) + M (max problem)
• Right-hand side of optimal row 0 = cBVB-1b
Sensitivity Analysis