0% found this document useful (0 votes)
64 views

OR - Chapter 2, Linear Programming

Uploaded by

beyutate
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

OR - Chapter 2, Linear Programming

Uploaded by

beyutate
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Chapter 2: LINEAR PROGRAMMING

• LP (also known as constrained optimization) is a mathematical


technique that makes use of linear algorithms (procedures) to find
solutions to constrained optimization problems.
• This model has wide areas of application. Some of them are:
I. Problems that involve product mix problems
II. Portfolio selection
III. Job assignments
IV. Distribution or location selection
V. Inventory planning
VI. Budgetary allocations
VII. Scheduling, etc.
1
Structure and characteristics of LPM

LPM has the components

1. Objective: Can be Max or Min

2. Decision variables: Controllable variables

3. Constraints: These are restrictions

4. Parameters : Coefficient of decision variables in objective and


constraint functions

2
Structure and characteristics of LPM

LPM takes in to account the following assumptions

1. Linearity: each decision variable has a linear impact.

2. Divisibility: non-integer values for decision variables are acceptable.

3. Certainty: each parameter and constraint should be known.

4. Non-negativity: decision variables don’t assume negative values.

3
Solution approaches to LPM

• There are two approaches to solving linear programming models The


first one is the Algebraic approach which is also called the Graphical
approach and the second approach is the simplex approach.

• The graphical approach is only applicable to problems that involve


two decision variables.

• The graphic approach can make use of objective function approach or


the extreme point approach.

4
Graphical approach: Example 1

Suppose a company produces two types of product: product A and B. In


order to produce a single unit of product A, one unit of RM and six
labour hours are required. Moreover, the production of a single unit of
product B requires two units of raw materials and four labour hours. It
is known that the company has 10 units of raw materials and 36 labour
hours. If a single unit of product A and B can earn five and eight birr,
determine the production volumes which would maximize the profit
level.

5
Graphical approach: Example 2

A company plan to acquire at least 900 units of ingredient A and 1200


units of ingredient B. These ingredients are available in the market in
two type of bags (bag I and II). Bag I contains 20 units of ingredient A
and 40 units of ingredient B, whereas Bag II contains 30 units of each
type of ingredient. Given that a single bag I and II cost 100 and 110 birr
respectively, how many units of each bag ought to be purchased to
meet the minimum ingredient requirement and minimize the
purchasing cost.

6
Simplex approach

• It begins with a feasible solution which is not optimal, and the


solution is improved through continuous algebraic manipulations
(iterations) until the optimal solution is determined.
• Slack variables are variables we introduce to the left side of
constraints to make them equality while we are changing the ordinal
mathematical model into its standardized form. These variables
represent the amount of unused scarce resources or capacity.
• Elementary row operations are used in this method:
• Multiplying (dividing) all of the elements in a row by a constant.
• Adding or subtracting the multiple of a row to or from another row.
• Interchanging two rows.

7
Example: Simplex approach 3

A candy company produces three types of candies: solid centre, fruit


centre, and cream filled. The company packages these candies in three
types of assortments. A box of assortment I contains 6 solid centre, 2
fruit centre, and 2 cream filled. A box of assortment II contains 2 solid
centre, 2 fruit centre, and 6 cream filled. In addition, A box of
assortment III contains 4 units of each type of candy. The company can
produce utmost 2400 units of solid centre, 2000 units of fruit centre,
and 2800 units of cream filled. If the profit per box is 40 birr, 30 birr,
and 50 birr for box I, II ,and III respectively, find the volume of boxes of
candies to be produced to maximize the profit.

8
Example: Simplex approach

• What will happen if our constraint is with > sign? This excess amount is
referred to as Surplus. This surplus amount is subtracted from the left side
of the constraint function to put it in standard form.
• Surplus variables are expressed in exactly the same way as slack variables.
They are assigned coefficients of zero.
• By subtracting the surplus, the constraint becomes equality. Therefore, to
allow for the initial solution that will be less than that amount, an artificial
variable must be added.
• we don’t want the artificial variables to appear in the final solution because
they are not real variables.
• In a maximization problem, we assign a large negative number denoted by
M to facilitate the solution.
• In a minimization problem, we assign a large positive number to be the
coefficient of the artificial variable. 9
Example: Simplex approach

1. If there is a tie between two decision variables, then the selection can
be made arbitrary.
2. If there is a tie between a decision variable and a slack (or surplus)
variable, then select the decision variable to enter into basis first.
3. If there is a tie between slack or surplus variable, then selection can
be made arbitrary.
4. When there is a tie between a slack and artificial variable to leave the
basis, the preference shall be given to artificial variable to leave the
basis and there is no need to apply the procedure for resolving such
cases.

10
Example: Simplex approach

Z min= 100x1 + 110x2


Subject to
20 x1 + 30x2 > 900
6x1 + 2x2 > 1200
x1, x2 > 0
Z max= 4x1 + 6x2 (Mixed constraints)
Subject to
x2 > 30
X2< 100
2x1 + x2 =140
x1, x2 > 0 11
Some Special Issues of LPM

No feasible solutions: These are cases when it is not possible to


formulate the problem because it is impossible to satisfy all the
constraints that are called for in the model. It may happen for
example when there is mix of greater than and less than constraints.
I t looks like the following graph.

Area of feasibility for


constraint 2

2
1
Area of feasibility
for constraint 1

12
Some Special Issues of LPM

Unbounded problems: This is the case when we can increase the


value of the objective function without limit. This case happens if the
objective is maximizing while all the constraints are written with
greater than constraints.

X2
An unbounded solution space

A feasible solution space for


a maximization problem

X1

13
Some Special Issues of LPM

The final tableau for the problem is:

C 10 6 7 0 RHS
Basis X1 S1 S1 S2 values
X2 0 0 1 -1 2 5
X1 10 1 0 -2 2 4
Z 2 3 -7 10 23
C- Z 0 0 7 - 10

Even though there is a positive value in the net evaluation row


indicating that the solution is not optimal (can be improved by
bringing the variable in the pivot column into the solution mix), we
can’t determine the variable to be replaced because there is no
positive ratio in the pivot column. This special condition is referred to
as unbounded ness.
14
Some Special Issues of LPM

Redundant Constraints: When a constraint does not form any of


the boundaries to the feasible solution space, this constraint is a
redundant constraint. I ts absence (removal) does not make change
to the feasible solution space as well as the optimal solution of the
problem.

Redundant Constraint

Second
constraint

First
constraint

15
Some Special Issues of LPM

Multiple Optimal Solutions: This will happen when any of the


constraint functions is parallel to the objective function. The entire
portion of this line (parallel to the obj ective function) which makes
the boundary of the feasible solution space will touch the objective
function. All points in this segment will yield the same optimal value
to the objective function (i.e. Points on the segment are solutions to
the problem) . The following graphs indicate the above cases.

Multiple Optimal Solutions

Optimal line
segment

Objective function

16
Some Special Issues of LPM

Multiple optimal solutions

• This is the condition when same maximum value of the objective


function might be possible with a number of different combinations
of values of the decision variables. It occurs when the objective
function is parallel to any of the binding constraint function. Two
functions are said to be parallel if the ratio of coefficients of variables
is the same.
• When using the simplex approach, we can recognize alternate optima
if the C-Z row contains a zero value for one or more of the non-basic
variables in the final simplex tableau.
17
Some Special Issues of LPM

Degeneracy

Normally we can identify the leaving and entering variables and make
the appropriate replacement. I n some cases however, when you are
determining the leaving variable, there may be a tie for the lowest
positive ratio. Such a case is known to be the case of degeneracy. I f
you try to generate the next tableau by just taking any one variable
with the least ratio, you encounter no problem in the procedure but
there will be no improvement in the solution (level of the objective
function); it will rather be the same as the previous solutions. 18
POST OPTIMALITY ANALYSIS

• Such a kind of analysis is done after the determination of the


optimum solution to the model. That is why we refer it as “post
optimality analysis.” It is also called “sensitivity analysis” because we
are observing the sensitivity of the model to possible changes.
• When we were developing the LP models, we assumed that we know
all the parameter values for certain (Certainty assumption). However,
in reality, the parameter values are just educated guesses. Therefore,
the optimum solutions computed under this assumption may not be
optimal depending on how sensitive that solution is to alternate
values of parameters. That is why the decision maker needs to
perform sensitivity analysis before implementing the solution.

19
POST OPTIMALITY ANALYSIS

• Changes to a model might happen due to changes in any of the


parameters (coefficients of the objective function, to the coefficients
of the constraint functions, or to the RHS values of the constraints).
• In our discussion in this section, the possible changes to the model
will be seen being classified into two categories. The first one is a
change to the coefficients of the objective function, and the second is
a change to the RHS values of the constraints. But we will not discuss
the change to the coefficients of constraints.
• Changes can also be resulted due to changes in the product lines
especially when introducing a new product. To deal with these kinds
of changes, we use a technique called “duality.” Duality is another
way of formulating (representing) linear programming models.
20
Sensitivity Analysis

• Here, we will be concentrating on the sensitiveness of the solutions of


the model to changes in the parameter values of the model. Special
attention is given to changes in RHS values of Constraints and Changes
in the coefficients of the objective function.
1. A change in the RHS of a constraint
It is the total impact of change in the RHS of a constraint to the level of
the objective function. this kind of analysis has some other associated
questions:
• How can we determine the impact of a per unit change in the RHS
value of a constraint?
• To what extent can the RHS value of a constraint be changed and still
the per unit impact (marginal value) is the same? 21
Sensitivity Analysis

Maximize 60x1 + 50x2


Subject to
4x1 + 10x2 100
2x1 + x2  22
3x1 + 3x2  39
x1, x2  0

C 60 50 0 0 0 RHS
Basis X1 X2 S1 S2 S3 values
S1 0 0 0 1 6 -16/3 24
x1 60 1 0 0 1 -1/3 9
x2 50 0 1 0 -1 2/3 4
Z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 -40/3

22
Sensitivity Analysis

• The values in Z row (0, 10 and 40/3) of the above tableau are called
“shadow prices.” They indicate the impact that one unit change in the
constraint would have on the value of the objective function.
• If inspection time (the value of the second constraint ) rose from 22
hrs to 23 hrs, profit will be increased by 10. This value (10) also shows
the amount by which the value of the objective function will be
decreased due to a unit decrease in the level of the constraint.
• But, we can not increase or decrease time (a precious resource)
unlimitedly. A range within which the possible change to the RHS
values of constraints can happen and still have the same shadow price
is called the “range of feasibility” or “the RHS range.”

23
Sensitivity Analysis

• We can determine the upper and lower limits of the range of


feasibility from the final simplex tableau.
• Allowable decrease: The smallest positive ratio
• Allowable increase: The smallest negative ratio
Slack variables
S1 S2 S3 Assembly Inspection Storage
1 6 -16/3 24/1=24 24/6 = 4 24
 16 / 3
= -4.5
0 1 -1/3 9/0 = Undif. 9/1 = 9 9
1/ 3
= -27
0 -1 2/3 4/0 = Undif. 4/-1 = -4 4
2/3
=6

Original Amount 100 22 39


Upper Limit None 22 + 4 =26 39 + 4.5 =
43.5
Lower Limit 100-24=76 22 – 4 = 18 39 – 6 = 33
24
Sensitivity Analysis

The range of feasibility for each constraint is:


• Assembly time, from 76 hrs to no upper limit
• Inspection time, from 18 hrs to 26 hrs
• Storage space, from 33 cubic feet to 43.5 cubic feet

25
Sensitivity Analysis

For example, let us assume that inspection time is increased by 4


hours. The impact is calculated as:

Current Revised
Basis S2 Change
Solution solution
S1 6 24 +4 (6) = +24 48
X1 1 9 +4(1) = +4 13
X2 -1 4 +4(- 1) = - 4 0
Z 10 740 +4(10) = 40 780

NB. I f we try to increase or decrease inspection time by more than


4, it would be beyond the feasible region. However, we can calculate
the impact to changes to the level of inspection time by any value
within the range of feasibility by using the above approach.

Exercise:

26
What will happen to the optimum solution if storage space is
increased by 3 cubic feet?
Answer: S 1 = 8, x1 = 8, x2 = 6 and Profit = 780
Sensitivity Analysis

2. A Change in an Objective Function Coefficient


• A change in the objective function coefficient can occur because of
changed costs, new pricing policies, product or process design
changes, as well as other factors.
• The extent to which the contribution of a given decision variable to
the objective function can be changed without altering the optimal
solution.
• The variable under consideration may or may not be a basic variable
in the optimal solution mix.
• On the basis of whether the variable is basic or non basic, we can
determine two types of ranges
27
Sensitivity Analysis

• The range over which a non-basic variable’s objective function


coefficient can change without causing that variable to enter the
solution mix (range of insignificance).
• The range over which the objective function coefficient of a
variable that is in solution can change without causing that variable to
leave the solution mix (range of optimality).
A non-basic variable’s objective function coefficient would have to
increase by an amount that exceeds the C-Z value for that variable in
the final tableau in order for it to be end up as a basic variable in the
optimal solution.
28
Sensitivity Analysis

C 11 10 14 0 0 0 RHS
Basis X1 X2 X3 S1 S2 S3 values
x2 10 .227 1 0 .227 .045 0 3.27
x3 14 .909 0 1 -.091 .182 0 13.09
S3 0 1 0 0 0 0 1 13.00
Z 15 10 14 1 3 0 215.96
C-Z -4 0 0 -1 -3 0

The range of insignificance for x1 is less than or equal to 15.

29
Sensitivity Analysis

• Range of optimality:
The rules to determine the range of optimality for both maximization
and minimization problems are:

 Allowable increase: The smallest positive ratio of C- Z value and


the variable substitution rate
 Allowable decrease: The smallest negative ratio of C- Z value
and variable substitution rate

For x3 we find ratios:


For x2 we find ratios:
 4 0 0 1  3 0
  4.40, undif , 0, 10.99,   16.48and undif  4 0 0 1 3 0
.909 0 1  .091 .182 0   17.62, 0, undif ,   4.41,   66.67and undif .
.227 1 0 .227 .045 0
 Allowable increase: the smallest positive ratio is 10.99; therefore
 Allowable increase: no positive ratio, therefore no upper
the upper limit is 14 +10.99 = 24.99 limit
Allowable decrease: the smallest negative ratio is -4.4. Allowable decrease: the smallest negative ratio is -4.41.
Therefore, the lower limit is 14 - 4.4 = 9.60 Therefore, the lower limit is 10 - 4.41 = 5.59

30
Hence the range of optimality for x3 is 9.60 to 24.99. The range of optimality for the objective function coefficient of x2 is
greater than or equal to 5.59.
Sensitivity Analysis

• Range of optimality:
Determine the range of optimality for the variables in the following
final simplex tableau of a maximization linear programming problem.

C 60 50 0 0 0 RHS
Basis X1 X2 S1 S2 S3 values
S1 0 0 0 1 6 -16/3 24
x1 60 1 0 0 1 -1/3 9
x2 50 0 1 0 -1 2/3 4
Z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 -40/3

Answer: The range of optimality for x1 =50 to 100

31
The range of optimality for x2 =30 to 60
Duality

• Linear programming problems have two forms. The original


formulation of a problem is known as its Primal form. The other form
formulated from the primal is the dual form.
• The dual is the “mirror image” of the primal. The solution to the
primal contains the solution to the dual and vice versa. Therefore,
solving either of the two is enough to determine the solutions.
• Analysis of the dual can help the decision maker assess the potential
impact of a new product by determining the marginal value of
resources. This is generally known to be the economic interpretation
of the dual.

32
Duality

The following procedures can be followed to formulate the dual:


• For the objective function: Develop the objective function by making
it a maximization if the primal is a minimization and vice versa; and
assign the right hand side (RHS) values of constraints of the primal to
be coefficients of the dual.
• To construct the constraints: Make the objective function coefficients
of the primal, the right hand side (RHS) values to the constraints of
the dual taken in order.

33
Duality

Formulate the dual of the following linear programming model


Maximize 60x1 + 50x2
Subject to
4x1 + 10x2 100
2x1 + x2  22
3x1 + 3x2  39
x1, x2  0
The dual to the above LP model is:

Minimize 100y1 +22y2 +39y3


Subject to
4y1 +2y2 + 3y3 60
10y1 + y2 +3y3 50
y1, y2, y3  0
34
Duality

The final simplex tableau for the above LP model is given below

Final tableau of the dual

C 100 22 39 0 0 RHS
Basis y1 y2 y3 S1 S2 values
y3 60 16/3 0 1 1/3 -2/3 40/3
y2 50 -6 1 0 -1 1 10
Z 76 22 39 -9 -4 740 Primal shadow
C-Z 24 0 0 9 4 princes

Primal solution quantities

As we have seen earlier, the final simplex tableau for primal of the
above LP model is:
Final tableau of the primal

C 60 50 0 0 0 RHS
Basis X1 X2 S1 S2 S3 values
S1 0 0 0 1 6 -16/3 24
x1 60 1 0 0 1 -1/3 9
x2 50 0 1 0 -1 2/3 4

35
Z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 -40/3
Duality

• If the primal problem has an optimum solution, the dual will also have
an optimum solution and vice versa. The optimum solution of the dual
and the primal are the same
• Given the final tableau of the dual, the optimal solutions for decision
variables of the primal are given by the C – Z row values of slack
variables in the dual
• Given the final solution of the primal, the solution for the decision
variables of the dual are determined to be the Z row values of slack
variables (shadow prices) of the primal; and the solution for slack
variables of the dual are given by the C – Z row values of decision
variables of the primal
36
Duality: Economic Interpretations
• Economically speaking, for the firm to consider the production of the
new product, the amount of scarce resources that will be given up
must produce a return
4y +2y + 3y 60
to the company that is at least to the foregone
profit.
1 2 3

• For each unit of type I spare part that the company sacrifices in order
to produce the new product, it will gain four hours of assembly time,
two hours of inspection time and three cubic feet of storage space.
However, ABC Company will also give up a unit profit of Birr 60.
• Therefore, the return from the new product should at least equal to
or greater than the forgone profit (Birr 60). That is, the value of 4
assembly hours + 2 inspection hours + 3 cubic feet of storage space
bust be greater than or equal to Birr 60.
37

You might also like