Decision Modelling
Decision Modelling
Decision Modelling
(ENEC531)
By Dr Gemechu Mulatu
Haramaya University
College of Business and economics
Department of Economics
E-mail: mulatugemech02@gmail.com
Course Description
•Quantitative approach is one of scientific methods in making business decisions. In this
method, such mathematics formulas, models, or heuristic/algorithm are used in
determining decision variables we want to solve.
•Quantitative approach presumably disregards emotional/ psychological content that may
affect decision maker in formulating problems, finding most fitted alternatives, gathering
appropriate/ relevant data, testing the result and in applying the decision. However, this
course will introduce some decision theory models that in some extents will quantify
psychological effect on the rationale of a decision.
•The models, formulas, and algorithms will not be used in operations research/ strategy
but also will be useful in making a good and rational decision in the area of economic
science like energy economics.
Course Objective.
•After completing this course, student is expected to be
able to demonstrate their ability in exposing, identifying
and analysing business problems, selecting appropriate
models, computing/ processing data into the model,
testing/ verifying the result, and translating the result
into energy business strategy.
•Students will be introduced to some computer
programs and therefore student is also expected
familiar with the soft wares.
Contents to be covered
•Introduction to decision Modeling
•Post-optimality analysis
•Dynamic optimization
Chapter 1:
Introduction to Decision Modeling
What is Decision Modeling?
1. A list of alternatives.
5. A decision criterion.
Types of Decision Models
• Deterministic Models
Where all the input data value are known
with complete certainty
• Probabilistic Models
Where some input data values are uncertain
Quantitative vs. Qualitative Data
The modeling process begins with data
• Quantitative Data
• Qualitative Data
2. Solution
• Beginning assumptions
• Solution outdated
Possible Problems in Developing Decision
Models
Developing a Model
• Fitting the textbook models
• Understanding the model
• Validity of data
Possible Problems in Developing Decision
Models CTD..
Developing a Solution
• Hard to understand mathematics
Implementation
Chapter two: Introduction to Linear
Programming
19
What is LP?
The word linear means the relationship which can be
represented by a straight line .i.e the relation is of the
form
ax +by=c
In other words it is used to describe the relationship
between two or more variables which are proportional
to each other.
The word “programming” is concerned with the optimal
allocation of limited resources.
20
Definitions of LP
23
• The maximization or minimization of some
quantity is the objective in LP problems.
• All LP problems have constraints that limit the
degree to which the objective can be pursued.
• A feasible solution satisfies all the constraints.
• An optimal solution is a feasible solution that
results in the largest possible objective function
value when maximizing (or smallest when
minimizing).
24
Linear Programming - LP
• A function f (x1, x2, …, xn) is a linear function iff for
some set of constants c1, c2, …, cn, f(x1, x2, …, xn) = c1x1 +
c2x2 + … + cnxn
• For any linear function f (x1, x2, …, xn) and any number
b, the inequalities f (x1, x2, …, xn) b and f (x1, x2, …, xn)
b are linear inequalities
• Solving the problem means finding the values of the
decision variables that:
• satisfy the constraints
• optimize the objective function
25
• The objective function: The objective (goal) of each LPP is
expressed in terms of decision variables to optimize the
criterion of optimality (also called measure of performance)
such as profit, cost ,revenue etc..
• In its general form, it is represented as :
• Optimize (Max/ Min) Z = C1x1 + C2x2 + …….Cnxn
– where Z is the measure of performance variable, which is a
function of x1, x2,…..xn.
– Quantities c1,c2….cn are parameters that represent the
contribution of unit of respective variables.
26
• Decision variables: We need to evaluate various alternatives
(course of action) for arriving at the optimal value of objective
function. The evaluation of these alternatives is guided by the
nature of objective function and availability of resource. For this
we presume certain activities (decision variables) usually
denoted by x1,x2….xn.
27
• The constraints: There are always certain limitations (or
constraints ) on the use of resources e.g. labour, m/c, raw
material, money etc.. that limit the degree to which an
objective can be achieved.
• Such constraints must be expressed as linear equalities or
inequalities in terms of decision variables.
– The solution of LP model must satisfy these constraints.
28
LP Assumptions
• When we use LP as an approximate representation of a real-life
situation, the following assumptions are inherent:
1. Proportionality. - The contribution of each decision variable to the objective or
constraint is directly proportional to the value of the decision variable.
2. Additivity. - The contribution to the objective function or constraint for any variable is
independent of the values of the other decision variables, and the terms can be added
together sensibly.
3. Divisibility. - The decision variables are continuous and thus can take on fractional
values.
33
Guidelines for Model Formulation
Understand the problem thoroughly.
Describe the objective.
Describe each constraint.
Define the decision variables.
Write the objective in terms of the decision
variables.
Write the constraints in terms of the decision
variables.
34
Example. A Nutrition Aid Problem
A Nutrition Aid Program is considering two food
supplements S1 and S2 for distribution among a
population deficient in nutrients N1, N2, and N3. The
nutritional content and prices of the food supplements
and the minimum daily nutritional requirements per
person are given in Table 3.1
For example, each unit of S1 provides 4 units of N1, 8
units of N2, 5 units of N3, and costs 6 pesos.
The problem is to determine the daily quantities of the
food supplements for each person that meet the
minimum daily requirements and entail the least cost.
35
Table 3.1. Dietary and Price Data
S1 S2 Minimum Daily
(Per Unit) (Per Unit) Requirement
(Per Person)
N1 4 12 96
N2 8 4 112
N3 5 5 100
Price P6 P4
36
To formulate this problem mathematically, let x i (i = 1,2)
denote the quantity of Si (i = 1,2) needed per person per day.
The cost C (assuming no discounts) is given by
C = 6x1 + 4x 2 .
To satisfy the.minimum.daily requirements, we must have
4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100.
Finally, the quantities x i must not be negative, i.e.,
x1 >0, x 2 0.
The problem is expressed formally as follows:
Minimize 6x1 + 4x 2
subject to 4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100
and x1 >0, x 2 0.
37
Example. A Product Mix Problem
A firm produces two different products P1 and P2. Every unit of P1 uses 3
units of resource 1 (R1) and 1 unit of resource 2 (R2) and earns a profit of
5 pesos. The firm wants to determine how many of the two products
must be manufactured each week in order to maximize profit subject
only to resource availability.
39
Methods of Solving Linear
Programming Problems (LPP)
There are Two important methods of solving L.P.P. They are:
40
chapter 3: Linear Programming:
Graphical Solutions
41
Example 1: A Maximization Problem
LP Formulation
6 x1 < 6
5
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
43
Constraint #2 Graphed
x2
8
(0, 6 1/3)
7
2 (9 1/2, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
44
Example 1: Graphical Solution
Constraint #3 Graphed
x2
(0, 8)
8
7
x1 + x2 < 8
6
1
(8, 0)
x1
1 2 3 4 5 6 7 8 9 10
45
Example 1: Graphical Solution
Combined-Constraint Graph
x2
x1 + x2 < 8
8
6 x1 < 6
5
3
2x1 + 3x2 < 19
2
x1
1 2 3 4 5 6 7 8 9 10
46
Example 1: Graphical Solution
x2
Feasible Solution Region
8
3
Feasible
2
Region
1
x1
1 2 3 4 5 6 7 8 9 10
47
Example 1: Graphical Solution
x2
Objective Function Line
8
7
(0, 5)
6 Objective Function
5 5x11 + 7x22 = 35
4
2
(7, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
48
Example 1: Graphical Solution
x2
Optimal Solution
Objective Function
8
5x11 + 7x22 = 46
7
6
Optimal Solution
(x11 = 5, x22 = 3)
5
x1
1 2 3 4 5 6 7 8 9 10
49
Extreme Points and the Optimal Solution
The corners or vertices of the feasible region are
referred to as the extreme points.
An optimal solution to an LP problem can be found
at an extreme point of the feasible region.
When looking for the optimal solution, you do not
have to evaluate all feasible solution points.
You have to consider only the extreme points of
the feasible region.
50
Summary of the Graphical Solution Procedure
for Maximization Problems
51
Slack and Surplus Variables
A linear program in which all the variables are non-
negative 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.
52
Example 1: Graphical Solution
Point Z
x2
The Five Extreme Points (0,0) 0
8
(6,0) 30
7
5 (6,2) 44
6
(5,3) 46
5
(0,19/3) 44.33
4
3
4
2 Feasible 3
1
Region
1 2
1 2 3 4 5 6 7 8 9 10
x1
53
A Maximization Problem
Optimal Solution
Point Z
x2
(0,0) 0
8
(6,0) 30
7
(6,2) 44
6
Optimal
Optimal Solution
Solution (5,3) 46
5
(0,19/3) 44.33
4
x1
1 2 3 4 5 6 7 8 9 10
54
Extreme Points and the Optimal Solution
The corners or vertices of the feasible region
are referred to as the extreme points.
An optimal solution to an LP problem can be
found at an extreme point of the feasible
region.
When looking for the optimal solution, you do
not have to evaluate all feasible solution points.
You have to consider only the extreme points of
the feasible region.
55
Feasible Region
The feasible region for a two-variable linear
programming problem can be nonexistent, a single
point, a line, a polygon, or an unbounded area.
Any linear program falls in one of three categories:
– is infeasible
– has a unique optimal solution or alternate optimal solutions
– has an objective function that can be increased without
bound
A feasible region may be unbounded and yet there may
be optimal solutions. This is common in minimization
problems and is possible in maximization problems.
56
Special Cases
Alternative Optimal Solutions
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.
Infeasibility
A linear program which is overconstrained so that no
point satisfies all the constraints is said to be
infeasible.
Unbounded
For a max (min) problem, an unbounded LP occurs in it is
possible to find points in the feasible region with
arbitrarily large (small) Z
57
Example with Multiple Optimal Solutions
x2
z1 z2 z3
Maximize z = 3x1 – x2
4
58
Example: Infeasible Problem
Solve graphically for the optimal solution:
59
Example: Infeasible Problem
There are no points that satisfy both constraints, hence this
problem has no feasible region, and no optimal solution.
x2
8 2x1 + x2 > 8
x1
3 4
60
Example: Unbounded Problem
Solve graphically for the optimal solution:
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
61
Example 2: A Minimization Problem
LP Formulation
33
2x11 + 5x22 > 10
22
11
x11
11 22 33 44 55 66
64
Example 2: Graphical Solution
Graph the Objective Function
Set the objective function equal to an arbitrary
constant (say 20) and graph it. For 5x1 + 2x2 = 20,
when x1 = 0, then x2 = 10; when x2= 0, then x1 = 4.
Connect (4,0) and (0,10).
Move the Objective Function Line Toward Optimality
Move it in the direction which lowers its value
(down), since we are minimizing, until it touches the
last point of the feasible region, determined by the
last two constraints.
65
Example 2: Graphical Solution
Objective
x22 Function Graphed Min z = 5x11 + 2x22
3
2x11 + 5x22 > 10
2
1
x11
1 2 3 4 5 6
66
Example 2: Graphical Solution
Solve for the Extreme Point at the Intersection of
the Two Binding Constraints
4x1 - x2 = 12
x1+ x2 = 4
Adding these two equations gives:
5x1 = 16 or x1 = 16/5.
Substituting this into x1 + x2 = 4 gives: x2 = 4/5
67
Example 2: Graphical Solution
Solve for the Optimal Value of the Objective
Function
Solve for z = 5x1 + 2x2 = 5(16/5) + 2(4/5) = 88/5.
Thus the optimal solution is
x1 = 16/5; x2 = 4/5; z = 88/5
68
Example 2: Graphical Solution
Optimal Solution
x22 Min z = 5x11 + 2x22
72
Example: Infeasible Problem
There are no points that satisfy both constraints,
hence this problem has no feasible region, and no
optimal solution.
x2
8 2x1 + x2 > 8
x1
3 4
73
Example: Unbounded Problem
Solve graphically for the optimal solution:
74
Example: Unbounded Problem
The feasible region is unbounded and the
objective function line can be moved parallel to
itself without bound
x2 so that z can be increased
infinitely. 3x + x > 8
1 2
8
Max 3x1 + 4x2
5
x1 + x2 > 5
x1
2.67 5
75
Unit 4:
Linear Programming:
the Simplex Method
76
The most frequently used method to solve LP problems is the
Simplex Method. Before going into the method, we must get
familiarized with some important terminologies :
Standard Form- A linear program in which all the constraints are
written as equalities.
Slack Variable- A variable added to the LHS of “Less than or equal
to” constraint to convert it into an equality.
Surplus Variable- A variable subtracted from the LHS of
“More than or equal to” constraint to convert it into an equality.
Basic Solution- For a system of m linear equations in n variables
(n>m),a solution obtained by setting (n-m) variables equal to zero
and solving the system of equations for
remaining m variables.
Basic Feasible Solution(BFS)- If all the variables in basic solution
are more than or equal to zero.
77
Optimum Solution- Any BFS which optimizes(maximizes or
minimizes) the objective function.
Tableau Form- When a LPP is written in a tabular form prior to
setting up the Initial Simplex Tableau.
Simplex Tableau- A table which is used to keep track of the
calculations made at each iteration when the simplex method is
employed.
Net EvaluationRow(Cj-Zj )- The row containing net profit or loss.
The numbers in this row are also known as shadow prices.
Pivotal Column- The column having largest positive(or negative)
value in the Net Evaluation Row for a maximization(or
minimization) problem.
Pivotal Row- The row corresponding to variable that will leave
the table in order to make room for another variable.
Pivotal Element- Element at the intersection of pivotal row and
pivotal column.
78
Simplex: a linear-programming algorithm that can solve
if no if yes stop
Steps:
1. Initialization:
≥ + slack (s)
= + Artificial (A)
Simplex method in tabular form
A bm
Z Objective function coefficient Z value
In different signs
Simplex method in tabular form
3. Iteration
Solution
Initialization
1. Standard form
Maximize Z,
Subject to Sometimes it is called the
augmented form of the
Z - 3X1- 5X2 =0
problem because the
original form has been
X1 + S1 = 4 augmented by some
supplementary variables
2 X2 + S2 = 12
needed to apply the
3X1 +2X2 + S3 = 18 simplex method
X1 , X2, S1, S2, S3 0
Definitions
A basic solution is an augmented corner point solution.
A basic solution has the following properties:
1. Each variable is designated as either a nonbasic variable
or a basic variable.
2. The number of basic variables equals the number of
functional constraints. Therefore, the number of nonbasic
variables equals the total number of variables minus the
number of functional constraints.
3. The nonbasic variables are set equal to zero.
4. The values of the basic variables are obtained as
simultaneous solution of the system of equations
(functional constraints in augmented form). The set of
basic variables are called “basis”
5. If the basic variables satisfy the nonnegativity constraints,
the basic solution is a Basic Feasible (BF) solution.
Initial tableau
Entering
2. Initial tableau variable
Basic X1 X2 S1 S2 S3 RHS
variable
S1 1 0 1 0 0 4
S2 0 2 0 1 0 12
S3 3 2 0 0 1 18
Z -3 -5 0 0 0 0
Notes:
1 0 1 0 0 4
-
0 (0 1 0 1/2 0 6)
1 0 1 0 0 4
For S3
3 2 0 0 1 18
-
2 (0 1 0 1/2 0 6)
3 0 0 -1 1 6
for Z
-3 -5 0 0 0 0
- Substitute this
-5(0 1 0 1/2 0 6)
-3 0 0 5/2 0 30
values in the table
Iteration
This solution is not optimal, since there is a negative numbers in the last row
Basic X1 X2 S1 S2 S3 RHS
variable
S1 1 0 1 0 0 4
X2 0 1 0 1/2 0 6
S3 3 0 0 -1 1 6
Z -3 0 0 5/2 0 30
Basic X1 X2 S1 S2 S3 RHS
variable
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 1/2 0 6
X1 1 0 0 -1/3 1/3 2
Z 0 0 0 3/2 1 36
This solution is optimal; since there is no negative solution in the
last row: basic variables are X1 = 2, X2 = 6 and S1 = 2; the nonbasic
variables are S2 = S3 = 0
Z = 36
The Simplex Method (3)
Example: Product Mix Problem
The N. Dustrious Company produces two products: I and II. The raw material
requirements, space needed for storage, production rates, and selling prices for
these products are given below:
The total amount of raw material available per day for both products is 15751b.
The total storage space for all products is 1500 ft2, and a maximum of 7 hours
per day can be used for production. The company wants to determine how
many units of each product to produce per day to maximize its total
income.
The Simplex Method (4)
Solution
Step 1: Convert all the inequality constraints into equalities by the
use of slack variables. Let:
…..Eq (4)
The Simplex Method (5)
Introducing these slack variables into the inequality constraints and
rewriting the objective function such that all variables are on the left-
hand side of the equation. Equation 4 can be expressed as:
…..Eq (5)
The Simplex Method (6)
Since the coefficients of x1 and x2 in Eq. (A1) are both negative, the
value of Z can be increased by giving either x1 or x2 some positive
value in the solution.
In Eq. (B1), if x2 = S1 = 0, then x1 = 1500/4 = 375. That is, there is only
sufficient storage space to produce 375 units at product I.
From Eq. (C1), there is only sufficient raw materials to produce 1575/5
= 315 units of product I.
From Eq. (D1), there is only sufficient time to produce 420/1 = 420
units of product I.
Therefore, considering all three constraints, there is sufficient resource
to produce only 315 units of x1. Thus the maximum value of x1 is
limited by Eq. (C1).
The Simplex Method (7)
…..Eq (6)
Substituting this equation into Eq. (5) yields the following new formulation
of the model.
…..Eq (7)
The Simplex Method (8)
It is now obvious from these equations that the
new feasible solution is:
…..Eq (9)
From these equations, the new feasible solution is readily found to be: x1
= 270, x2 = 75, S1 = 45, S2 = 0, S3 = 0, Z = 4335.
The Simplex Method (11)
…..Eq (5)
In any
iteration, a
variable that
has a nonzero
value in the
solution is
called a basic
variable.
Simplex Tableau for Maximization (2)
Step II: . Identify the variable that will be assigned a nonzero value in
the next iteration so as to increase the value of the objective function.
This variable is called the entering variable.
It is that nonbasic variable which is associated with the smallest
negative coefficient in the objective function.
If two or more nonbasic variables are tied with the smallest
coefficients, select one of these arbitrarily and continue.
Step III: Identify the variable, called the leaving variable, which will be
changed from a nonzero to a zero value in the next solution.
Simplex Tableau for Maximization (3)
Step IV: . Enter the basic variables for the second tableau. The row
sequence of the previous tableau should be maintained, with the
leaving variable being replaced by the entering variable.
Simplex Tableau for Maximization (4)
Step V: Compute the coefficients for the second tableau. A sequence
of operations will be performed so that at the end the x1 column in the
second tableau will have the following coefficients:
Step VI: Check for optimality. The second feasible solution is also not
optimal, because the objective function (row A2) contains a negative
coefficient. Another iteration beginning with step 2 is necessary.
In the third tableau (next slide), all the coefficients in the objective
function (row A3) are positive. Thus an optimal solution has been
reached and it is as follows:
Solution
Step 1: standard form
Min Z,
s.t.
Z – 2 X1 – 3 X2 - M A1 -M A2 =0
½ X1 + ¼ X2 + S1 =4
X1 + 3X2 - S 2 + A1 = 20
X1 + X2 + A 2 = 10
X1, X2 ,S1, S2, A1, A2 0
Where: M is a very large number
Big M method
Notes
M, a very large number, is used to ensure that the values of A1 and A2, …, and An will
be zero in the final (optimal) tableau as follows:
1. If the objective function is Minimization, then A1, A2, …, and An must be added to
the RHS of the objective function multiplied by a very large number (M).
Example: if the objective function is Min Z = X1+2X2, then the obj. function should be
Min Z = X1 + X2+ MA1 + MA2+ …+ MAn
OR
Z – X1 - X2- MA1 - MA2- …- MAn = 0
2. If the objective function is Maximization, then A1, A2, …, and An must be subtracted
from the RHS of the objective function multiplied by a very large number (M).
Example: if the objective function is Max Z = X1+2X2, then the obj. function should be
Max Z = X1 + X2- MA1 - MA2- …- MAn
OR
Z - X1 - X2+ MA1 + MA2+ …+ MAn = 0
N.B.: When the Z is transformed to a zero equation, the signs are changed
Big M method
Basic X1 X2 S1 S2 A1 A2 RHS
variables
2 3 0 0 M M
S1 ½ ¼ 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z -2 -3 0 0 -M -M 0
Note that one of the simplex rules is violated, which is the basic variables A1, and A2
have a non zero value in the z row; therefore, this violation must be corrected before
proceeding in the simplex algorithm as follows.
Big M method
It becomes zero
Big M method
S1 1/2 1/4 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z 2M-2 4M-3 0 -M 0 0 30M
• Since there is a positive value in the last row, this solution is not optimal
• The entering variable is X2 (it has the most positive value in the last row)
• The leaving variable is A1 (it has the smallest ratio)
Big M method
First iteration
Basic X1 X2 S1 S2 A1 A2 RHS
variables
2 3 0 0 M M
• Since there is a positive value in the last row, this solution is not optimal
• The entering variable is X1 (it has the most positive value in the last row)
• The leaving variable is A2 (it has the smallest ratio)
Big M method
Second iteration
Basic X1 X2 S1 S2 A1 A2 RHS
variables
S1 0 0 1 -1/8 1/8 -5/8 1/4
This solution is optimal, since there is no positive value in the last row. The optimal
solution is:
X1 = 5, X2 = 5, S1 = ¼
A1 = A2 = 0 and Z = 25
Note for the Big M method
Max 16x1+15x2+20x3-18x4
ST
2x1 + x2 + 3x3 ≤ 3000 [1]
3x1 + 4x2 + 5x3 – 60x4 ≤ 2400 [2]
x4 ≤ 32 [3]
X2 ≥ 200 [4]
X1 + x2 + x3 ≥ 800 [5]
X1 – x2 –x3 =0 [6]
Xj ≥ 0 for all J
126
Simplex method when some constraints
are not “≤” constraints (cont.)
Example:
We assign a very large negative
Max 16x1+15x2+20x3-18x4 objective function coefficient , -M ,
( +M for minimization problem) to
ST each artificial variable
2x1 + x2 + 3x3 ≤ 3000 [1]
3x1 + 4x2 + 5x3 – 60x4 ≤ 2400 [2]
x4 ≤ 32 [3]
X2 ≥ 200 [4] We add artificial :
X1 + x2 + x3 ≥ 800 [5] R4, R5, R6, respectively
X1 – x2 –x3 =0 [6] to the fourth, fifth, and
Xj ≥ 0 for all J sixth equations.
127
Simplex method when some constraints
are not “≤” constraints (cont.)
The solution
Max 16x1+15x2+20x3-18x4
–MR4 –MR5 –MR6
ST
2x1 + x2 + 3x3 + s1= 3000 [1]
3x1 + 4x2 + 5x3 – 60x4 + s2 = 2400 [2]
x4 + s3 = 32 [3]
X2 – s4 + R4 = 200 [4]
X1 + x2 + x3 – s5 + R5 = 800 [5]
X1 – x2 –x3 + R6= 0 [6]
Xj ≥ 0 , Sj ≥ 0, Rj ≥ 0 for all J
The simplex algorithm can then be used to solve this problem
128
Solving For the optimal solution of [Maximization]
when there are artificial variables
Example # 1:
129
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
The Solution
• By adding the appropriate slack, surplus, and artificial
variables, we obtain the following:
X1,x2,s1,s2,R1,R3 ≥ 0
130
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
R1, S2, R3 are
S2 1 4 0 1 0 0 32 basic
variables.
R3 3 2 0 0 0 1 24
Z -2 -5 0 0 +M +M 0
• Make z consistent; (R1, R3) in z-row coefficient (+M,+M) it must be zero; By apply:
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
S2 1 4 0 1 0 0 32
R3 3 2 0 0 0 1 24
Z -2-4M -5-2M +M 0 -M -M -28M
132
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
• To determine Entering Variable; We should look to the largest negative
number in z-row.
Entering Variable
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
S2 1 4 0 1 0 0 32
R3 3 2 0 0 0 1 24
Z -2-4M -5-2M +M 0 -M -M -28M
133
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
135
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
• Second iteration
136
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
• Third iteration
137
Solving For the optimal solution of [Maximization] when
there are artificial variables (cont.)
138
Solving For the optimal solution of [Minimization]
when there are artificial variables
Example # 2:
Min 4x1 + x2
ST
3x1+ x2 = 3
4x1 + 3x2 ≥ 6
X1+ 2x2 ≤ 4
X1, x2 ≥ 0
139
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
The Solution
• By adding the appropriate slack, surplus, and artificial
variables, we obtain the following:
140
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• The initial table:
Basis X1 X2 S1 R1 R2 S2 RHS
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
S2 1 2 0 0 0 1 4
Z -4 -1 0 -M -M 0 0
141
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• Starting table: Leaving Variable
Entering Variable
Basis X1 X2 S1 R1 R2 S2 RHS
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
S2 1 2 0 0 0 1 4
Z -4+7M -1+4M -M 0 0 0 9M
142
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• First iteration
Leaving Variable
Entering Variable
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 1/3 0 1/3 0 0 1
R2 0 5/3 -1 -4/3 1 0 2
S2 0 5/3 0 -1/3 0 1 3
Z 0 (1+5M)/3 -M (4-7M)/3 0 0 4+2M
143
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• Second iteration
Entering Variable
Leaving Variable
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 0 1/5 3/5 -1/5 0 3/5
X2 0 1 -3/5 -4/5 3/5 0 6/5
S2 0 0 1 1 -1 1 1
Z 0 0 1/5 8/5 - M -1/5 -M 0 18/5
144
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• Third iteration
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 0 0 2/5 0 -1/5 2/5
X2 0 1 0 -1/5 0 3/5 9/5
s1 0 0 1 1 -1 1 1
Z 0 0 0 7/5 – M -M -1/5 17/5
145
Simplex Algorithm – Special cases
(review)
• There are four special cases arise in the use of the
simplex method.
1. Degeneracy
2. Alternative optima
3. Unbounded solution
4. Nonexisting ( infeasible ) solution
146
Simplex Algorithm – Special cases (cont.)
1. Degeneracy ( no improve in objective)
148
Simplex Algorithm – Special cases (cont.)
The solution:
• The constraints:
X1 + 4x2 + s1= 8
X1 + 2x2 + s2= 4
X1, x2 ,s1,s2≥ 0
149
Simplex Algorithm – Special cases (cont.)
Basis X1 X2 S1 S2 RHS
s1 1 4 1 0 8
s2 1 2 0 1 4
Z -3 -9 0 0 0
150
Simplex Algorithm – Special cases (cont.)
Basis X1 X2 S1 S2 RHS
X2 1/4 1 1/4 0 2
s2 ½ 0 -1/2 1 0
Z -3/4 0 2/4 0 18
151
Simplex Algorithm – Special cases (cont.)
Basis X1 X2 S1 S2 RHS
X2 0 1 ½ -1/2 2
X1 1 0 -1 2 0
Z 0 0 3/2 3/2 18
153
Simplex Algorithm – Special cases (cont.)
Example:
154
Simplex Algorithm – Special cases (cont.)
The solution
155
Simplex Algorithm – Special cases (cont.)
Basis X1 X2 S1 S2 RHS
s1 1 2 1 0 4
s2 1 1 0 1 5
Z -2 -4 0 0 0
156
Simplex Algorithm – Special cases (cont.)
• Optimal solution is 10 when x2=5/2, x1=0.
Basis X1 X2 S1 S2 RHS
x2 1/2 1 1/2 0 5/2
s2 1/2 0 -1/2 1 3/2
Z 0 0 2 0 10
Basis X1 X2 S1 S2 RHS
x2 1/2 1 1/2 0 5/2
s2 1/2 0 -1/2 1 3/2
Z 0 0 2 0 10
• The coefficient for x1 is 0, which indicates that x1 can
enter the basic solution without changing the value of
z.
158
Simplex Algorithm – Special cases (cont.)
• The second alternative optima is:
Basis X1 X2 S1 S2 RHS
x2 0 1 1 -1 1
x1 1 0 -1 2 3
Z 0 0 2 0 10
159
Simplex Algorithm – Special cases (cont.)
3. Unbounded solution
160
Simplex Algorithm – Special cases (cont.)
Example
Max 2x1+ x2
ST
X1 – x2 ≤10
2x1 ≤ 40
X1, x2≥0
161
Simplex Algorithm – Special cases (cont.)
The solution
Max 2x1+ x2
ST
X1 – x2 +s1= 10
2x1 +s2= 40
X1, x2,s1,s2≥0
162
Simplex Algorithm – Special cases (cont.)
Basis X1 X2 S1 S2 RHS
x2 1 -1 1 0 10
x1 2 0 0 1 40
Z -2 -1 0 0 0
163
Simplex Algorithm – Special cases (cont.)
4. Infeasible solution
• R coefficient at end ≠ 0
• This situation can never occur if all the
constraints are of the type “≤” with
nonnegative RHS
164
Unit 6: Post-optimality analysis
165
Usefulness of Sensitivity Analysis
166
Usefulness of Sensitivity Analysis (cont.)
167
Approaches to Sensitivity Analysis
168
Sensitivity Analysis Areas
169
Blue Ridge Hot Tubs
171
Changing the Slope of the Obj. Fn.
(change in Obj. Fn. coefficients)
X2
orig MAX Z = 350X1 + 300X2
250
new MAX Z = 350X1 + 360X2
original Z, slope = -350/300
200
new optimal solution
(80, 120, Z =71,200)
150
original optimal solution
100 (80, 120) (122, 78, Z=66,100)
0
0 50 100 150 200 250 X1
172
Recall the Feasible Region
X2
(0, 261)
boundary line of pump constraint
250
X1 + X2 = 200, slope is -1
(0, 200)
200 boundary line of labor constraint
(0, 180) 9X1 + 6X2 = 1566, slope is -3/2
150
boundary line of tubing constraint
12X1 + 16X2 = 2880, slope is -3/4
100 (80, 120)
50 (122, 78)
0
0 50 100 150 200 250 X1
(174, 0) (200, 0) (240, 0)173
Changes in Objective Function
Coefficients
174
Sensitivity of Objective Function Coefficients
Goal: Find the boundary slopes of the objective
function beyond which another corner point becomes
optimal.
They are defined by the slopes of the binding constraints!
176
Blue Ridge Hot Tubs
177
How Changing the RHS Value of a Constraint Can Change the Feasible
Region and Optimal Solution
X2
200
$(68,800 - 66,100)
= = 2700/162 = $16.67/hr
(1728 - 1566) hrs
179
Changes in Constraint RHS Values
The dual price of a constraint indicates the amount by which the objective function
value changes (improves or worsens) given a unit change (loosening or tightening)
in the RHS value of the constraint, assuming all other coefficients remain constant.
Loosen Tighten
< increase RHS decrease RHS
> decrease RHS increase RHS
MAX MIN
Improves increases Z decreases Z
Worsens decreases Z increases Z
Dual prices are valid only within RHS changes falling within the
values in “Allowable Increase” and “Allowable Decrease” columns
181
Key Points About Dual Prices
182
Another Use of
Dual Prices
183
Blue Ridge Hot Tubs, Revisited
184
Reduced Costs
The reduced cost for each product equals its per-unit
marginal profit minus the per-unit value of the resources it
consumes (priced at their dual prices)
OR
185
Reduced Costs (cont.)
OR
the amount by which the objective function coefficient must be changed by in order to allow
that decision variable to become non-zero
186
Reduced Costs (cont.)
187
Review
188
Solve the following LLP
Maximize Z = 3X1 + 2X2 + 5X3
Subjective to:
X1 + 2X2 + X3 430
3X1 + 2X3 460
X1 + 4X2 420
Xi 0
189
The primary task is to convert the LPP into SLPP, let Si be the slack
variables, then
Maximize Z – 3X1 – 2X2 – 5X3 = 0
Subject to:
X1 + 2X2 + X3 + S1 = 430
3X1 + 2X3 + S2 = 460
X1 + 4X2 + S3 = 420
Xi, Si 0
190
191
Thus the IFBS is:
X1 = X2 = X3 = 0,
S1 = 430,
S2 = 460,
S3 = 420,
Z=0
192
Is the IFBS optimal? No, it is not optimal because there are negative
numbers into the net evaluations row (NER), these are –3, -2 and –5.
Now, we choose the column with the most negative number as the pivot
(entering) column. –5 is, of course, the most negative number and therefore
X3 is the entering variable, we mark the column. Now the X3 column is the
pivot column.
193
To determine the pivot (leaving) row we compare the ratios of the CV and
coefficient of pivot column. . We then choose the least ratio, which is 230.
We mark the row as the pivot row; S2 is the leaving variable. The element
at the intersection between the pivot row and the pivot column, 2 in our
example, is the pivot element, and we mark it. Now we are ready of the
second iteration.
194
195
S2 is replaced by X3 and the whole row is multiplied by 1/2 to get the
pivot element equal to 1. All other elements of the pivot column are
reduced to zero by elementary operation, which involves the pivot
element. Thus, the old S1 minus the X3 gives the new S1. Row S3
remains as it was because its value was zero in the pivot column. To
make the value of NER in the pivot column equal to zero multiply the
new X3 by 5 and add to the old NER to get the new NER.
Now, the second iteration is done. The current solution is X1 = X2 = S2
= 0. X3 = 230, S1 = 200 and S3 = 420; and Z = 1150.
196
Is the current solution optimal?
No because there is –2 in NER X2 column.
Mark the column.
Compare the ratios = 100 and = 105, S1 is the pivot row, mark it.
The intersecting element 2 is the pivot element and mark it.
Now we are ready for the third iteration.
197
198
Example:
Leather limited manufactures two types of belts: the deluxe model
and the regular model.
Each type requires 1 sq yd of leather. A regular belt requires 1 hour
of skilled labor, and a deluxe belt requires 2 hours.
Each week, 40 sq yd of leather and 60 hours of skilled labor are
available. Each regular belt contributes $3 to profit and each deluxe
belt, $4.
199
Define,
X1=number of deluxe belts produced weekly
X2=number of regular belts produced weekly
The LP is,
Max z=4x1+3x2 (LP1)
s.t. x1+ x2≤40 (Leather constraint)
2x1+ x2≤60 (Labor constraint)
x1,x2≥0
200
Convert inequality constraints to
equality constraints
Define for each ≤ constraint a slack variable si
(si=slack variable for ith constraint).
We define,
s1=40- x1-x2 or x1+ x2+ s1=40
s2=60-2x1-x2 or 2x1+ x2 + s2=60
201
LP1 in standard form
\
202
60
D
50
B
40
30
x2
E
20
10
C A
0
0 10 20 30 40 50 60
x1
204
Transportation Model
• Transportation problem deals with the distribution of goods from several points of
supplies (sources) to a number of points of demands (destinations).
• Cost of product = production cost + distribution cost
• Distribution cost consists of mainly the transportation cost of items from its
production (manufacturing) center to the warehouses.
• Transportation techniques are designed to minimize the distribution costs.
08/16/21 205
The Characteristics of Transportation Problem
1. A limited supply of one commodity is available at certain
sources or origins.
2. There is a demand for the commodity at several destinations
3. The quantities of supply at each source and the demand at each
destination are constant.
4. The shipping or transportation costs per unit from each source
to each destination are assumed to be constant.
5. No shipments are allowed between sources or between
destinations. All supply and demand quantities are given in
whole number or integers.
6. The problem is to determine how many units shipped from each source to
each destination so that all demands are satisfied at the minimum total
shipping costs.
08/16/21 206
Uses of Transportation Techniques
1. Reduce distribution or transportation cost
2. Improve competitiveness of product
3. Assist proper location of warehouses
3. Assist proper location of new factories or plants
being planned.
4. Close down warehouses which are found costly and
uneconomical
08/16/21 207
1. Transportation Problem (TP)
Destination Supply
D1 D2 D3 D4
S1 50 75 35 75 12
Source S2 65 80 60 65 17
S3 40 70 45 55 11
(D) 0 0 0 0 10
Demand 15 10 15 10
Transportation Tableau:
Initial Solution Procedure:
1. Northwest Corner Starting Procedure
1. Select the remaining variable in the upper left (northwest) corner
and note the supply remaining in the row, s, and the demand
remaining in the column, d.
2. Allocate the minimum of s or d to this variable. If this minimum is
s, eliminate all variables in its row from future consideration and
reduce the demand in its column by s; if the minimum is d, eliminate
all variables in the column from future consideration and reduce the
supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE BEEN
ALLOCATED.
Total sipping cost = 2250
2. Least Cost Starting Procedure
1. For the remaining variable with the lowest unit cost,
determine the remaining supply left in its row, s, and the
remaining demand left in its column, d (break ties arbitrarily).
2. Allocate the minimum of s or d to this variable. If this
minimum is s, eliminate all variables in its row from future
consideration and reduce the demand in its column by s; if the
minimum is d, eliminate all variables in the column from future
consideration and reduce the supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE
BEEN ALLOCATED.
Total shipping cost = 2065
3. Vogel’s Approximation Method Starting Procedure
1. For each remaining row and column, determine the difference
between the lowest two remaining costs; these are called the row
and column penalties.
2. Select the row or column with the largest penalty found in step 1
and note the supply remaining for its row, s, and the demand
remaining in its column, d.
3. Allocate the minimum of s or d to the variable in the selected
row or column with the lowest remaining unit cost. If this
minimum is s, eliminate all variables in its row from future
consideration and reduce the demand in its column by s; if the
minimum is d, eliminate all variables in the column from future
consideration and reduce the supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE BEEN
ALLOCATED.
Total sipping cost = 2030
Example 2:. Shipping costs, Supply, and Demand for
Powerco Example
From To
City 1 City 2 City 3 City 4 Supply
(Million kwh)
Plant 1 $8 $6 $10 $9 35
Plant 2 $9 $12 $13 $7 50
Plant 3 $14 $9 $16 $5 40
Demand 45 20 30 30
(Million kwh)
Transportation Tableau
Solution
1. Decision Variable:
Since we have to determine how much electricity is
sent from each plant to each city;
Minimize Z = 8X11+6X12+10X13+9X14
+9X21+12X22+13X23+7X24
+14X31+9X32+16X33+5X34
3. Supply Constraints
Since each supply point has a limited production capacity;
X11+X12+X13+X14 <= 35
X21+X22+X23+X24 <= 50
X31+X32+X33+X34 <= 40
4. Demand Constraints
Since each supply point has a limited production capacity;
X11+X21+X31 >= 45
X12+X22+X32 >= 20
X13+X23+X33 >= 30
X14+X24+X34 >= 30
5. Sign Constraints
Since a negative amount of electricity can not be shipped
all Xij’s must be non negative;
X
i 1
ij dj ( j 1,2,..., n)
i m j n
s d
i 1
i
j 1
j
Balancing a TP if total supply exceeds total
demand
3. Vogel’s Method
Example 3
2 5 4 5
F3 2500
Requirements of the
Warehouses
( Units of demand) 6000 4000 2000 1500 13500
LPP
Solution
2
6
7
F2 6000 5
W2 4000
2
3
W3 2000
2 5
4
F3 2500
5 W4 1500
This LPP has 12 shipping routes. The objective is to identify the minimum cost
route (Least cost route).
Methods Of Finding Initial Feasible Solution
Plant 2 70 30 40 60 9
Plant 3 40 8 70 20 18
Demand 5 8 7 14 34
To
Store 1 Store 2 Store 3 Store 4 Supply
From
19 30 50 10
Plant 1 5 2 7
70 30 40 60
Plant 2 6 3 9
40 8 70 20
Plant 3 4 14 18
Demand 8 7 14 34
5
Plant 1 Store 1 5 19 95
plant 1 Store 2 2 30 60
Plant 2 Store 3 6 30 180
Plant 2 Store 4 3 40 120
Plant 3 Store 4 4 70 280
Plant 3 Store 4 14 20 280
Total Cost= $ 1015
Note: NWCM does not consider the cost factor for allocation.
Exercise:
1. Determine an initial basic feasible solution to the following
transportation problem using NWCM. Compute the total cost
for this solution
A B C Supply
S1 2 7 14 5
S2 3 3 1 8
S3 5 4 7 7
S4 1 6 2 14
Demand 7 9 18 34
Note: the cost of “shipments” to the dummy is usually set at zero ==> No real
cost
Example
Develop an initial feasible solution using NWCM
Table: Unbalanced transportation table
R S T Supply
A 1 2 3 100
B 4 1 5 110
80 120 60 210
Demand
260
Solution:
R S T Supply
1 2 3
A 100
80 20
4 1 5
B 110
100 10
0 0 0
Dummy 50
50
Demand 80 120 60 260
Factory
W1 W2 W3 W4 Capacity
F1 3 2 7 6 5000
F2 7 5 2 3 6000
F3 2 5 4 5 2500
Demand 6000 4000 2000 1500 13500
Required:
a. Develop an initial feasible solution using NWCM & Compute the total cost
b. Develop an initial feasible solution using least-cost method & compute the total cost.
Solution:
Factory
W1 W2 W3 W4 Capacity
Factory 3 2 7 6
F1 5000 5000
7 5 2 3
F2 6000
1000 4000 1000
2 5 4 5
F3 2500
1000 1500
Demand 6000 4000 2000 1500 13500
• 1. Calculate penalties for each row (column) by taking the smallest & the next smallest unit
transportation cost in the same row (column)
• This difference indicates the penalty or extra cost which has to be paid if one fails to allocate
to the cell with the minimum unit transportation cost
• 2. Select the row or column with the largest penalty & allocate as much unit as possible in
the cell having the least cost in the selected row or column satisfying the conditions.
• If there is a tie in the values of penalties, then it can be broken by selecting the cell where
maximum allocation can be made.
• 3. Adjust the supply & demand & cross out the satisfied row or column
• If a row or column is satisfied simultaneously, only one of them is crossed out & the
remaining row (column) is assigned a zero supply (demand) .Any row or column with zero
supply or demand should not be used in computing future penalties.
• Repeat step 1 to 3 until the entire available supply at various sources & demand at various
destinations are satisfied.
The steps of Vogel’s approximation model can be summarized in the
following list:
or opportunity cost
A B C D Supply
2 2 0 4 2 0 - - -
Factory 5 20 25
F1
F2 5 9 8 3 2 2 2 2 5
25
15 5 5
F3 6 4 3 2
10 1 2 2 - -
10
Demand 20 15 20 5 60
Column difference 3 2 3 1
or Column penalty
or opportunity cost 3 2 - 1
1 5 - 1
5 9 - -
5 - - -
Example: 2
The Assignment Problem (AP)
a special case of TP with m=n and si=dj for all i,
and j.
• Provides a simple heuristic that can be used to find the optimal set
of assignments.
• It is based on minimization of opportunity costs that would result
from potential pairings. These are additional costs that would be
incurred if the lowest-cost assignment is not made
Requirements for Use of the Hungarian Method
Further
FurtherRevision
Revisionof
ofthe
theCost
CostTable
Table
Optimal Assignments
Example 2
• A production supervisor is considering how he should assign the four jobs that
are performed, to four of the workers working under him. He want to assign
the jobs to the workers such that the aggregate time to perform the job in the
least. Based on the previous experience, he has the information on the time
taken by the four workers in performing these jobs, as given in below
The final assignments is 1-B, 2-D, 3-C, and
Example 3:
Minimum uncovered
number
Minimum uncovered
number
CONVERSION OF A MAXIMIZATION
PROBLEM TO A MINIMIZATION PROBLEM
J1 J2 J3 J4
W1 7 41 0 1
W2 16 11 1 0
W3 0 0 10 34
(D) 74 99 90 56