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

Operations Research

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 47

Operations Research in Mining

Industries

Dr. Abubakary Salama


Department of Mining and Mineral Processing Engineering
Contact: asalama@udsm.ac.tz
Special cases in applying
the simplex method
Non-positive Right hand-side values

-2x1+7x2 ≤ -10 even if we add a slack variable


x3 = -10, it is not permissible since x j ≥ 0.

Hence we multiply both sides by -1 and change


sign to 2x1-7x2 ≥ 10 which can be worked out.
Unconstrained variables (variables allowed to take
negative values)
• In many practical situations we may want to allow one or
more of the decision variables, the xj to be unconstrained in
sign, that is, either positive or negative.
• The procedure for simplex method is such that the decision
variables should be non – negative.

• Consider the case in which a mining company is producing


two mineral products 1 and 2 at the rate x1 and x2.
• A production programme indicating that the rate of
production of product 1 for example should be reduced
implies that x1 can be negative.
Negative values for decision variables

1) Select lower bound, below which the value of the decision


variables should not fall e.g xj ≥ Lj where Lj = some negative
constraint.
2) Then make the transformation
Xj = Xj” - Lj
Thus resulting in Xj” ≥ 0
3) Now from Xj ” = Xj – Lj we get
Xj ” + Lj = Xj
4) Hence substitute ( Xj ” + Lj) for Xj throughout the model and
solve for the refined Decision variable X ” j .
Example:
Maximize : Z = 3x1+4x2
Subject to : 2x1+ x2 ≤ 40
X1+3x2 ≤ 30
X1 ≥ -5
X2 ≥ 0
Put this problem in a standard form where all decision
variables are to be non – negative.

Solution:
Make the transformation
X ” 1 = x1- (-5), Hence substitute
(x ” 1 – 5) for x1 throughout the model.
Maximize : Z = 3(x ” 1 – 5) + 4x2
Subject to: 2(x ” 1 - 5) + x2 ≤ 40
X ” 1 – 5 + 3x2 ≤ 30
X ” 1 – 5 ≥ -5
X2 ≥0

Simplifying the above model gives;


Maximize : Z = 3x1 ” + 4x2 – 15
Subject to: 2x1 ” + x2 ≤ 50
X1 ” + 3x2 ≤ 35
X1 ” ≥0
X2 ≥0

• The problem can now be solved using the simplex Method.


Infeasibility
• In the simplex method, an infeasible solution
is indicated by looking at the final tableau

• The solution is infeasible if an artificial


variable still remains in the solution mix

• A situation with no feasible solution may exist


if the problem was formulated improperly.
Unbounded Solutions
• Unboundedness describes linear programs that do not
have finite solutions
• when a solution variable can be made infinitely large
without violating a constraint
• When deciding which variable to remove from the
solution mix, the row with the smallest positive ratio
is normally replaced. But if all the ratios turn out to
be negative or undefined, it indicates that the problem
is unbounded
More Than One Optimal Solution
• Multiple, or alternate, optimal solutions can be spotted
when the simplex method is being used by looking at
the final tableau
• If the Cj - Zj value is equal to 0 for a variable that is
not in the solution mix, more than one optimal
solution exists
For example if x1 and x2 are non basic variables, and s1
and s2 are basic variables. In the final solution the values
in cj-zj for x1 and x2 are all zero. But the solution shows
that only say x1 enters while x2 didn’t enter the basic
variables. Then multiple solution will exist
Degeneracy

a) In cases where there are two or more proposed entering


variables (Entering the Basis) with the same (Cj-Zj) values,
the question arises as to which of them to be selected.

• Fortunately the choice should simply be arbitrary, selected


any of the competing entering variable and proceed with
the computations.

• The optimal solution will eventually be obtained, although


there is no easy way of predicting which choice will lead
to the optimal solution faster.
b) In cases with a tie on the leaving variable, the
solution is not so straight forward. The type of
difficulties encountered with such ties can be
illustrated using

Maximize: Z = 3x1+9x2
Subject to: x1+4x2 ≤ 8
x1+2x2 ≤ 4
x1 ≥ 0 , x2 ≥ 0

Solving using the simplex method;


Initial simplex tableau
Cj 3 9 0 0 ratios
Variables Solutio
Cb in n
basis a1 a2 a3 a4
Values,
xb
0 x3 8 1 4 1 0 2

0 x4 4 1 2 0 1 2

Zj 0 0 0 0 0

Cj-Zj 3 9 0 0
2nd Tableau
Cj 3 9 0 0 ratios
Variables Solutio
Cb in n
basis a1 a2 a3 a4
Values,
xb
9 x2 2 1/4 1 1/4 0 2

0 x4 0 1/2 0 -1/2 1 0

Zj 18 9/4 9 9/4 0

Cj-Zj 3/4 0 -9/4 0


3rd Tableau (Optimal)
Cj 3 9 0 0
Variables Solutio
Cb in n
basis a1 a2 a3 a4
Values,
xb
9 x2 2 0 1 1/2 -1/2

3 x1 0 1 0 -1 2

Zj 18 3 9 3/2 3/2

Cj-Zj 0 0 -3/2 -3/2


The following points can be noted from the previous
iterations
• The value of the objective function obtained as 18 in tableau
no.2 could not be increased further, even though the positive
values in the Cj-Zj row indicate that increases are possible
• Even if you could select in the first Tableau x4 as the leaving
variable and make it case II. It will lead to the similar type of
solution with no further increases in the value of Z
• The solution has in effect ran into a LOOP (cyclic) from
which convergence on the optimal solution is not possible.
Such a situation is referred as DEGENERACY
• It occurs when there is a tie between two or more basic
variables as candidates for the leaving basic variable,
sometime when one of the solutions variable become zero
Other indications for degeneracy
• Previous Tableau to be identical to the coming
Tableaus
• After the first transformation m the simplex
method kept switching between two variables
from basic to non – basic variables
Example 2-Degeneracy
Maximize: Z = 3x1+4x2
Subject to: 2x1+5x2 ≤ 50
x1+3x2 ≤ 30
x1 ≥ 0 , x2 ≥ 0

Solving using the simplex method;


INITIAL TABLEAU

Cb Variables Cj 3 4 0 0 Ratio
in Solution a1 a2 a3 a4
basis values, xb
0 X3 50 2 5 1 0 10

0 X4 30 1 3 0 1 10

Zj 0 0 0 0 0
Cj-Zj 3 4 0 0

• Based on selection of the variable to leave the basis,


the criterion want the smallest which in our case ties up
so we select cerbitrarily.
SECOND TABLEAU

Cb Variables Cj 3 4 0 0 Ratio
in Solution a1 a2 a3 a4
basis values, xb
4 X2 10 2 1 1 0 25
5 5

0 X4 0 1 0 3 1 0
5 5
Zj 40 8 4 4 0
5 5
Cj-Zj 7 0 4 0
5 5
THIRD TABLEAU

Cb Variables Cj 3 4 0 0 Ratio
in Solution a1 a2 a3 a4
basis values, xb
4 X2 10 0 1 -1 2 5

3 X1 0 1 0 3 -5 0

Zj 40 3 4 5 -7
Cj-Zj 0 0 -5 7
FOURTH TABLEAU

Cb Variables Cj 3 4 0 0 Ratio
in Solution a1 a2 a3 a4
basis values, xb
4 X2 10 1 0 25
2 1
5 5
0 X4 0 0 3 1 0
1 5
5
Zj 40 4 0
8 4 5
5
Cj-Zj 0 0
7 4
5 5
The dual
• Every LP problem has another LP problem
associated with it, which is called its dual.
• The first way of stating a linear problem is called the
primal of the problem; we can view all of the
problems formulated thus far as primals.
• The second way of stating the same problem is
called the dual.
• The optimal solutions for the primal and the dual are
equivalent, but they are derived through alternative
procedures
• Generally, if the LP primal involves
maximizing a profit function subject to less-
than-or-equal-to resource constraints, the dual
will involve minimizing total opportunity costs
subject to greater-than-or-equal-to product
profit constraints.

• Formulating the dual problem from a given


primal is not terribly complex, and once it is
formulated, the solution procedure is exactly
the same as for any LP problem.
Steps to Form a Dual

1. If the primal is a maximization, the dual is a


minimization, and vice versa.
2. The RHS values of the primal constraints become
the dual’s objective function coefficients.
3. The primal objective function coefficients
become the RHS values of the dual constraints.
4. The transpose of the primal constraint
coefficients become the dual constraint coefficients.
5. Constraint inequality signs are reversed.
Example
Maximize profit = 50X1 + 120X2
subject to
2X1 + 4X2 <= 80
3X1 + 1X2 <= 60
Write dual of this primal problem
Solution
• The dual of this problem will have the objective of
minimizing the opportunity cost
• The RHS quantities of the primal constraints become
the dual’s objective function coefficients.
• Let X’1 represent X1 of primal, and X’2 represents
X1
• Then the objective function of dual will be
Minimize: 80X’1+60X’2
• The corresponding dual constraints are formed from
the transpose of the primal constraints coefficients.
• Note that if the primal constraints are <=, the dual
constraints are >=
• Then the constraints will be
2X’1+3X’2>=50
4X’1+1X’2>=120.
Therefore the dual of the given primal is
Minimize: 80X’1+60X’2
Subject to
2X’1+3X’2>=50
4X’1+1X’2>=120.
Sensitivity analysis
• This valuable concept shows how the optimal
solution and the value of its objective function
change, given changes in various inputs to the
problem.
• Graphical analysis is useful in understanding
intuitively and visually how feasible regions
and the slopes of objective functions can
change as model coefficients change
• Changes in the Objective Function Coefficient
Represents the range of variation for
objective function coefficients that will keep
the current optimum solution unchanged
• Changes in the right hand side of the
constraint
Represents the range of variation for right
hand side of the constraint while guaranteeing
that the optimum solution point will be
given by the intersection of the lines associated
with the assigned constraints
Changes in the Objective Function Coefficient

• One way of illustrating the sensitivity analysis of


objective function coefficients is to consider the
problem’s final simplex tableau. Another way is by
using graphical solution.
• Normally in final simplex tableau we have basic
variables (those in the solution mix) and non-basic
variables (those not in the solution mix, i.e set equal
to zero)
• Let us first consider the sensitivity analysis for the
case of non-basic variables
• Consider the following final simplex tableau

Basic varibles are x2=20, and S2=40


Non basic varibles are x1=0, and S1=0
• Our goal here is to find out how sensitive the
problem’s optimal solution is to changes in the
contribution rates of variables not currently in
the basis ( X1 and S1). Just how much would the
objective function coefficients have to change
before X1or S1 would enter the solution mix and
replace one of the basic variables?
• The answer lies in the Cj-Zj row of the final
simplex tableau. Since this is a maximization
problem, the basis will not change unless the Cj-
Zj value of one of the non-basic variables
becomes positive
• That is, the current solution will be optimal as
long as all numbers in the bottom row are less
than or equal to 0. It will not be optimal if
X1’S Cj- Zj value is positive, or if S1’s Cj- Zj
value is greater than 0. Therefore, the values of
Cj for X1 and S1 that do not bring about any
change in the optimal solution are given by
• Since X1’s Cj value is $50 and its Zj value is $60, the
current solution is optimal as long as the profit does
not exceed $60, or correspondingly, does not increase
by more than $10. Similarly, the contribution rate per
unit of S1 may increase from $0 up to $30 without
changing the current solution mix.
• In both cases, when you are maximizing an objective
function, you may increase the value of Cj up to the
value of Z. You may also decrease the value of Cj for a
non-basic variable to negative infinity without
affecting the solution. This range of Cj up to the value
of Zj. You may also decrease the value of Cj values is
called the range of insignificance for non-basic
variables.
• The range over which Cj rates for nonbasic
variables can vary without causing a change in
the optimal solution mix is called the range of
insignificance.

• Sensitivity analysis on objective function


coefficients of variables that are in the basis or
solution mix is slightly more complex and is
not covered in this course.
Changes in the right hand side of the constraint

• Making changes in the right hand side values


of the constraints result in changes in the
feasible region and often the optimal solution.
this bring another concept of shadow price.
Shadow price
• The shadow price is the value of one additional unit of
a scarce resource. Shadow pricing provides an
important piece of economic information.
• The negatives of the numbers in its slack variable
columns at the final simplex tableau in Cj - Zj row
provide the shadow prices
• A shadow price is the change in value of the objective
function from an increase of one unit of a scarce
resource
• The range over which shadow prices remain valid is
called right-hand-side ranging
Example
Maximize profit = $ 50X1 + $ 120X2
subject to 2X1 + 4X2 <= 80
3X1 + 1X2 <= 60
The optimal solution for this problem is
• What are the shadow prices for the two
constraints?
• Perform RHS ranging for constraint 1.
• If the RHS of constraint 1 were increased by 12,
what would the maximum possible profit be?
Give the values for all the variables.
• Shadow price = -(Cj – Zj)
For constraint 1, shadow price = -(-30) = 30
For constraint 2, shadow price = -(0) = 0
• For constraint 1, we use the S1 column

• The smallest positive ratio is 80, so we may reduce the RHS of


constraint 1 by 80 units (for a lower bound of 80 - 80 = 0).
Similarly, the negative ratio of -160 tells us that we may
increase the right-hand side of constraint 1 by 160 units (for an
upper bound of 80 + 160 = 240).
• This means that we establish the range of changing the
units (0-240) over which the shadow price of 30 is valid.
• If the RHS of constraint 1 were increased by 12, the profit is
maximum possible profit=original profit + 12( shadow price)
=2400+ 12(30)
=2760
The values for the basic variables are found using the original
quantities.

• Thus, if 12 units are added, X2 = 23 and S2 = 37. All other


variables are nonbasic and remain zero. This yields a total profit
of 50(0) + 120(23) = $ 2,760, which is an increase of $360.
Tutorial Qn 1
Formulate a linear programming model for this problem.

The decision variables are defined as follows:


xm1-s1 :number of units (tons) shipped from Mine 1 to Storage S1,
xm1-s2 :number of units (tons) shipped from Mine 1 to Storage S2,
xm2-s1 :number of units (tons) shipped from Mine 2 to Storage S1,
xm2-s2 :number of units (tons) shipped from Mine 2 to Storage S2,
xs1 -p : number of units (tons) shipped from Storage S1 to the Plant,
xs2 -p : number of units (tons) shipped from Storage S2 to the Plant.
The total shipping cost is

Z = 2000 xm1-s1 + 1700 xm1-s2 + 1600 xm2-s1 + 1100 xm2-s2 + 400 xs1-p + 800 xs2-
p

The constraints we need to consider are:

 Supply constraint on M1 and M2:


xm1-s1 + xm1-s2 = 40
xm2-s1 + xm2-s2 = 60

 Conservation-of-flow constraint on S1 and S2:

xm1-s1 + xm2-s1 - xs1-p = 0


xm1-s2 + xm2-s2 - xs2-p = 0

 Demand constraint on P:
xs1-p + xs2-p = 100
 Capacity constraints:
xm1-s1  30
xm1-s2  30
xm2-s1  50
xm2-s2  50
xs1-p  70
xs2-p  70

 Non-negativity constraints:
xm1-s1  0
xm1-s2  0
xm2-s1  0
xm2-s2  0
xs1-p  0
xs2-p 0
The resulting linear programming model for this problem is:

Maximize Z = 2000 xm1-s1 + 1700 xm1-s2 + 1600 xm2-s1 + 1100 xm2-s2


+ 400 xs1-p + 800 xs2-p,

subject to
xm1-s1 + xm1-s2 = 40
xm2-s1 + xm2-s2 = 60
xm1-s1 + xm2-s1 - xs1-p = 0
xm1-s2 + xm2-s2 - xs2-p = 0
xs1-p + xs2-p = 100
xm1-s1  30, xm1-s2  30
xm2-s1  50, xm2-s2  50
xs1-p  70, xs2-p  70
and
xm1-s1  0, xm1-s2  0
xm2-s1  0, xm2-s2  0
xs1-p  0, xs2-p 0

This model can now be solved by using the simplex method

You might also like