Sei sulla pagina 1di 46

EM 543:

Production and Operations Management


 

Unit 2:
Lecture 3-Linear Programming & Simplex Method
3.1 The TBA Airlines Problem

 TBA Airlines is a small regional company that specialises in


short flights in small airplanes. The company has been
doing well and management has decided to expand its
operations.

The Problem
 The basic issue facing management now is whether to
purchase more small airplanes to add some new short
flights or to start moving into the national market by
purchasing some large airplanes for new cross-country
flights (or both).
 Many factors will go into management’s final decision, but
the most important one is which strategy is likely to be
most profitable.
Table 3.1 Data for TBA
Airlines
Small Large Airplane Capital
Airplane Available

Net annual profit $ 1 million $ 5 million


per airplane
Purchase cost per $ 5 million $ 50 million $ 100 million
airplane
Maximum 2 No maximum
purchase quantity

Q: How many planes of each type should be purchased to


maximise the total net annual profit?
Formulation

 The TBA Airlines problem is a resource allocation problem.


The activities under consideration are:
Activity 1: Purchase small airplanes
Activity 2: Purchase large airplanes

The decisions to be made are the levels of these activities, ie.:

S = number of small airplanes to purchase


L = number of large airplanes to purchase

The one resource to be allocated to these activities is:

Resource: Investments capital ($ 100 million )


Thus, the single resource constraint is:

 Investment capital spent < $ 100 million

Also:
 Number of small airplanes purchased < 2

 Capital per unit purchased is a side constraint

Objective:
 To maximise the total net annual profit, ie;

Total profit = SUMPRODUCT (UnitProft, UnitsPurchased)


NB: Changing cells in this case must have integer values since it is
not feasible for the company to purchase and operate a fraction
of an airplane
 Due to constraint UnitsProduced = Integer
makes the TBA Airlines problem to be not exactly a
linear programming problem, but an Integer
programming problem

Summary of Formulation
The formulation for one resource constraint and one
side constraint for the TBA Airlines problem is :

 Maximise Profit = S + 5L

Subject to:
5S + 50L < 100
S < 2

And s> 0; L>0


Table 3.2 Data for TBA Airlines

  A B C D E F G
1 TBA Airline Purchase Problem      
2            
Small Large
3     Airplane Airplane      
Unit Profit
4   ($millions) 1 5      
5              
6         Capital   Capital
Capital per unit Purchased
7     Spent   Available

8   Capital ($millions) 5 50 100 < 100


9              
10             Total Profit
Small Large
11     Airplane Airplane     ($millions)

12   Number Purchased 0 2     10
13     <        
Maximum Small
14   Airplanes 2        
3.2 The Simplex Method & Sensitivity Analysis
The development of the simplex method computations is
facilitated by imposing two requirements on the LP model:
1. All the constraints are equations with nonnegative right-
hand side.
2. All the variables are nonnegative

 Converting inequalities into equations with nonnegative right-


hand side.
 To convert a (<) inequality to an equation, a nonnegative slack
variable is added to the left-handside of the constraint, eg.

6x1 + 4x2 < 24 inequality becomes


6x1 + 4x2 + s1 = 24, s1 > 0

 The nonnegative variable s1 is the slack (or unused amount)


of resource.
 Conversion from (>) to (=) is achieved by subtracting a
nonnegative surplus variable from the left-hand side of the
inequality, eg:

x1 + x2 > 800

the surplus variable S1> 0 converts the (>) constraint to


the equation
x1 + x2 – S1 = 800 ; S1 > 0

 The amount of S1 represents the excess over the required


minimum
Transition from Graphical to Algebraic Solution
 The development of the algebraic simplex method is based
on ideas conveyed by graphical LP solutions
 Fig. 3.1 compares the two methods. In the graphical
method, the solution space is the intersection of the half-spaces
representing the constraints, and in the simplex method, the
solution space is represented by m simultaneous
linear equations and n nonnegative variables.
 The graphical solution space has an infinite number of
solution points. In all nontrivial LPs, the number of
equations m is always less than the number of variables n,
thus yielding an infinite number of solutions (provided the
equations are consistent), eg:

equation x + y = 1 has m = 1 and n = 2 and yields an


infinite number of solutions because any point on the
straight line x + y = 1 is a solution.
Fig. 3.1 Transition from Graphical to Algebraic Solution
 In the algebraic solution space (defined by m x n equations,
m < n), basic solutions correspond to the corner points in
the graphical solution space.
 They are determined by setting n - m variables equal to zero
and solving the m equations for the remaining m variables,
provided the resulting solution is unique. This means that the
maximum number of corner points is:

  𝒏 𝒏!
𝑪 = 𝒎
𝒎 ! ( 𝒏− 𝒎 ) !

 the basic feasible solutions completely define the candidates


for the optimum solution in the algebraic solutions space
Example 3.1
Consider the following LP with two variables:
Maximize z = 2x1 + 3x2

subject to
2x1 + x2 < 4
x1 + 2x2 < 5
x1, x2 > 0

Figure 3.2 provides the graphical solution space for the


problem.
Fig. 3.2 Solution for Example 3.1
 Algebraically, the solution space of the LP is represented by
the following m = 2 equations and n = 4 variables:

 The basic solutions are determined by setting n – m (= 4 - 2


= 2) variables equal to zero and solving for the remaining m
( = 2) variables.
 For example, if we set x1 = 0 and x2 = 0, the equations
provide the unique basic solution
s1 = 4, s2 = 5
 This solution corresponds to point A in Figure 3.2 (convince
yourself that s1 = 4 and s2 = 5 at point A).
 Another point can be determined by setting s1 = 0 and s2 = 0
and then solving the resulting two equations

 The associated basic solution is (x1 = 1, x2 = 2), or point C in


Figure 3.2.
 The n - m variables which should be set equal to zero to
target a specific corner point isnecessary.
 Without the benefit of the graphical solution space (which is
available only for at most three variables), we cannot specify
the (n – m) zero variables associated with a given corner
point.
 But that does not prevent enumerating all the corner points
of the solution space.
 Simply consider all combinations in which n - m variables
equal zero and solve the resulting equations.
 Once done, the optimum solution is the feasible basic
solution (corner point) with the best objective value.
 In Example 3.1, the (maximum) number of corner points is
  =

 Referring to Fig. 3.2, we can spot the four corner points A,


B, C, and D. Points E and F also are corner points. But, they
are infeasible, and, hence, are not candidates for the
optimum.
 To complete the transition from the graphical to the
algebraic solution, the zero n – m variables are known as
nonbasic variables.
 The remaining m variables are called basic variables,
and their solution (obtained by solving the m equations) is
referred to as basic solution.
 The following table provides all the basic and nonbasic
solutions of the current example.

Table 3.3 Basic & nonbasic solutions


Remarks.
 As the size of the problem increases, enumerating all the
corner points becomes a prohibitive task. Eg., for m = 10
and n = 20, it is necessary to solve   = 184,7562 sets of
10 x 10 equations.
 The simplex method alleviates this computational
burden dramatically by investigating only a subset of all
possible basic feasible solutions (corner points).

Iterative nature of the Simplex method


 Fig.3.3 provides the solution space of the LP of Example
3.1.
 For the sake of standardizing the algorithm, the simplex
method always starts at the origin where all the decision
variables, xj, j = 1, 2, …., n, are zero.
 In Fig. 3.3, point A is the origin (x1 = x2 = 0) and the
associated objective value, z, is zero.
 The logical question now is whether an increase in the
values of nonbasic x1 and x2 above their current zero values
can improve (increase) the value of z.

Fig.3.3 Iterative process of the simplex method


 Investigating the objective function:

 An increase in x1 or x2 (or both) above their current zero


values will improve the value of z.
 The design of the simplex method does not allow
simultaneous increases in variables. Instead, it targets the
variables one at a time.
 The variable slated for increase is the one with the largest
rate of improvement in z.
 In the example, the rate of improvement in the value of z is
2 for x1 and 3 for x2.
 We thus elect to increase x2 (the variable with the largest rate
of improvement among all nonbasic variables).
 Figure 3.3 shows that the value of x2 must be increased until
corner point B is reached (a candidate for the optimum must
be a corner point).
 At point B, the simplex method will then increase the value
of x1 to reach the improved corner point C, which is the
optimum.
 The path of the simplex algorithm always connects corner
points. In the example, the path to the optimum is
A B C.
 Each corner point along the path is associated with an
iteration. The simplex method always moves alongside the
edges of the solution space, which means that the method
does not cut across the solution space. Eg., the simplex
algorithm cannot go from A to C directly.
Computational details of the Simplex Algorithm
 Simplex method computations are repetitious, tedious,
and voluminous. Solution by hand is rarely done, hence
method is taught in order to understand how and why
the algorithm works.

Remarks.
The simplex tableau offers a wealth of additional information
that include the following:
1. Sensitivity analysis, which deals with determining the
conditions that will keep the current solution unchanged.
2. Post-optimal analysis, which deals with finding a new
optimal solution when the data of the model are changed.
Example
 (Zero coefficients are given to the slack variables in the
objective function because slack variables do not contribute
to z.)
 The constraints constitute a system of m = 3 equations
in n = 5 unknowns. In order to obtain an initial basic
feasible solution, we need to select (n − m) = 5 − 3 = 2
variables as non-basic variables.
 We can readily see in this case that by choosing the two
variables x1 and x2 as the non-basic variables, and setting
their values to zero, then no significant computation is
required in order to solve for the three basic
variables: s1 = 150, s2 = 250, and s3 = 500.
 The value of the objective function at this solution
is 0.
 Once we have a solution, a transition to an adjacent solution
is made by a pivot operation.
 A pivot operation is a sequence of elementary row
operations applied to the current system of equations, with
the effect of creating an equivalent system in which one new
(previously non-basic) variable now has a coefficient of one
in one equation and zeros in all other equations.
 During the process of applying pivot operations to a linear
programming problem, it is convenient to use a tabular
representation of the system of equations. This
representation is referred to as a Simplex tableau.
 In order to conveniently keep track of the value of the
objective function as it is affected by the pivot operations,
we treat the objective function as one of the equations in the
system of equations, and we include it in the tableau.
 In our example, the objective function equation is written as:

 The tableau for the initial solution is as follows:


 The first column lists the current basic variables.
 The second column shows that z is (and will always be) a
basic variable; and because these elements will never
change, they really do not need to be explicitly maintained
in the tableau.
 The next five columns are the constraint coefficients of each
variable. And the last column is the solution vector; that is,
the values of the basic variables.
 Since we want to maximize z, some other (non-basic) term
must decrease in order to offset the increase in z.
 But all of the non-basic variables are already at their lowest
value, zero. Therefore, we want to increase some non-basic
variable that has a negative coefficient.
 As a simple rule, we will choose the variable with the most
negative coefficient, because making this variable basic will
give the largest (per unit) increase in z (Refer to Steps 1 and
2 in the following.)
 The chosen variable is called the entering variable, that is,
the one that will enter the basis. If this variable increases, we
must adjust all of the equations.
 Specifically, increasing the non-basic variable must be
compensated for by using only the one basic variable
in each row (having a coefficient of one).
 If the non-basic coefficient is negative, the corresponding
basic variable increases. There is no limit to how much we
can increase this.
 Clearly, if all coefficients are negative (or zero), then we can
increase the non-basic variable, and hence the value of z,
indefinitely. In this case, we say that the problem is
unbounded, and there is no maximum solution.
 If one or more of the coefficients are positive, then
increasing the entering variable must be offset by a
corresponding decrease in the basic variable.
 Specifically, if aik > 0, for basic variable xi the non-basic
column of xk, then the new value of xi, after xk is increased,
will be

 But xi ≥ 0; therefore, we can increase xk only to that point


where
 Define θi = bi/aik for all equations i for which aik > 0.
Because we want to maximize the increase in xk, we
increase to the point at which some basic variable first
becomes zero (the minimum value of θi).
 That variable now leaves the basis, and is called the leaving
variable. (Refer to Steps 3 and 4 below.)
The Simplex method can be summarized succinctly as follows:
Step 1: Examine the elements in the top row (the objective
function row). If all elements are ≥ 0, then the current
solution is optimal; stop. Otherwise go to Step 2.
Step 2: Select as the non-basic variable to enter the basis that
variable corresponding to the most negative coefficient
in the top row. This identifies the pivot column.
Step 3: Examine the coefficients in the pivot column. If all elements
are
≤ 0, then this problem has an unbounded solution (no optimal
solution); stop. Otherwise go to Step 4.
 This identifies the pivot row and defines the variable that
will leave the basis. The pivot element is the element in the
pivot row and pivot column.
Step 5: To obtain the next tableau (which will represent the new basic
feasible solution), divide each element in the pivot row by the
pivot element. Use this row now to perform row operations
on the other rows in order to obtain zeros in the rest of the
pivot column, including the z row. This constitutes a pivot
operation, performed on the pivot element, for the purpose of
creating a unit vector in the pivot column, with a coefficient of
one for the variable chosen to enter the basis.
o When we apply these steps to the initial tableau in our
example problem, we select x1 (with the most negative
coefficient on the z row) as the entering variable:
We compute

and select the minimum θ = θ1. Therefore, the leaving variable


is the one corresponding to the first basic variable s1.

A pivot operation on the pivot element then produces the next


tableau which shows the new basic feasible solution
 In the next iteration, x2 is chosen as the entering variable.
Based on the ratios θ2 = 250/1 and θ3 = 200/1, we select θ
= θ3, and, therefore, the third basic variable s3 leaves the
basis.
 The pivot element is shown in the previous tableau. A pivot
operation produces the new tableau:
The solution represented by this tableau is

and z is now 2200


 From this tableau, we can now select s1 as the entering
variable. We compute θ1 = 150/1 and θ2 = 50/2, choose θ =
θ2, and, therefore, designate s2 as the leaving variable. The
resulting tableau after a pivot operation is:
o Because all of the objective function row coefficients are
non-negative, the current solution is optimal. The decision
variables are:

and the optimal objective function value, denoted as z*, is:


o The values of the slack variables at optimality also provide
useful information. The slack variable s1 for the first
constraint has a value of 25, indicating that there is a
difference of 25 in the right and left sides of the constraint;
thus, x1 = 125 is 25 less than 150. (This can typically be
interpreted to mean that some resource corresponding to
constraint 1 is not fully consumed at optimality; such a
constraint is sometimes referred to as a nonbinding
constraint.)
o Since s2 and s3 are non-basic and, therefore, have a value of
zero, we can see that the second and third constraints are
met as equalities. (These resources are used to capacity at
optimality, and these constraints are sometimes called
binding constraints.)
Fig.3.4
 If we examine a graphical representation of the feasible
region of this linear programming problem in Fig. 3.4 we
can observe the progression from extreme point A (initial
solution) to extreme point B, then C, and finally the
optimal solution at point D.
 Extreme points F and G are infeasible, and point E is a
basic feasible solution but is not examined by the Simplex
method.
Remark
A review of the steps of the Simplex algorithm and the
rationale behind each step:
 Negative coefficients, corresponding to non-basic variables,
in the objective function row indicate that the objective
function can be increased by making those associated
variables basic (non-zero).
 If in Step 1 we find no negative element, then no change of
basis can improve the current solution. Optimality has been
achieved and the algorithm terminates.
 Otherwise, in Step 2, we select the non-basic variable to
enter the basis that has the greatest potential to improve the
objective function. The elements in the objective
function row indicate the per unit improvement in the
objective function that can be achieved by increasing the
non-basic variables.
 Because these values are merely indicators of potential and
do not reveal the actual total improvement in z, ties are
broken arbitrarily. In actual practice, choosing the most
negative coefficient has been found to use about 20% more
iterations than some more sophisticated criteria.
 The basic variable to be replaced in the basis is chosen, in
Step 4, to be the basic variable that reaches zero first as the
entering variable is increased from zero.
 We restrict our examination of pivot column elements to
positive values only (Step 3) because a pivot operation on a
negative element would result in an unlimited increase in
the basic variable.
 If the pivot column elements are all negative or zero, then
the solution is unbounded and the algorithm terminates
here. Otherwise, a pivot operation is performed as described
in Step 5.

 The Simplex tableau not only provides a convenient means


of maintaining the system of equations during the iterations
of the algorithm, but also contains a wealth of information
about the linear programming problem that is being solved.
Class Exercise
References:

 Hillier, F.S. and G.J. Liebermann, (2001),


Introduction to Operations Research, 7th Edition,
McGraw Hill.

 Carter, M.W., Price, C.C. and Rabadi, G., (2019),


Operations Research: A Practical Introduction,
2nd Edition, Taylor & Francis Group.

Potrebbero piacerti anche