0% found this document useful (0 votes)
2 views44 pages

4. Linear Programming (1)

The document provides an overview of Linear Programming (LP), including its history, assumptions, and formulation techniques. It discusses the mathematical models used in LP, guidelines for model formulation, and examples illustrating the application of LP in optimizing production and resource allocation. Additionally, it covers graphical methods for solving LP problems and the implications of feasible and infeasible solutions.

Uploaded by

Henok Shibabaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views44 pages

4. Linear Programming (1)

The document provides an overview of Linear Programming (LP), including its history, assumptions, and formulation techniques. It discusses the mathematical models used in LP, guidelines for model formulation, and examples illustrating the application of LP in optimizing production and resource allocation. Additionally, it covers graphical methods for solving LP problems and the implications of feasible and infeasible solutions.

Uploaded by

Henok Shibabaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

3/25/2023

University of Gondar

MSc in Construction
Engineering and Management

System Analysis and Management Techniques

Linear Programming

By: Solomon Melaku (PhD.)

March, 2023.

LINEAR PROGRAMMING

History of LP
▪ US Air Force investigate applying mathematical techniques
to military budgeting and planning
▪ George Dantzig proposed LP model
▪ Air Force initiated project SCOOP (Scientific Computing of
Optimum Programs) and SCOOP began in June 1947,
Dantzig and associates developed:
✓ An initial mathematical model of the general linear programming
problem
✓ A general method of solution called the simplex method.

1
3/25/2023

LINEAR PROGRAMMING

Why LP?
▪ Most popular optimization technique

▪ LP software packages are readily available

▪ A lot of work on specialized algorithms for solving specific LP


problems (EXCEL-SOLVER, XPRESS-MP, GAMS, LINDO,
LINGO, AMPL, MINOS,TORA, etc. )

▪ Many problems can be converted to a LP formulation

LP ASSUMPTION

▪ A definite objective that can be mathematically represented in an


equation format exist.

▪ Constraints are always limiting the use of the available resources.

▪ There different alternative or solutions for the problem at hand,


and for each solution there is a specific value for the objective
function.

▪ The preferred solution is the one that optimizes the objective and
satisfies the constraints.

▪ All relationships between variables are linear.

▪ Linear programming assumes confident in all gathered data.


2
3/25/2023

LINEAR PROGRAMMING

▪ Mathematical Model
▪ Decision variables

▪ Linear objective function


✓ Maximization

✓ Minimization

▪ linear constraints
✓ Inequalities LE or GE

✓ Equation =

▪ Non-negativity constraints

LINEAR PROGRAMMING

Guideline for Model Formulation


1. Understand the problem thoroughly.

2. Write a verbal statement of the objective function and each


constraint.

3. Define the decision variables.

4. Describe the objective function in terms of the decision


variables.

5. List the constraints in terms of the decision variables.

3
3/25/2023

STANDARD FORM OF THE MODEL

▪ Maximize Z = c1x1 + c2x2 + c3x3 + ……. + cnxn

▪ Constraints:
s.t. a11x1 + a12x2 +……+ a1nxn ≤ b1
a21x1 + a22x2 +……+ a2nxn ≤ b2
am1x1 + am2x2 +……+ amnxn ≤ bm

▪ Note: b1, b2, … bm Note are non negative RHS values


▪ Non – negative variables
e.g. x1, x2 ≥ 0

GENERAL MATHEMATICAL MODEL OF LP

▪ The general form of allocating resources to activities

▪ Typical resources are money, equipment, personnel, etc.

▪ Sample activities include specific products, investing in particular projects,


shipping goods, etc.

4
3/25/2023

FORMULATION OF LP PROBLEM

▪ Formulation of LP Problems: clearly define the decision


variables objective and constraints, objective, and constraints.

▪ An Example of LP model:
Maximize Z = 2x1 + 3x2 – 3x3
Subjected to:
3x1 - x2 + 2x3 ≤ 7
x1 - 2x3 ≤ 4
2x1 + 2x2 + x3 ≤ 8
3x1 ≤ 5
x1, x2, x3 ≥ 0

OTHER FORMS

1. Minimization problems

✓ Min z = 0.4x1 + 0.5x2

2. Problems with constraints on alternative forms,

▪ The direction of an inequality is reversed by multiplying both


sides by (-1)

3. Problems involving negative RHS variables

▪ Multiplying both sides by (-1), makes the right-hand side positive

5
3/25/2023

GRAPHICAL METHOD

GRAPHICAL METHOD

▪ For a model with only two variables, it is possible to solve the


problem by drawing the feasible region and determining how the
objective function is optimized on that region

▪ Gives you intuition and understanding of linear programming


models and their solution.

Feasible Vs Infeasible Solutions

▪ A feasible solution is a solution for which all the constraints are


satisfied.

▪ An infeasible solution is a solution for which at least one


constraint is violated.

6
3/25/2023

Maximization Example

▪ Product mix problem - Beaver Creek Pottery Company


▪ How many bowls and mugs should be produced to maximize profits
given labor and materials constraints?
▪ Resource Availability: 40 hrs of labor per day, and 120 lbs of clay
▪ Product resource requirements and unit profit:

Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)
Bowl 1 4 40
Mug 2 3 50

Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)

Bowl 1 4 40
Mug 2 3 50

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Function:
Resource 1x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
Non-Negativity x1  0; x2  0
Constraints:

7
3/25/2023

X2 is mugs

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

X1 is bowls

Labor Constraint

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

8
3/25/2023

Labor Constraint Area

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Clay Constraint Area

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

9
3/25/2023

Both Constraints

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Feasible Solution Area

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

10
3/25/2023

Extreme (Corner) Point Solutions

Maximize Z = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Check the feasible solutions for changed objective of


Z = 70x1 + 20x2

11
3/25/2023

EXAMPLE

▪ The WYNDOR GLASS CO. produces high-quality glass products,


including windows and glass doors.
▪ It has three plants. Aluminum frames and hardware are made in
Plant 1, wood frames are made in Plant 2, and Plant 3 produces the
glass and assembles the products.

▪ Because of declining earnings, top management has decided to


revamp the company’s product line. Unprofitable products are being
discontinued, releasing production capacity to launch two new
products having large sales potential:

▪ Product 1: An 8-foot glass door with aluminum framing


▪ Product 2: A 4 6 foot double-hung wood-framed window

EXAMPLE

▪ Product 1 requires some of the production capacity in Plants 1 and


3, but none in Plant2. Product 2 needs only Plants 2 and 3. The
marketing division has concluded that the company could sell as
much of either product as could be produced by these plants.
▪ However, because both products would be competing for the same
production capacity in Plant 3, it is not clear which mix of the two
products would be most profitable. Therefore, an OR team has been
formed to study this question.

12
3/25/2023

EXAMPLE

▪ The OR team began by having discussions with upper management


to identify management’s objectives for the study. These discussions
led to developing the following definition of the problem:

✓ Determine what the production rates should be for the two products in
order to maximize their total profit, subject to the restrictions imposed by
the limited production capacities available in the three plants. (Each
product will be produced in batches of 20, so the production rate is defined
as the number of batches produced per week.) Any combination of
production rates that satisfies these restrictions is permitted, including
producing none of one product and as much as possible of the other.

EXAMPLE

▪ The OR team also identified the data that needed to be gathered:


1) Number of hours of production time available per week in each plant for
these new products. (Most of the time in these plants already is committed
to current products, so the available capacity for the new products is quite
limited.)
2) Number of hours of production time used in each plant for each batch
produced of each new product.
3) Profit per batch produced of each new product. (Profit per batch produced
was chosen as an appropriate measure after the team concluded that the
incremental profit from each additional batch produced would be roughly
constant regardless of the total number of batches produced. Because no
substantial costs will be incurred to initiate the production and marketing of
these new products, the total profit from each one is approximately this
profit per batch produced times the number of batches produced.)

13
3/25/2023

EXAMPLE

▪ Obtaining reasonable estimates of these quantities required enlisting


the help of key personnel in various units of the company. Staff in
the manufacturing division provided the data in the first category
above. Developing estimates for the second category of data
required some analysis by the manufacturing engineers involved in
designing the production processes for the new products. By
analyzing cost data from these same engineers and the marketing
division, along with a pricing decision from the marketing division,
the accounting department developed estimates for the third
category.
▪ Table below summarizes the data gathered.
▪ The OR team immediately recognized that this was a linear
programming problem of the classic product mix type, and the team
next undertook the formulation of the corresponding mathematical
model

EXAMPLE

▪ The gathered data for the problem

14
3/25/2023

EXAMPLE

Formulation as a Linear Programming Problem


To formulate the mathematical (linear programming) model for this
problem, let:
X1: number of batches of product 1 produced per week
X2: number of batches of product 2 produced per week
Z total profit per week (in thousands of dollars) from producing these
two products

Thus, x1 and x2 are the decision variables for the model. Using the
bottom row of Table, we obtain

Max. Z = 3x1 + 5x2

EXAMPLE

To summarize, in the mathematical language of linear programming,


the problem is to choose values of x1 and x2 so as to:

Maximize Z = 3x1 + 5x2

subject to the restrictions


x1  4
2x2  12
3x1 + 2x2  18
And
x1  0, x2  0

15
3/25/2023

EXAMPLE

Graphical Solution

EXAMPLE

Graphical Solution – Optimal Solution

16
3/25/2023

EXAMPLE

The Wyndor Glass Co. problem would have no feasible solutions if the
constraint 3x1 + 5x2  50 were added to the problem.

EXAMPLE

The Wyndor Glass Co. problem would have Multiple Optimal solutions if the
objective function were changed to Z = 3x1 + 2x2

17
3/25/2023

EXAMPLE

The Wyndor Glass Co. problem would have No Optimal solutions if the only
functional constraint were x1  4, because x2 then could be increased
indefinitely in the feasible region without ever reaching the maximum value of
Z = 3x1 + 5x2

NOTES

▪ As in this case, any problem having multiple optimal solutions will have an
infinite number of them, each with the same optimal value of the objective
function.
▪ Another possibility is that a problem has no optimal solutions. This occurs only
if (1) it has no feasible solutions or (2) the constraints do not prevent improving
the value of the objective function (Z) indefinitely in the favorable direction
(positive or negative). The latter case is referred to as having an unbounded Z.
▪ A corner-point feasible (CPF) solution is a solution that lies at a corner of the
feasible region.
▪ Relationship between optimal solutions and CPF solutions: Consider any
linear programming problem with feasible solutions and a bounded feasible
region. The problem must possess CPF solutions and at least one optimal
solution. Furthermore, the best CPF solution must be an optimal solution.
▪ If a problem has exactly one optimal solution, it must be a CPF solution.
▪ If the problem has multiple optimal solutions, at least two must be CPF
solutions.

18
3/25/2023

EXAMPLE – 1: LP MODEL FORMULATION

GRAPHICAL METHOD

▪ Problem is to maximize revenue from two crops, given


constraints on available land and capital

▪ LP model formulation:

▪ OF max. Z = 2x1 + x2 ( maximize the net benefit)

s.t. 3x1 + x2 <= 300 (limit on total cost)

x1 + x2 <= 200 (limit on land)

x1 >= 0, x2 >= 0 (cannot plant a negative area)

19
3/25/2023

SOLUTION

▪ In general, the optimal solution lies at one of the corner


points of the feasible region.

SOLUTION (SOME NOTES)

▪ Map the feasible region (region OAPD)


▪ A corner-point feasible (CPF) solution is a solution that lies at a
corner of the feasible region.
▪ Any point within or on the boundary of the feasible region is a
feasible solution
▪ Solutions:
✓ P (0,200) Z = 200
✓ P(50,150) Z = 250
✓ P (100,0 ) Z = 200
✓ P(0,0) Z = 0
▪ An optimal solution is a feasible solution that has the most
favorable value of the objective function. (largest value for
maximization and the smallest value for minimization problems).

20
3/25/2023

SOLUTION (SOME NOTES)

▪ Plot the objective function, Z, on the same graph.

▪ Determine the direction for moving Z within the feasible range

▪ Shift the objective function line in the direction of improvement until


it last intersected the feasible region

▪ Consider a line for the OF for an arbitrary value of c

▪ Say c=40

▪ P(50,150) is the farthest point from the origin representing the


optimal solution Z=250

LP SOLUTIONS

▪ Whenever a linear programming model is formulated and


solved, the result will be one of four characteristic solution
types:
▪ 1) unique optimal solution,

▪ 2) alternate optimal solutions,

▪ 3) no-feasible solution, and

▪ 4) unbounded solutions.

21
3/25/2023

UNIQUE OPTIMAL SOLUTION

ALTERNATE OPTIMAL SOLUTION

▪ The intersection of the objective function line and the feasible


region at optimality becomes a line segment

22
3/25/2023

NO FEASIBLE SOLUTION

▪ This may occur when


constraints conflict with one
another. (over constrained)

▪ Assume the following set of


constraints

▪ 5x1 + 5x2 ≤ 50

▪ x1 ≥ 8

▪ x2 ≥ 6

▪ No feasible region formed

UNBOUNDED SOLUTION

▪ A situation where the problem is under constrained.

▪ Assume the following set of constraints

▪ 5x1 + 5x2 ≥ 50

▪ x1≤ 8

▪ x1≥ 6

23
3/25/2023

EXAMPLE 3

▪ An aggregate mix of sand and gravel must contain no less than


20% no more than 30% of gravel. The in situ soil contains 40%
gravel and 60% sand. Pure sand may be purchased and shipped to
site at 5 units of money/m3. A total mix of at least 1000 m3 is
required. There is no charge for using in situ material.

▪ The objective is to minimize the cost

▪ Draw the feasible region

▪ Determine the optimum solution by the graphical method

SOLUTION

▪ Total quantity of material needed = 1000 m3


▪ Min. quantity of gravel in the mix = 0.20 x 1000 = 200 m3
▪ Max. quantity of gravel in the mix = 0.30 x 1000 = 300 m3
▪ Let the decision variables be as follows:
✓ x1 : Quantity of material from in situ
✓ x2 : Quantity of material from outside
▪ The objective is to minimize the cost, z,
✓ Min z = 5*x2
▪ The constraints are:
✓ x1 + x2 ≥ 1000
✓ 0.4x1 ≥ 200
✓ 0.4x1 ≤ 300
✓ x1, x2 ≥ 0

24
3/25/2023

SOLUTION

▪ Optimum solution:
✓ x1 = 750
✓ x2 = 250
▪ Amount of gravel = 300m3
from in situ
▪ Amount of sand = 700 m3;
450 m3 from in situ and
250 m3 from outside.

25
3/25/2023

EXERCISE

1. Min Z = 11x1 + 3x2


Subject to 4x1 + x2 ≥ 12
2x1 + 2x2 ≤ 18
4x1 - 5x2 ≤ 0
x 1, x 2 ≥ 0
2. Maximize Z = 3x1 + 2x2
2x1 + 3x2 ≤ 9
10x1 + 2x2 ≤ 20
x 1, x 2 ≥ 0
3. Maximize Z = 40x1 + 100x2
12x1 + 6x2 ≤ 3000
4x1 + 10x2 ≤ 2000
2x1 + 3x2 ≤ 900
x 1, x 2 ≥ 0
51

SIMPLEX METHOD

26
3/25/2023

INTRODUCTION TO SIMPLEX METHOD

▪ Inequalities has to be transformed into equality before


feasibility solution calculation
▪ From linear programing, non negative feasible solutions are
expected

Maximize ( or minimize) Z = ∑cjxj , j =1,2,3,…,n


Subject to
∑aijxj ( ≤ ≥ = ) bi, i = 1,2,3, …m
Xj ≥ 0
The constants of bi is assumed non negative!!!!

INTRODUCTION TO SIMPLEX METHOD

▪ A linear constraint of the form ∑aijxj ( ≤ ≥ = ) bi can be converted


into equality by adding or subtracting new non negative variable in
to the left hand side of the inequality.

▪ The new variable is known as the slack variable (Loose) added left
in the process of satisfying the objective function in ≤ (Sj or Xj or
any letter)

▪ Conversion from ≥ to = is achieved by subtracting a nonnegative


surplus variable from the left-hand side of the inequality (Excess)

▪ Artificial Variables for = signs (which show no loss or gain)

27
3/25/2023

Algebraic Form Preparation for Simplex Method Demonstration

▪ max 𝐙 = 2x1 + 3x2 +0S1 +0S2


• 𝐌ax 𝐙 = 2x1 + 3x2 S.T
S.T 2𝑥1 + 𝑥2 + 𝑺1 = 4
2𝑥1 + 𝑥2 ≤ 4 𝑥1 + 2𝑥2 + 𝑺2 = 5

𝑥1 + 2𝑥2 ≤ 5 𝑥1 , 𝑥2 , 𝑆1, 𝑆2 ≥ 0

𝑥1 , 𝑥2 ≥ 0
▪ What will be the surpluses
direction
If the sign in equations was ≥ sign?

EXAMPLE OF LP

▪ Maximize 5x1 + 7x2


✓ s.t. x1 ≤ 6
2x1 + 3x2 ≤ 19
x 1 + x2 ≤ 8
x 1 , x2 ≥ 0
▪ Standard form with equality constraints:
✓ Max. 5x1 + 7x2 + 0s1 + 0s2 + 0s3
✓ s.t. x1 + s1 = 6
2x1 + 3x2+ s2 = 19
x1 + x2 + s3 = 8
x1, x2, s1, s2, s3 ≥ 0

28
3/25/2023

Demonstration

▪ 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 non-negative.

Multiplying both sides of the


equation by -1, if necessary.
Then sign of equations
basically changed

PROPERTIES OF THE CPF SPLUTIONS

▪ If there is exactly one optimal solution, then it must be a CPF


solution.

▪ If there are multiple optimal solutions, then at least two must be


adjacent CPF feasible solutions.

▪ There are only a finite number of CPF solutions.

▪ If a CPF solution has no adjacent CPF solution that are better as


measured by the objective function, then there are no better CPF
solutions anywhere; i.e., it is optimal.

29
3/25/2023

SIMPLEX METHOD

▪ Extreme point (or Simplex filter) theorem:

▪ If the maximum or minimum value of a linear function defined over


a polygonal convex region exists, then it is to be found at the
boundary of the region.

▪ General Simplex LP model:

▪ min (or max) z = Σ ci xi Simplex only deals


▪ s.t. Ax = b with equalities
x≥0

STANDARD FORM

▪ A total of n+m variables (n decision variables and m slack


variables) and a constraint set of m equations

▪ These equations can be solved uniquely for any set of m variables

▪ Simplex method: the starting solution start by assuming all


decision variables to be zero => Z=0

▪ Iterations are performed on this starting solution for better values


of OF till optimality reached.

30
3/25/2023

SOME DEFINITIONS

▪ Basic feasible solution: Assume there are a total of n + m


variables (n decision and m slack variables). Then a basic
solution is one that has m number of basic variables and n
number of non-basic variables. All non basic variables are
zeros.
▪ Basic feasible solution: a basic solution which is also
feasible is a basic feasible solution.

The Algebra Of The Simplex Method

▪ Constraint boundaries
▪ Feasible region
X2 ▪ Corner-point feasible (CPF)
(0,9)
solutions
▪ Adjacent CPF solutions
(0,6) (2,6) (4,6)
▪ Edges of the feasible region

(4,3) Optimality test in the Simplex


Method:
If a CPF solution has no adjacent
(0,0) (4,0) (6,0) solutions that are better, then it must
X1 be an optimal solution

31
3/25/2023

GENERAL STRUCTURE OF THE SIMPLEX METHOD

▪ In any linear programming problem that possesses at least one


optimal solution, if a CPF solution has no adjacent CPF solutions
that are better (as measured by the objective function), then it must
be an optimal solution.

THE SIMPLEX METHOD IN TABULAR FORM

The tabular form of the simplex method records only the essential
information, namely,
(1) the coefficients of the variables
(2) the constants on the right-hand sides of the equations and
(3) the basic variable appearing in each equation.

The tabular form of the simplex method uses a simplex tableau to


compactly display the system of equations yielding the current BF
solution.

32
3/25/2023

THE SIMPLEX METHOD IN TABULAR FORM

The steps of the simplex method are


1. Determine a starting basic feasible solution.
2. Select an entering variable using the optimality
condition. Stop if there is no entering variable; the last
solution is optimal. Else, go to step 3.
3. Select a leaving variable using the feasibility condition.
4. Determine the new basic solution by using the
appropriate Gauss-Jordan computations. Go to step 2.

ENTERING AND DEPARTING VARIABLE

▪ Entering variable: the variable entering the basis is the one with
the most negative coefficient in the z-row. It will contribute to the
increase of OF most.

▪ The one basic variable to leave is the one which gives the
minimum ratio test by applying those pivot column coef. That are
strictly positive..

33
3/25/2023

THE SIMPLEX METHOD IN TABULAR FORM

Mathematical Procedures
Use the simple Gauss-Jordan row operations
1. Pivot row
a. Replace the leaving variable in the Basic column with the entering
variable.

New pivot row = Current (Old) pivot row ÷ Pivot element

a. All other rows, including z

New row = (Old row) - (Corresponding pivot column coefficient) X


(New pivot row)

Constructing the initial simplex table

cj c1 c2 c3 c4 c5

CB Basic x1 x2… S1 S2 A1… RHS Ratio


variable
0 S1

0 S2

0 S3
Zj
Cj - Zj

34
3/25/2023

Maximization Problem

cj c1 c2 c3 c4 c5

CB Basic x1 x2… S1 S2… A1… RHS Ratio


variable
0 S1
0 S2
0 S3
Zj
Cj - Zj

Zj Row
• The Zj-value under b-column represents the current profit.
• Other values in the Zj row represent the amount by which contribution
(profit) would be reduced if one unit of the corresponding variable x1, x2 etc
was added to the basis column.
• They represent the contribution lost per unit of the variables.

Maximization Problem

cj c1 c2 c3 c4 c5

CB Basic x1 x2… S1 S2… S3… RHS Ratio


variable
0 S1
0 S2
0 S3
Zj
Cj - Zj

The Cj - Zj row
• The Cj - Zj row is called a base row or the Net Evaluation Row (NER).
• Coefficients in this row represent the net marginal improvement in the value of the
objective function Z for each unit of the respective column variable introduced into
the solution.
• This row determines whether the current solution is optimal or not.

35
3/25/2023

Cj - Zj row Maximization Problem Minimization Problem

the profit will be increased if a


Positive coefficient in the cost will be increased if a
unit of a corresponding
the Cj - Zj indicate the unit of a corresponding variable
variable is introduced into the
amount by which is introduced into the solution
solution
the profit will be decreased if
Negative coefficient in the cost will be decreased if a
a unit of a corresponding
the Cj - Zj indicate the unit of a corresponding variable
variable is introduced into the
amount by which is introduced into the solution
solution

The current solution is


optimal if the values in
Negative or zero Positive or zero
the Cj - Zj are

EXAMPLE

Max 5x1 + 4x2


S.t
6X1 + 4x2 ≤ 24
1x1 + 2x2 ≤ 6
-1x1 + x2 ≤ 1
x2 ≤ 2
X1, x2 ≥ 0

36
3/25/2023

Example of Simplex Method Tabular Form

Pivot Column (entering variable)

Cj 5 4 0 0 0 0 RHS Ratio
β x1 x2 S1 S2 S3 S4
Pivot Row 24/6 =
0 S1 6 4 1 0 0 0 24 4
leaving Variable
Initial 0 S2 1 2 0 1 0 0 6 6/1 =6

Iteration 1/-1
0 S3 -1 1 0 0 1 0 1 (ignore

Pivot element 0 S4 0 1 0 0 0 1 2 2/0 ignore

zj 0 0 0 0 0

cj-zj 5 4 0 0 0
Pivot column coefficient

New pivot row = Current pivot row ÷ Pivot element


New other row = (Old row) - (Corresponding pivot column coefficient) X (New pivot row)

Cj 5 4 0 0 0 0 RHS
β x1 x2 S1 S2 S3 S4
0 S1 6 4 1 0 0 0 24
0 S2 1 2 0 1 0 0 6
Initial Iteration 0 S3 -1 1 0 0 1
X1 entering row0=leaving row/pivot
1 element
0 S4 0 1 0 0 0 1 2
zj 0 0 0 0 0 x4 - (its coefficint* x1 entering row)
x4 = old
cj-zj 5 4 0 0 0
x5 = old x5 - (its coefficint* x1 entering row)
Cj 5 4 0 0 0 0 RHS ǿ
β x1 x2 S1 S2
x6S3= old x6 S4
- (its coefficint* x1 entering row)
5 x1 1 2/3 1/6 0 0 0 4 6
0 S2 0 1 1/3 - 1/6 1 0 0 2 1 1/2
Initial Iteration 2
0 S3 0 1 2/3 1/6 0 1 0 5 3
0 S4 0 1 0 0 0 1 2 2
zj 5 3 1/3 5/6 0 0 0 20
cj-zj 0 2/3 - 5/6 0 0 0

Cj 5 4 0 0 0 0 RHS ǿ
β x1 x2 S1 S2 S3 S4
5 x1 1 0 1/4 - 1/2 0 0 3
4 x2 0 1 - 1/8 3/4 0 0 1 1/2
Initial Iteration 3
0 S3 0 0 3/8 -1 1/4 1 0 -2 1/2
0 S4 0 0 1/8 - 3/4 0 1 1/2
zj 5 4 3/4 1/2 0 0 21
cj-zj 0 0 - 3/4 - 1/2 0 0

37
3/25/2023

PROBLEM

Max. 6x1 + 5x2

S.T
X1 + x2 ≤ 5
3x1 + 2x2 ≤ 12
X1, x2 ≥ 0

PROBLEM

Max 6x1 + 5x2 Max z = 6x1 + 5x2 0S1 + 0S2


S.t S.t
X1 + x2 ≤ 5 X1 + x2 + S1 = 5
3x1 + 2x2 ≤ 12 3x1 + 2x2 + S2 = 12
X1, x2 ≥ 0 X1, x2, S1, S2 ≥ 0
New other row = (Current row) - (pivot column coefficient) X (New pivot row)
element
Cj 6 5 0 0 RHS ǿ
β x1 x2 S1 S2
0 S1 1 1 1 0 5 5
Initial Iteration
0 S2 3 2 0 1 12 4
zj 0 0 0 0 0
cj-zj 6 5 0 0

38
3/25/2023

Cj 6 5 0 0 RHS ǿ
β x1 x2 S1 S2
NW = old -
Initial Iteration 1 0 S1 0 1/3 1 - 1/3 1 coef*pr
6 x1 1 2/3 0 1/3 4 PR =old/pc
zj 6 4 0 2 24
cj-zj 0 1 0 -2

Cj 6 5 0 0 RHS ǿ
β x1 x2 S1 S2
0 S1 0 1/3 1 - 1/3 1 3
Initial Iteration 1
6 x1 1 2/3 0 1/3 4 6
zj 6 4 0 2 24
cj-zj 0 1 0 -2

Cj 6 5 0 0 RHS ǿ
β x1 x2 S1 S2
5 x2 0 1 3 -1 3
Initial Iteration 2
6 x1 1 0 -2 1 2
zj 6 5 3 1 27
cj-zj 0 0 -3 -1

CLASS ACTIVITY

Find solution using Simplex method


MAX Z = 5x1 + 10x2 + 8x3
subject to
3x1 + 5x2 + 2x3 <= 60
4x1 + 4x2 + 4x3 <= 72
2x1 + 4x2 + 5x3 <= 100
and x1,x2,x3 >= 0

39
3/25/2023

Exercise

▪ Find all basic feasible solutions of the following system:


Max Z = 5x1 + 6x2
S.t. 4x1 + 2x2 ≤ 200
x1 + 3x2 ≤ 150
x1≥ 0 x2≥ 0

▪ Min. Z = 2X1 – 3X2 + 6X3


Subjected to:
3X1 – X2 + 2X3 ≤ 7
2X1 + 4X2 ≤ -12
-4X1 + 3X2 + 8X3 ≥ 10
X1, X2, X3 ≥ 0

SPECIAL CASES

40
3/25/2023

CASES FOR A TIE

▪ Entering variable: If two non basic variables have the same


most-negative (Non negative) coefficients in the Z-row in
any iteration, there is a tie for the entering variable.

▪ The tie can be broken by arbitrarily choosing anyone


variable as the entering variable as the optimal solution will
be reached eventually regardless of the variable chosen.

EXAMPLE FOR A TIE

▪ Max x1 + x2

S.t. 2x1 + x2 ≤ 4

x1 + 2x2 ≤ 3

x1 ≥ 0; x2 ≥ 0

41
3/25/2023

MULTIPLE SOLUTIONS

▪ Multiple solutions are alternate solutions to a problem yielding the


same optimum value of the OF.

▪ Existence of multiple solution is indicated by the presence of a


zero in the z-row under a non-basic variable in the final simplex
table giving optimal solution.

▪ The alternate solution is obtained by choosing this non basic


variable as the entering variable, and finding a new solution in the
next iteration.

EXAMPLE

▪ Max. x1+1/2x2

S.t. 2x1 + x2 ≤ 4

x1 +2x2 ≤ 3

x1 ≥ 0; x2 ≥ 0

42
3/25/2023

CASES FOR A TIE

▪ Departing variable: If the ratio is the same between two rows, and
is also the minimum among the ratios for all rows, there is a tie for
the departing variable. Here also, any one variable can be
arbitrarily selected as the departing variable. This results in a
degenerate solution.

▪ Degeneracy reveals that there is at least one redundant constraint.

▪ Unfortunately, on some examples, degeneracy may lead to


cycling, i.e. a sequence of pivots that goes through the same
tableaus and repeats itself indefinitely. “cycling”)

EXAMPLE

▪ Max. 2x1 +x2


S.t. 3x1 + x2 ≤ 6
x1 -x2 ≤ 2
x2 ≤ 3
x1 ≥ 0; x2 ≥ 0

43
3/25/2023

44

You might also like