0% found this document useful (0 votes)
1 views15 pages

Unit 5

The document covers Operations Research, focusing on Linear Programming (LP) and the Simplex Method. It introduces key concepts such as optimization problems, constraints, and the graphical method for solving LPs, along with examples demonstrating the application of these methods. Additionally, it discusses special cases in LP, including redundancy, infeasibility, unboundedness, and alternate optimal solutions, as well as how to solve LP problems using MATLAB.

Uploaded by

takkkie556
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)
1 views15 pages

Unit 5

The document covers Operations Research, focusing on Linear Programming (LP) and the Simplex Method. It introduces key concepts such as optimization problems, constraints, and the graphical method for solving LPs, along with examples demonstrating the application of these methods. Additionally, it discusses special cases in LP, including redundancy, infeasibility, unboundedness, and alternate optimal solutions, as well as how to solve LP problems using MATLAB.

Uploaded by

takkkie556
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/ 15

(SEHS4648) (SEHS4648)

1.1 Operations Research


Unit-5 Linear Programming and Simplex Method
Example: Optimizing Harbor Operations
1. Introduction
Operations Research Containers are transported
between vessels and storage area
Mathematical Programming
via automated guided vehicles
2. Linear Programming (AGVs);
Basic Concepts Compute AGV routes that are
Graphical Method of LPs free of conflicts and jams while
maximizing container throughput.
Some Special Cases of LPs
Solve LP Problems with Matlab Overall objective: minimize vessels
3. Simplex Method waiting time

1 3

(SEHS4648) (SEHS4648)

1. Introduction 1.2 Mathematical Programming


What is Operations Research? Optimization Problem
Seeks to maximize or minimize a specific quantity, called the objective,
Operations which depends on a finite number of input variables. These variables
The activities carried out in an organization. may be related through one or more constraints.
Research Example: The problem
The process of observation and testing by scientific methods. minimize: z = x12 + x22
Situation, problem statement, model construction, validation,
experimentation, candidate solutions. subject to: x1 - x2=3
x2
Operations Research
is an optimization problem for the objective z.
Concern with the efficient allocation of scarce resources.
The derivation of computational methods for solving the well- It is desired to find values for the input variables which minimize
defined model of a given situation. the sum under the limitations imposed by the constraints.
2 4
(SEHS4648) (SEHS4648)

Mathematical Programming Comparison of Mathematical Programs


An optimization problem in which the objective and constraints given as
mathematical functions and functional relationship. LP IP NLP
Continuous Discrete Continuous or
maximize or minimize: z = f (x1, x2 x n)
Variables (e.g. 0 x 1) (e.g.x=0 or 1) Discrete
subject to: g1(x1, x2 xn) b1
Linear Linear Nonlinear/Linear
g2(x1, x2 xn) b2
Constraints (e.g. 3x+2y 7) (e.g. 4x-y 5) (e.g.14x2 y3 3)
=
Linear Linear Nonlinear
Objective e.g. e.g. e.g.
gm(x1, x2 x n) bm Maximize 2x+5y Maximize -3x 2y Maximize 17xy

Unconstrained mathematical programs are covered if no constraint


exists.
5 7

(SEHS4648) (SEHS4648)

Classification of Mathematic Programs


Problem formulation
Integer Programs (IP) Step 1:
Linear Programs (LP) Determine the quantity to be optimized and express it as a mathematical
if the input variables xi are integers.
function. Doing so serves to define the input variables;
if f(.) and each gi(.) are linear:
f(x1, x2 xm)=c1x1+c2x2 c nx n Step 2:
gi(x1, x2 xm)=ai1x1+ai2x2 ainxn Identify all stipulated requirements, restrictions and limitations and express
And if input variables take continuous them mathematically. These requirements constitute the constraints;
(real) values Quadratic Programs (QP) Step 3:
Each constraint is linear; but the Express any hidden conditions. Such conditions are not stipulated explicitly
objective is of the form: in the problem but are apparent from the physical situation being modeled.
Nonlinear Programs (NLP)
f(x1 xm)= + Generally they involve non-negativity or integer requirements on the input
variable;

6 8
(SEHS4648) (SEHS4648)

2. Linear Programming
Slack Variables
2.1 Basic Concepts A linear constraint of the form can be converted into
an equality by adding a new, nonnegative variable to the left-hand
Maximize or minimize: z = f (x1, x2 xn) side of the inequality. Such a variable is known as slack variable.
subject to: b1 Slack variable equal to the difference between the right- and left-
hand sides of the inequality constraint.
b2
=
Example: The constraint
bm
4
Decision Variables: Variables that represent the decision that can be made
(x1, x2 xn). The inequality can be transformed into the equation
Objective function: Each optimization problem is trying to optimize
4 + S1 = 30000
(maximize/minimize) some goal such as costs, profits, revenue.
Constraints: Set of real restricting parameters that are imposed in real life by adding the slack variable S1 to the left-hand side of the inequality.
or by the structure of the problem. 9 11

(SEHS4648) (SEHS4648)

Assumptions of LPs: Surplus Variables


A linear constraint of the form can be converted into
Linearity implies that the objective function and all of the an equality by subtracting a new, nonnegative variable to the left-hand
constraints are in linear relationship. side of the inequality. Such a variable is known as surplus variable.
( Proportionality and additivity are consequences of the linear
assumption. ) Surplus variable equal to the difference between the right- and left-
hand sides of the inequality constraint.
Nonnegativity simply means that all decision variables
must take positive or zero values. Example: The constraint
Divisibility means that the optimal values of decision variables 4
may be fractional depending upon the application.
Certainty requires that the parameters of LP model are known or The inequality can be transformed into the equation
can be accurately estimated.
4 S1 = 54

by subtracting the surplus variable S1 to the left-hand side of the inequality.


10 12
(SEHS4648) (SEHS4648)

2.2 Graphical Method of Linear Programs The mathematic program


maximize: z = 120x1+80x2
The set of all points that satisfy all the constraints of the model
subject to: 2x1 + x2
is called a FEASIBLE REGION;
7x1 + 8x2
The graphical solution procedure: with: both decision variables being nonnegative integers
1) Prepare a graph of the feasible solutions for each of the
constraints.
2) Determine the feasible region that satisfies all the constraints
simultaneously.
3) Draw an objective function line.
4) Move parallel objective function lines toward larger objective Integer Program
function values without entirely leaving the feasible region.
5) Any feasible solution on the objective function line with the
largest/smallest value is an optimal solution.
13 15

(SEHS4648) (SEHS4648)

Example-1:
A furniture maker has 6 units of wood and 28h of free time, in which he
will make decorative screens. Two models have sold well in the past, so he x2
will restrict himself to those two. He estimates that model I requires 2 units
of wood and 7 h of time, where model II requires 1 unit of wood and 8 h of
time. The prices of the models are $120 and $80, respectively. How many
screens of each model should the furniture maker assemble if he wishes to
maximize his sales revenue?
The non-negativity constraint
Decisions variables:
x1 = number of model I screens to be produced
x2 = number of model II screens to be produced
Objective Function:
x1
sales revenue, z=120x1+80x2, to be maximized
Constraints
Wood: 2x1 + x2 6
Time: 7x1 + 8x2 14 16
(SEHS4648) (SEHS4648)

objective: z = 120x1+80x2
X2 z = 380 x2
5 The wood constraint: z = 330 5
2x1+x2
4 z = 240
4

3 3

2 Infeasible Decision 2 Infeasible


variables
The time 1 are
1
Feasible integers Feasible
constraint :
7x1+8x2 28 X1
1 2 3 4 1 2 3 4
x1
The maximum revenue is: z*=120 3+80 0=$360.
17 19

(SEHS4648) (SEHS4648)

There are three types of feasible points:


Example-2:
x2 Use graphic method to solve a minimization problem
5
The wood constraint: minimize: z= 5x1 + 2x2
2x1+x2
4 subject to: 2x1 + 5x2 > 10
4x1 x2 > 12
3
x1 + x2 > 4
2 Infeasible
with: all variables x1, x2 are nonnegative.
The time 1
constraint : Feasible
7x1+8x2 28
x1
1 2 3 4
Linear Program
Interior points. Extreme points. Boundary points. 18 20
(SEHS4648) (SEHS4648)

Solution: 3) Optimal solution


1) Graph the constraints:
x2
x2
6
6
Feasible Region 4x1 - x2 > 12
5
5
4x1 - x2 > 12 4 x 1 + x2 > 4
4
x 1 + x2 > 4 3
3 Optimal Solution:
x1 = 16/5, x2 = 4/5,
2 5x1 + 2x2 = 17.6
2 2x1 + 5x2 > 10
1 2x1 + 5x2 > 10
1
x1
x1 21 1 2 3 4 5 6 23
1 2 3 4 5 6

(SEHS4648) (SEHS4648)

2) Graph the objective function, and move toward optimality 2.3 Some Special Cases of Linear Programs
x2
Min 5x1+2x2 Four special cases and difficulties arise at times in linear
6
programming:
5
1) Redundancy
4x1 - x2 > 12
4
2) Infeasibility
x 1 + x2 > 4
3
3) Unboundedness
2 2x1 + 5x2 > 10
4) Alternate Optimal Solutions
1

x1
1 2 3 4 5 6 22 24
(SEHS4648) (SEHS4648)

Redundant Constraints Unboundedness


- do not affect the feasible region when nothing prevents the solution from becoming infinitely
x2
large
x2
30

25 max : 2x1 + 2x2


2x1 + x2 subject to: 2x1 + 3x2 > 6
20 x1, x2 > 0 2
Redundant
Constraint
15
x1 1
10
x1 + x2
Feasible 0
5
Region 0 1 2 3 x1

0 | | | | | | 25 27
5 10 15 20 25 30 x1

(SEHS4648) (SEHS4648)

Infeasibility Alternate Optimal Solutions


when no feasible solution exists (there is no feasible region) when there is more than one optimal solution
x2 x1 x2

8 10
max: 2 x1 + 2x2
2x1 + x2 subject to: x1 + x2 < 10 All points on
6
x1 < 5 red segment are
Region Satisfying x2 < 6 6
4 Third Constraint optimal
x 1, x 2 > 0
2
x1 +2x2
0 | | | | | | | | | |
2 4 6 8 x1 0
Region Satisfying First Two Constraints 0 5 10 x1
26 28
(SEHS4648) (SEHS4648)

2.4 Solve LP problems using Matlab Solution:


MATLAB uses the following format for linear programs: 1) Convert the LP into MATLAB format.
Comparing the above LP with the Matlab format, one
min : z = f Tx
can get:
subject to : Ax b
Aeq x = beq
lb ub
where f, x, b, beq, lb, and ub are vectors and A and Aeq are matrices.
1
Syntax
x = linprog(f, A, b) u 1
x = linprog(f, A, b, Aeq, beq)
x = linprog(f, A, b, Aeq, beq, lb, ub) 2
x = linprog(f, A, b, Aeq, beq, lb, ub, x0)
x = linprog(f, A, b, Aeq, beq, lb, ub, x0, options)
29 31

(SEHS4648) (SEHS4648)

Example-3: 2) Input the variables into MATLAB:


Solve the following linear program using MATLAB: >> f = -[4; 2; 1];
max : z = 4x1 + 2x2 + x3 <=> min: z0 x1 x2 x3 >> A = [2 1 0; 1 0 2];
subject to : 2x1 + x2 >> b = [1; 2];
x1 + 2x3 >> Aeq = [1 1 1];
x1 + x2 + x3 = 1 >> beq = [1];
x1 >> l = [0; 0; 0];
x2 >> u = [1; 1; 2];
x3

Linear Program 30 32
(SEHS4648) (SEHS4648)

3) Solve the linear program using MATLAB: 3. Simplex Method


>> x = linprog(f, A, b, Aeq, beq, l, u)
And you should see the following: Graphical methods can only solve linear-programming (LP)
Optimization terminated successfully. problems with 2 variables;
x=
0.5000 Most of real-life LP problems have many variables;
0.0000 Simplex method can be used to solve LPs with thousands of
0.5000 constraints and variables;
Simplex method allows the use of computer-generated solutions
to be run successfully.

33 35

(SEHS4648) (SEHS4648)

3.1 The essence of the simplex method


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

34 36
(SEHS4648) (SEHS4648)

Example: Wyndor Glass Co. problem (Ref. 1, pp. 26-28) Some concepts and ideas Constraint boundaries
The WYNDOR GLASS Co. produces high-quality glass products, including window and
Feasible region
x2
glass doors. It has three plants. Aluminum frames and hardware are made in Plant 1, (0,9) Optimal solutions always exist at
wood frames are made in Plant 2, and Plant 3 produces the glass and assembles the x1 corner points: Corner-point
products. solutions
Because of declining earnings, top management has decided to revamp the (the points of intersection)
(0,6) (2,6) (4,6)
2x2 Corner-point feasible (CPF)
production capacity to launch two new products having large scales potential: product-1 solutions
(glass door with aluminum frame), product-2 (double-hung wood-framed window).
(the corners of the feasible region)
Production Time per Batch, Hours Product Time Available
(4,3) Edges of the feasible region
Plant Product-1 Product-2
per Week, Hours Feasible region Adjacent CPF solutions
3x1 + 2x2 (in a problem with n decision
1 1 0 4
2 0 2 12
variables, two CPF solutions share
3 3 2 18
(0,0) (4,0) (6,0) n-1 constraint boundaries)
Profit per batch $3,000 $5,000 x1 If the solution is not optimal, you
Z = 3x1 + 5x2 can always find a better Adjacent
37 CPF solution. 39

(SEHS4648) (SEHS4648)

Example: Wyndor Glass Co. problem (Ref. 1, pp. 26-28) Optimality test in the Simplex Method:
The WYNDOR GLASS Co. produces high-quality glass products, including window and If a CPF solution has no adjacent solutions that are better, then it must
glass doors. It has three plants. Aluminum frames and hardware are made in Plant 1, be an optimal solution.
wood frames are made in Plant 2, and Plant 3 produces the glass and assembles the
products. An iterative procedure
Because of declining earnings, top management has decided to revamp the
Initialization
production capacity to launch two new products having large scales potential: product-1 (Find initial CPF solution)
(glass door with aluminum frame), product-2 (double-hung wood-framed window).

The LP problem can be written as:


Production Time per Batch, Hours Product Time Available Is the current
Maximize : Z = 3x1 + 5x2 Yes
per Week, Hours CPF solution Stop
Plant Product-1 Product-2
subject to: x1 optimal?
1 1 0 4
2 0
2x2 2 12
3x31 +2x2 No
3 2 18
and
Profit per batch $3,000 $5,000 Move to a better
x1 2 adjacent CPF solution
38 40
(SEHS4648) Simplex Method (SEHS4648)

Initial CPF solution


X2 2 Optimality test
Setting up the simplex method
1
(0,6) (2,6)
If not optimal, then move to a => Convert inequality constraints to equality constraints by adding slack
Z=30 Z=36
better adjacent CPF solution: variables.
Consider the edges that emanate
from current CPF solution Original Form Augmented Standard Form
(4,3)
Z=27 Move along the edge that
increases Z at the fastest rate Maximize: Z = 3x1+5x2 Maximize: Z = 3x1 + 5x2
Stop at the first constraint subject to: x1 4 subject to: x1 + S1 =4
boundary
(0,0) (4,0) 2x2 12 2x2 + S2 = 12
0 Z=0 Z=12 Solve for the intersection of the
X1 3x1+2x2 18 3x1+2x2 + S3 = 18
new boundaries
Back to optimality test and and
Z = 3 x1 +5 x2
x1, x2 x1, x2, S1 , S2 , S3

41 43

Simplex Method (SEHS4648) (SEHS4648)

Augmented solutions
3.2 The Key Solution Concepts Augmented Form
X2
Maximize : Z= 3x1+ 5x2
1) The simplex method focus only on CPF solutions; (0,9,4,-6,0)
subject to : x1 + S1 =4
2) The simplex method is an iterative algorithm; 2x2 + S2 = 12
3x1+ 2x2 +S3 = 18
3) If possible, use the origin as the initial CPF solution;
x1, x2, S1, S2, S3
4) Move always to the adjacent and best CPF solution;
(0,6,4,0,6) (2,6,2,0,0) (4,6,0,0,-6)

with the highest rate of Basic infeasible solution


improvement.
(2,3,2,6,6)
(e.g. at the first iteration, moving from (0, 0) along the edge on the x1 axis (4,3,0,6,0) Basic feasible solution (BFS)
would give a rate of improvement of 3, whereas moving along the edge on the
x2 axis would give a rate of improvement of 5) Non-basic feasible solution
6) Optimality test also looks at the rate of improvement (0,2,4,8,14)
(If all non-negative, then optimal)
(0,0,4,12,18) (4,0,0,12,6) (6,0,-2,12,0)
42 44
X1
(SEHS4648) (SEHS4648)

Basic, Non-basic Solutions and the Basis


In an LP, number of variables > number of constraint equations. The Augmented Form
difference is the degrees of freedom of the system; Maximize Z = 3x1 + 5x2
e.g. in Wyndor Glass, degrees of freedom (d.f.) = 2;
subject to x1 +S1 =4
Number of basic variables = number of constraint equations ( = 3 in Wyndor 2x2 +S2 = 12
Glass) 3x1+ 2x2 +S3 = 18

The basis: the set of basic variables; x1, x2, S1, S2, S3
The rest variables are Non-basic variables (there are 2 non-basic variables in
Wyndor Glass).
2) Example of Adjacent BF Solution:
Non-basic variables are set to 0;
The values of the basic variables can be obtained by solving the system of
constraint equations;
If basic variables satisfy the non-negativity constraint, we have a BFS; x1 x2 x1 S2
Between two BFS, if all but one of their non-basic variables are the same, [ Only one non-basic variable x2 is replaced by S2. ]
then they are adjacent.
45 47

(SEHS4648) (SEHS4648)

Augmented Form 3.3 The Simplex Method in Tabular Form


Maximize Z = 3x1+ 5x2
Tabular form can be used to solve a problem by hand;
subject to x1 +S1 =4
2x2 +S2 = 12 The tabular form of the simplex method records only the essential
3x1+ 2x2 +S3 = 18
information of the (evolving) system of equations:
x1, x2, x3, x4, x5 Basic variables corresponding to equations
Coefficients of the variables
1) Example of BF Solution: (0, 0, 4, 12, 18) Constants on the right-hand-sides
a. Augmenting the CPF solution (0, 0);
b. Choose x1 and x2 as non-basic variables (= 0), and solve the system of
equations:
S1 = 4
S2 = 12
S3 = 18
46 48
(SEHS4648) (SEHS4648)

Wyndor Glass
Non-basic variables

Maximize Z = 3x1 + 5x2 Iteration 1:


subject to x1 +S1 =4
1) Optimality test (every coefficient in row Z is nonnegative?)
2x2 +S2 = 12
3x1+ 2x2 +S3 = 18 2) Entering variable (steepest ascent) pivot column
x1, x2, S1, S2, S3
3) Leaving variable (minimum ratio test ; ratio = r.h.s divided by
the coefficient in the pivot column) pivot row
Basic variables
4) Elementary row operations
Convert to initial tableau (non-basic variables are not listed)
Basic
variable
Z x1 x2 S1 S2 S3 r.h.s.
Basic variable Z x1 x2 S1 S2 S3 r.h.s.
Z 1 -3 -5 0 0 0 0

z 1 -3 -5 0 0 0 0 S1 0 1 0 1 0 0 4
S2 0 0 2* 0 1 0 12
S1 0 1 0 1 0 0 4
S3 0 3 2 0 0 1 18
S2 0 0 2 0 1 0 12

S3 0 3 2 0 0 1 18 Pivot number
49 51

(SEHS4648) (SEHS4648)

4) Elementary row operations


I. Divide the pivot row by the pivot number;
Iteration 1:
II. For each row that has negative(positive) coefficient in the pivot column, add
(subtract) to this row the product of the absolute value of this coefficient and the
1) Optimality test (every coefficient in row Z is nonnegative?)
new pivot row;
2) Entering variable (steepest ascent) pivot column
Basic
Z x1 x2 S1 S2 S3 r.h.s.
3) Leaving variable (minimum ratio test; ratio = r.h.s divided by variable
the coefficient in the pivot column) pivot row Z 1 -3 -5 0 0 0 0

4) Elementary row operations S1 0 1 0 1 0 0 4


(0) S2 0 0 2* 0 1 0 12
Basic S3 0 3 2 0 0 1 18
variable
Z x1 x2 S1 S2 S3 r.h.s.

Z 1 -3 -5 0 0 0 0 Basic
variable
Z x1 x2 S1 S2 S3 r.h.s.
S1 0 1 0 1 0 0 4
S2 0 0 2 0 1 0 12 Z 1 -3 0 0 0 30
S3 0 3 2 0 0 1 18 S1 0 1 0 1 0 4
(1)
x2 0 0 1 0 0.5 0 6
S3 0 3 0 0 1 6
50 52
(SEHS4648) (SEHS4648)
Optimality test

Iteration 2: Basic
Z x1 x2 S1 S2 S3 r.h.s.
variable
1) Optimality test (every coefficient in row Z is nonnegative?) Z 1 0 0 0 1 36

2) Entering variable (steepest ascent) pivot column S1 0 0 0 1 -1/3 2

3) Leaving variable (minimum ratio test) pivot row x2 0 0 1 0 0 6


x1 0 1 0 0 1/3 2

Basic Z = 36
variable
Z x1 x2 S1 S2 S3 r.h.s.
S1 = 2
Z 1 -3 0 0 0 30 Basic variables
x2 = 6
S1 0 1 0 1 0 4
x1 = 2
x2 0 0 1 0 0.5 0 6
S2 = 0
S3 0 3 0 0 1 6 Non-basic variables
S3 = 0

Optimal solution: x1 = 2 and x2 = 6. The optimal value Z = 36.


53 55

(SEHS4648) Complete set of the simplex tableaux (SEHS4648)

4) Elementary row operations Basic


Z x1 x2 S1 S2 S3 r.h.s. ratio
I. Divide the pivot row by the pivot number; variable
II. For each row that has negative(positive) coefficient in the pivot column, add Z 1 -3 -5 0 0 0 0
(subtract) to this row the product of the absolute value of this coefficient and the S1 0 1 0 1 0 0 4
new pivot row; S2 0 0 2* 0 1 0 12
Basic S3 0 3 2 0 0 1 18
variable
Z x1 x2 S1 S2 S3 r.h.s.

Z 1 -3 0 0 0 30 Basic
variable
Z x1 x2 S1 S2 S3 r.h.s.
S1 0 1 0 1 0 0 4
(1) Z 1 -3 0 0 0 30
x2 0 0 1 0 0 6
S1 0 1 0 1 0 0 4
S3 0 3* 0 0 -1 1 6
x2 0 0 1 0 0 6
S3 0 3* 0 0 -1 1 6
Basic
variable
Z x1 x2 S1 S2 S3 r.h.s.
Basic
Z 1 0 0 0 1 36 variable
Z x1 x2 S1 S2 S3 r.h.s.

S1 0 0 0 1 -1/3 2 Z 1 0 0 0 1 36
(2)
x2 0 0 1 0 0 6 S1 0 0 0 1 -1/3 2
x1 0 1 0 0 1/3 2 x2 0 0 1 0 0 6
54 56
x1 0 1 0 0 1/3 2
(SEHS4648)

Reference:
(R. Bronson and G. Naadimuthu,
Schaum's outline of theory and problems of Operations
Research, McGraw Hill, 1997)
1. Mathematical Programming, pp. 1 ~ 7.
2. Linear Programming: Basic Concepts, pp. 18 ~ 20.
Frederick s. Hillier and Gerald J. Lieberman,
Introduction to Operations Research, Eighth Edition
McGraw Hill, 2000
Chapter 4. Solving Linear Programming Problems: The Simplex
Method, pp. 103 ~ 121.

57

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy