Vous êtes sur la page 1sur 75

PAN African e Network Project

DBM
Quantitative Techniques in Management

Semester - 1
Session - 9

Dr. Sarika Jain

OPERATION RESEARCH

Management Science
is the study and development of
techniques for the formulation and
analysis of management and related
business problems. Operations research
models are often helpful in this process.

Right-Hand Side (RHS)


are the numbers (parameters) located on
the right-hand side of the constraints. In a
production problem these parameters
typically indicate the amount, or quantity,
of resources available. In the conventional
literature these are known as the bs.

Objective Coefficients
are the coefficients of the variables in the
objective function. In a production
problem these typically represent unit
profit or unit cost. In the conventional
literature these are known as the cs.

Technological Coefficients
also known as exchange coefficients,
these are the coefficients of the variables
in the constraints. In a production problem
these typically represent the unit resource
requirements. In the conventional
literature these are known as the as.

Canonical Form
refers to an LP problem with an objective
function, all of the variables are nonnegative and where all of the variables
and their coefficients are on the left-hand
sides of the constraints, and all of the
parameters are on the right-hand sides of
the constraints.

Standard Form
refers to an LP problem in canonical form.
In addition, all of the constraints are
expressed as equalities and every variable
is represented in the same order of
sequence on every line of the linear
programming problem.

Redwood Furniture Company


Resource Unit Requirements

Amount
Available

Table

Chair

Wood

30

20

300

Labor

10

110

Unit
Profit

Redwood Problem Formulation


Let:

XT = number of tables produced

XC = number of chairs produced

MAX Z = 6 XT + 8 XC
s.t.

30 XT + 20 XC < 300

5 XT + 10 XC < 110
where: XT, XC > 0

Graphical LP Solution
Procedure
1)
2)
3)
4)
5)
6)
7)
8)

Formulate the LP problem


Plot the constraints on a graph
Identify the feasible solution region
Plot two objective function lines
Determine the direction of improvement
Find the most attractive corner
Determine the coordinates
Find the value of the objective function

Redwood Furniture Problem


XT = 4 tables
XC = 9 chairs
P = 6(4) + 8(9) = 96
dollars

Exercises:
Use the graphical solution procedure to
determine the optimal solutions for the
following linear programming problems.
For each, show the feasible solution
region, the direction of improvement, the
most attractive corner, and solve for the
decision variables and the objective
function.

Problem #1
MIN Z = 3A 2B
s.t. 5A + 5B > 25
3A < 30
6B < 18
3A + 9B < 36
where: A, B > 0

A=2
B=3
Z=0

Problem #2
MAX Z = 6X 3Y
s.t. 2X + 2Y < 20
6X > 12
4Y > 4
4X + Y < 20
where: X, Y > 0

X = 19/4
Y=1
Z = 51/2

Problem #3
MAX Z = 5S 5T
s.t. 3T < 18
4S + 4T < 40
2S < 14
6S - 15T < 30
3S > 9
where: S, T > 0

S=7
T = 4/5
Z = 31

Special LP Cases
For each of the following problems use the
graphical solution procedure to try to
determine the optimal solutions. You may
find it difficult to proceed in some cases,
and in all cases the results are interesting.
In each case proceed as far as you can.

Special Case #1
MAX Z = 4X1 + 3X2
s.t.

5X1 + 5X2 < 25


X2 > 6
X2 < 8

where: X1, X2 > 0

INFEASIBLE Problem

Special Case #2
MAX Z = 4X1 + 3X2
s.t.

5X1 + 5X2 > 25


X2 < 6
X2 < 8

Redundant
Constraint

where: X1, X2 > 0

UNBOUNDED Problem

Special Case #3
MAX Z = 4X1 + 4X2
s.t.

5X1 + 5X2 < 25


X2 < 4
X1 < 3

where: X1, X2 > 0

X1= 3
X2 = 2
Z = 20
X1= 1
X2 = 4
Z = 20

Multiple Optimal Solutions

Formulating LP Problems
As is true with most forms of decision
modeling, the most difficult aspect is
defining the problem. Once the problem is
defined the rest of the decision process
follows relatively easily. Formulate the
following as linear programming problems:

Problem #1
Acme Widgets produces four products: A, B, C and D. Each unit of
product A requires 2 hours of milling, one hour of assembly and $2
worth of in-process inventory. Each unit of product B requires one
hour of milling, 3 hours of assembly and $5 worth of in-process
inventory. Each unit of product C requires 2 1/2 hours of milling, 3 1/2
hours of assembly and $4 worth of in-process inventory. Finally, each
unit of product D requires 5 hours of milling, no assembly time and
$16 worth of in-process inventory. The firm has 1,200 hours of milling
time and 1,300 hours of assembly time available. Each unit of
product A returns a profit of $40; each unit of B has a profit of $36;
each unit of product C has a profit of $24; and each unit of product D
has a profit of $48. Not more than 120 units of product A can be sold
and not more than 96 units of product C can be sold. Any number of
units of products B and D may be sold. However, at least 100 units of
product D must be produced and sold to satisfy a contract
requirement. It is otherwise assumed that whatever is produced can
be sold. Formulate the above as a linear programming problem to
maximize profits to the firm.

Problem #2
The Thrifty Loan Company is planning its operations for the next year.
The company makes five types of loans. The loans are listed along
with the annual return on the loans:

Legal requirements and company policy place the following limits upon
the various types of loans:
Signature loans cannot exceed 10% of the total amount of loans. The
amount of signature and furniture loans together cannot exceed 20% of
the total amount of loans. First mortgages must be at least 40% of the
total mortgages and at least 20% of the total amount of loans. Second
mortgages may not exceed 25% of the total amount of loans. The firm
can lend a maximum of $1.5 million.
Formulate the above as a linear programming problem to maximize the
revenues from loans.

Problem #3
Roscoe owns a used furniture store. He has 500 square feet of
floor space available for new purchases. The following pieces
of furniture are available to him:

Roscoe does not want to stock more sofas than beds. For
each patio set stocked he wants to have at least one of
everything else. He has $450 allocated for these
purchases. Formulate the above as a linear programming
problem to maximize Joe's profit from his purchases.

Problem #4
The marketing department for Omni World Enterprises would like to allocate next year's
advertising budget among the various media to maximize the return to the firm. The
year's expenditures for advertising are not to exceed $2 million, with not more than
$1.1 million spent during the first six months. The media used are newspapers,
magazines, radio and television. Spending on the different media is restricted by the
following company policies:
1.
At least $200,000 is to be spent on newspapers and magazines combined in each
half of the year.
2.
At most, 80% of the advertising expenditures are to be spent on television in each
six-month period.
3.
At least $50,000 is to be spent on radio for the year.
4.
At least 25% of the advertising expenditures on television are to be spent in the
second six-month period.
Returns from a dollar spent on advertising in each medium are as follows:

Formulate a linear programming problem for Omni's advertising budget.

Linear Programming
The Simplex Method

What is Linear Programming?


...finding the maximum or minimum of
linear functions in which many variables are
subject to constraints.
A linear program is a problem that requires
the minimization of a linear form subject to
linear constraints...

Important Note
Linear programming requires linear
inequalities
In other words, first degree inequalities
only! Good: ax + by + cz < 3
Bad: ax2 + log2y > 7

Brief History
Was not prominent until around 1947
Emerging computers made mathematical
modeling in decision making attractive.

Lets look at an example...

Farm that produces Apples (x) and Oranges (y)


Each crop needs land, fertilizer, and time.
6 acres of land: 3x + y < 6
6 tons of fertilizer: 2x + 3y < 6
8 hour work day: x + 5y < 8
Apples sell for twice as much as oranges
We want to maximize profit (z): 2x + y = z
We can't produce negative: x > 0, y > 0

Traditional Method
x = 1.71
y = .86
z = 4.29

Graph the inequalities


Look at the line we're trying to maximize.

Problems...
More variables?
Cannot eyeball the answer?

Simplex Method
George B. Dantzig in 1951
Need to convert equations
Slack variables

Performing the Conversion


-z
s1

+ 2x + y = 0 (Objective Equation)
+ x + 5y = 8

+ 2x + 3y = 6

s2

s3 + 3x + y = 6

Initial feasible solution

The Essence
Simplex method is an algebraic procedure
However, its underlying concepts are
geometric
Understanding these geometric concepts
helps before going into their algebraic
equivalents

Example: Wyndor Glass

Constraint boundaries
Feasible region
Corner-point solutions
Corner-point feasible (CPF)
solutions
Adjacent CPF solutions
Edges of the feasible region

X2
(0,9)

(0,6)

(2,6)

(4,6)

(4,3)

(0,0)

(4,0)

(6,0)

X1

Optimality test in the Simplex


Method:
If a CPF solution has no
adjacent solutions that are
better, then it must be an
optimal solution

The Simplex Method in a


Nutshell
An iterative
procedure

Initialization
(Find initial CPF solution)

Is the
current
CPF
solution
No
optimal?
Move to a better
adjacent CPF solution

Yes

Stop

Solving Wyndor Glass

X2

(0,6)
Z=30

(2,6)
Z=36

(4,3)
Z=27

(0,0)

(4,0)

Z=0

Z=12

X1

Initial CPF
Optimality test
If not optimal, then move to a
better adjacent CPF solution:
Consider the edges that
emanate from current CPF
Move along the edge that
increases Z at a faster rate
Stop at the first constraint
boundary
Solve for the intersection of
the new boundaries
Back to optimality test

Key Concepts

Focus only on CPF solutions


An iterative algorithm
If possible, use the origin as the initial CPF solution
Move always to adjacent CPF solutions
Dont calculate the Z value at adjacent solutions, instead
move directly to the one that looks better (on the edge
with the higher rate of improvement)
Optimality test also looks at the rate of improvement
(If all negative, then optimal)

Language of the Simplex


Method

Initial Assumptions
All constraints are of the form
All right-hand-side values (bj, j=1, ,m)
are positive

The Augmented Form


Set up the method first:
Convert inequality constraints to equality constraints by
adding slack variables

Augmented Form

Original Form

Maximize

Maximize Z = 3x1+ 5x2

subject to

x1

4
2x2 12

3x1+ 2x2 18

x1,x2 0

subject to

Z = 3x1+

x1

5x2

+s1

2x2 + s2= 12
3x1+2x2 + s3 = 18

x1,x2 0

=4

X2

Basic and Basic Feasible Solutions


Augmented Form

(0,9,4,-6,0)

Maximize

Z=

subject to

3x1+
x1

+s1

3x1+

(0,6,4,0,6)

(2,6,2,0,0)

(2,3,2,6,6)

(4,6,0,0,-6)

(4,3,0,6,0)

(0,2,4,8,14)
(0,0,4,12,18)

(4,0,0,12,6)

5x2

2x2
2x2

+s2
+s3

=4
= 12
= 18

x1,x2, s1, s2, s3 0

Augmented solution

Basic infeasible solution

Basic feasible solution (BFS)

Nonbasic feasible solution

(6,0,-2,12,0)

X1

Basic, Nonbasic Solutions and the Basis


In an LP, number of variables > number of equations
The difference is the degrees of freedom of the system
Can set some variables (# = d.f.) to an arbitrary value
(simplex uses 0)
These variables (set to 0) are called nonbasic variables
The rest can be found by solving the remaining system
The basis: the set of basic variables
If all basic variables are 0, we have a BFS
Between two basic solutions, if their bases are the same
except for one variable, then they are adjacent

Basis Examples: Wyndor Glass


Maximize
subject to

Z = 3x1+ 5x2
x1
2x2
3x1+ 2x2

+s1
+s2

=4
= 12
+s3 = 18

x1,x2, s1, s2, s3 0

If the basis was:


(x1,x2,s1)
(x1,x2,s2)
(s1,s2,s3)

Which ones are BFS? Which pairs are adjacent?

Algebra of the Simplex Method


Initialization
Maximize
subject to

Z = 3x1+ 5x2
x1
2x2
3x1+ 2x2

+s1
+s2

=4
= 12
+s3 = 18

x1,x2, s1, s2, s3 0

Find an initial basic feasible solution


Remember from key concepts:
If possible, use the origin as the initial CPF solution
Equivalent to:
Choose original variables to be nonbasic (xi=0, i=1,n) and let
the slack variables be basic (sj=bj, j=1,m))

Algebra of the Simplex Method


Optimality Test
Maximize
subject to

Z = 3x1+ 5x2
x1
2x2
3x1+ 2x2

+s1
+s2

=4
= 12
+s3 = 18

x1,x2, s1, s2, s3 0

Are any adjacent BF solutions better than the current one?


Rewrite Z in terms of nonbasic variables and investigate rate of
improvement
Current nonbasic variables:
Corresponding Z:

Optimal?

Algebra of the Simplex Method


Step 1 of Iteration 1: Direction of Movement
Maximize
subject to

Z = 3x1+ 5x2
x1
2x2
3x1+ 2x2

+s1
+s2

x1,x2, s1, s2, s3 0

=4
= 12
+s3 = 18

Which edge to move on?


Determine the direction of movement by selecting the entering
variable (variable entering the basis)
Choose the direction of steepest ascent
x1: Rate of improvement in Z =
x2: Rate of improvement in Z =

Entering basic variable =

Algebra of the Simplex Method


Step 2 of Iteration 1: Where to Stop
Maximize

Z = 3x1+ 5x2

subject to

x1
2x2
3x1+ 2x2

+s1
+s2

=4
= 12
+s3 = 18

(1)
(2)
(3)

x1,x2, s1, s2, s3 0


How far can we go?
Determine where to stop by selecting the leaving variable (variable
leaving the basis)
Increasing the value of x2 decreases the value of basic variables
The minimum ratio test

Constraint (1):
Constraint (2):
Constraint (3):

Leaving basic variable =

Algebra of the Simplex Method


Step 3 of Iteration 1: Solving for the New BF Solution
Z-

3x1- 5x2
x1
2x2
3x1+ 2x2

=0
+s1
+s2

=4
= 12
+s3 = 18

(0)
(1)
(2)
(3)

Convert the system of equations to a more proper form for the


new BF solution
Elementary algebraic operations: Gaussian elimination
Eliminate the entering basic variable (x2) from all but its
equation

Algebra of the Simplex Method


Optimality Test
Z-

3x1+

+ 5/2 s2

x1

+s1
x2

3x1

+ 1/2 s2
- s2

= 30
=4
=6
+ s3 = 6

(0)
(1)
(2)
(3)

Are any adjacent BF solutions better than the current one?


Rewrite Z in terms of nonbasic variables and investigate rate of
improvement
Current nonbasic variables:
Corresponding Z:
Optimal?

Algebra of the Simplex Method


Step 1 of Iteration 2: Direction of Movement
Z-

3x1+

+ 5/2 s2

x1

+s1
x2

3x1

+ 1/2 s2
- s2

= 30
=4
=6
+ s3 = 6

(0)
(1)
(2)
(3)

Which edge to move on?


Determine the direction of movement by selecting the entering
variable (variable entering the basis)
Choose the direction of steepest ascent
x1: Rate of improvement in Z =
s2: Rate of improvement in Z =

Entering basic variable =

Algebra of the Simplex Method


Step 2 of Iteration 2: Where to Stop
Z-

3x1+

+ 5/2 s2

x1

+s1
x2

3x1

+ 1/2 s2
- s2

= 30
=4
=6
+ s3 = 6

(0)
(1)
(2)
(3)

How far can we go?


Determine where to stop by selecting the leaving variable (variable
leaving the basis)
Increasing the value of x1 decreases the value of basic variables
The minimum ratio test
Constraint (1):
Constraint (2):
Constraint (3):

Leaving basic variable =

Algebra of the Simplex Method


Step 3 of Iteration 2: Solving for the New BF Solution
Z-

3x1+

+ 5/2 s2

x1

+s1
x2

3x1

+ 1/2 s2
- s2

= 30
=4
=6
+ s3 = 6

(0)
(1)
(2)
(3)

Convert the system of equations to a more proper form for the


new BF solution
Elementary algebraic operations: Gaussian elimination
Eliminate the entering basic variable (x1) from all but its
equation

Algebra of the Simplex Method


Optimality Test
Z

+ 3/2 s2 + s3
+s1
x2
x1

= 36

+ 1/3 s2 - 1/3 s3 = 2
+ 1/2 s2
=6
- 1/3 s2 + 1/3 s3 = 2

(0)
(1)
(2)
(3)

Are any adjacent BF solutions better than the current one?


Rewrite Z in terms of nonbasic variables and investigate rate of
improvement
Current nonbasic variables:
Corresponding Z:
Optimal?

The Simplex Method in Tabular


Form

For convenience in performing the


required calculations
Record only the essential information of
the (evolving) system of equations in
tableaux

Coefficients of the variables


Constants on the right-hand-sides
Basic variables corresponding to equations

Wyndor Glass
Z-

3x1 - 5x2
x1

=0
+s1

2x2
3x1+ 2x2

+s2

(0)

=4
= 12
+s3 = 18

(1)
(2)
(3)

Convert to initial table


Basic
variable

x1

x2

s1

s2

s3

r.h.s.

Wyndor Glass, Iteration 1


Basic
variable

x1

x2

s1

s2

s3

r.h.s.

-3

-5

s1

s2

12

s3

18

Optimality test (If all the coefficients of the cost function are non-negative)
Entering variable (steepest ascent) pivot column (The most negative in the cost function) (-5 is the most negative, x2 is the pivot column))
Leaving variable (minimum ratio test) pivot row (r.h.s./pivot column, pick least positive) (Ratios are 0/-5, 4/0, 12/2), minimun is 6(2 is pivot element)
s2 is leaving variable and x2 is entering variable.
Make the pivot element 1 by making row operations and other elements in the pivot coloumn as 0)

Gaussian elimination

Wyndor Glass, Iteration 2


Basic
variable

x1

x2

s1

s2

s3

r.h.s.

-3

-5

s1

s2

12

s3

18

Basic
variable

x1

x2

s1

s2

s3

r.h.s.

-3

5/2

30

s1

x2

1/2

s3

-1

Basic
variable

x1

x2

s1

s2

s3

r.h.s.

-3

5/2

30

s1

x2

1/2

s3

-1

Optimality test (If all the coefficients of the cost function are non-negative)
Entering variable (steepest ascent) pivot column (The most negative in the cost
function) (-3 is the most negative, x1 is the pivot column))
Leaving variable (minimum ratio test) pivot row (r.h.s./pivot column, pick least
positive) (Ratios are 4/1, 6/0, 6/3), minimun is 2 (3 is pivot element)
s3 is leaving the basis and x1 is entering variable in the basis.
Make the pivot element 1 by making row operations and other elements in the pivot
coloumn as 0)
Gaussian elimination

Wyndor Glass, Iteration 3


Basic
variable

x1

x2

s1

s2

s3

r.h.s.

3/2

36

s1

1/3

-1/3

x2

1/2

x1

-1/3

1/3

Solution is optimal as no coefficient in the cost function is negative.


Optimal value= 36
X1=2
X2=6

Special Cases, Summary


If no variable qualifies to be the leaving variable, then the LP is
unbounded
If the Z-row coefficient of a nonbasic variable is zero, the variable
may enter the basis, however the objective function will not change
If, in addition, coefficients of all other nonbasic variables are 0, then
there are multiple optimal solutions

If there is a tie for the entering variable, break it arbitrarily


It will only affect the path taken, but the same optimal solution will be
reached

If there is a tie for the leaving variable, theoretically the way in which
the tie is broken is important
The method can get trapped in an infinite loop (cycling under
degeneracy)
Beyond the scope of this class

Dual simplex method for


solving the primal

Duality of LP problems

Each LP problem (called as Primal in this context) is associated


with its counterpart known as Dual LP problem.
Instead of primal, solving the dual LP problem is sometimes easier
in following cases
a) The dual has fewer constraints than primal
Time required for solving LP problems is directly affected by the
number of constraints, i.e., number of iterations necessary to converge
to an optimum solution, which in Simplex method usually ranges from
1.5 to 3 times the number of structural constraints in the problem

b) The dual involves maximization of an objective function


It may be possible to avoid artificial variables that otherwise would be
used in a primal minimization problem.

Finding Dual of a LP problem

Primal

Dual

Maximization

Minimization

Minimization

Maximization

ith variable

ith constraint

jth constraint

jth variable

xi > 0

Inequality sign of ith Constraint:


if dual is maximization
if dual is minimization
contd. to next slide

Finding Dual of a LP problemcontd.

Primal

Dual

ith variable unrestricted

ith constraint with = sign

jth constraint with = sign

jth variable unrestricted

RHS of jth constraint

Cost coefficient associated with jth


variable in the objective function

Cost coefficient associated with


ith variable in the objective
function

RHS of ith constraint constraints

Finding Dual of a LP problemcontd.

Note:
Before finding its dual, all the constraints should be
transformed to less-than-equal-to or equal-to type for
maximization problem and to greater-than-equal-to or
equal-to type for minimization problem.
It can be done by multiplying with -1 both sides of the
constraints, so that inequality sign gets reversed.

Finding Dual of a LP problem:


An example

Primal

Dual

Maximize Z 4 x1 3 x 2

Minimize

Subject to

Subject to

2
x 2 6000
3
x1 x 2 2000

x1

x1 4000

x1 unrestricted
x2 0

Z 6000 y1 2000 y 2 4000 y 3

y1 y 2 y 3 4
2
y1 y 2 3
3
y1 0
y2 0

y3 0

Note: Second constraint in the primal is transformed to x1 x2 2000


before constructing the dual.

Primal-Dual relationships
If one problem (either primal or dual) has an optimal
feasible solution, other problem also has an optimal
feasible solution. The optimal objective function value is
same for both primal and dual.
If one problem has no solution (infeasible), the other
problem is either infeasible or unbounded.
If one problem is unbounded the other problem is
infeasible.

Dual Simplex Method


Simplex Method verses Dual Simplex Method
1. Simplex method starts with a nonoptimal but feasible
solution where as dual simplex method starts with an
optimal but infeasible solution.
2. Simplex method maintains the feasibility during
successive iterations where as dual simplex method
maintains the optimality.

Dual Simplex Method: Iterative steps


Steps involved in the dual simplex method are:
1. All the constraints (except those with equality (=) sign) are
modified to less-than-equal-to sign. Constraints with greaterthan-equal-to sign are multiplied by -1 through out so that
inequality sign gets reversed. Finally, all these constraints are
transformed to equality sign by introducing required slack
variables.
2. Modified problem, as in step one, is expressed in the form of a
simplex tableau. If all the cost coefficients are positive (i.e.,
optimality condition is satisfied) and one or more basic
variables have negative values (i.e., non-feasible solution),
then dual simplex method is applicable.

Dual Simplex Method: Iterative steps


contd.
3.

Selection of exiting variable: The basic variable with the highest


negative value is the exiting variable. If there are two candidates
for exiting variable, any one is selected. Find a row, call it r, with
the most negative right-hand-side constant. The row of the
selected exiting variable is marked as pivotal row.

4.

Selection of entering variable: For each negative coefficient in


the pivot row, compute the negative of the ratio between the cost
and the structural coefficient in row r. If there is no negative
coefficient, stop; there is no feasible solution.
Let the column with the minimum ratio, designated by the index s,
be the pivot column and associated decision variable is the
entering variable.

Dual Simplex Method: Iterative steps


contd.
5. Pivotal operation: Pivotal operation is exactly same as
in the case of simplex method, considering the pivotal
element as the element at the intersection of pivotal
row and pivotal column.
6. Check for optimality: If all the basic variables have
nonnegative values then the optimum solution is
reached. Otherwise, Steps 3 to 5 are repeated until the
optimum is reached.

Please forward your query


To: sjain@amity.edu

Vous aimerez peut-être aussi