Você está na página 1de 196

Operations Research

P ro f. M . H a m d y E l wa ny
1 s t Ye a r P r o d u c t i o n E n g i n e e r i n g Department 2011

What is Operations Research?


2

Lecture 1

The Evolution of Management Thinking


3

Management Perspectives Over Time


4 2000
The Technology-Driven Workplace The Learning Organization

1990 1980 Total Quality Management 1970 Contingency Views 1950 Systems Theory 1940

2010
2010

2000

2000 2000

Management Science Perspective 1930 Humanistic Perspective 1890 Classical 1940 1870

1990
1990 2010

Forces Influencing Organizations and Management


5

Social Forces - values, needs, and standards of

behavior

Political Forces - influence of political and legal

institutions on people & organizations

Economic Forces - forces that affect the

availability, production, & distribution of a societys resources among competing users

Classical Perspective: 3000 B.C.


6

Rational, scientific approach to management

make organizations efficient operating machines


Scientific

Management

Bureaucratic

Organizations
Principles

Administrative

Scientific Management: Taylor 1856-1915


7

Developed standard method for performing

each job. Selected workers with appropriate abilities for each job. Trained workers in standard method. Supported workers by planning work and eliminating interruptions. Provided wage incentives to workers for increased output.

Scientific Management
8

Contributions Demonstrated the importance of compensation for performance. Initiated the careful study of tasks and jobs. Demonstrated the importance of personnel and their training. Criticisms Did not appreciate social context of work and higher needs of workers. Did not acknowledge variance among individuals. Tended to regard workers as uninformed and ignored their ideas

Humanistic Perspective
9

Emphasized understanding human behavior,

needs, and attitudes in the workplace


Human

Relations Movement

Human

Resources Perspective
Sciences Approach

Behavioral

Management Science Perspective


10

Emerged after World War II.

Applied mathematics, statistics, and other

quantitative techniques to managerial problems


Operations

Research mathematical modeling Operations Management specializes in physical production of goods or services Information Technology reflected in management information systems

Recent Historical Trends


11

Systems Theory

Contingency View

Total Quality Management (TQM)

An Introduction to Operations Research


12

What is Operations Research?


13

Operations

Research (OR) seeks the determination of the best (optimum) course of action of a decision problem under the restriction of limited resources. The term operations research quite often is associated with the use of mathematical techniques to model and analyze decision problems.

History of OR
14

The beginning of the activity called Operations

Research has generally been attributed to the military services early in the World War II. There was an urgent need to allocate scarce resources to the various military operations and to the activities within each operation in an effective manner. Therefore, the British and then the US military management called upon a large number of scientists.

History of OR Cont.
15

The scientists were asked to do research in

Military Operations. These teams of scientists were, thus, the first Operations Research teams. Through their research on how to better manage convoy and antisubmarine operations, they also played a major role in winning of:
Air

battle of Britain The battle of the North Atlantic. Island Campaign in the Pacific.

History of OR Cont.
16

After the success of OR in military operations,

increase attention in the use of OR in industrial and organizational applications. By the early 1950s, OR was used in a variety of organizations in
business, industry,

and government.
The rapid spread of OR soon followed.

History of OR Cont.
17

Two important factors played an important role in

rapid growth of OR
The

substantial progress that was made early in improving the techniques to OR


Simplex method

for solving linear programming problems, developed by George Dantzig in 1947 Many of the standard tools of OR, such as linear programming, dynamic programming, queuing theory, and inventory theory, were relatively well developed before the end of the 1950s.
Computer
The

revolution

development of personal computers.

OR as A Problem Solving Technique


18

OR must be viewed as both:


A

science
algorithms for solving appropriate decision problems.

Providing mathematical techniques and

An

art

as

success in all the phases that precede and succeed the solution of a mathematical model depends largely on the creativity and personal abilities of the decision-making analyst.

OR as A Problem Solving Technique


19

There are three main phases to use OR approach:


Phase

I: PROBLEM ANALYSIS

Define

the Operations Research Analyze the problem and divide into smaller units Establish research priorities
Phase

II: SOLUTION DEVELOPMENT

Specify

solution objectives Specify decision variables and stipulate constraints on the solution Identify or construct an appropriate model for solution development Determine and obtain required data Develop solutions using analytical mode

OR as A Problem Solving Technique


20

Phase

III: SOLUTION VALIDATION

Design

field test Implement field test Evaluate the propose solution Modify if necessary Integrate the solution with the larger system

Thus implementing OR approach depends on the ability of the OR team to establish good lines of communication with the sources of information as well as with the individuals responsible for implementing recommended solutions.

An Introduction to Linear Programming


21

Lecture 2

Linear Programming (LP)


22

Linear Programming has proven to be one of the

most effective operations research tools. LP success stems from its flexibility in describing multitudes of real-life situations in the following areas:
military,

industry, agriculture, transportation, behavioral and social sciences, economic sciences, etc.

LP is a mathematical modeling technique used to

determine a level of operational activity in order to achieve an objective, subject to restrictions called constraints

Model Formulation
23

Model Formulation: The first step in solving an LP model is

building the mathematical model according to the following steps: 1. Determine decision variables:
What does the model seek to determine? (mathematical symbols representing levels of activity of an operation)
2.

Determine the objective function:


A linear relationship reflecting the objective of an operation Most frequent objective of business firms is to maximize profit Most frequent objective of individual operational units (such as a production or packaging department) is to minimize cost

3.

Determine the constraints:


What restrictions must be imposed on the variables to satisfy the limitations of the modeled system? (represented by linear relationship)

Model Formulation
24

The general form of LP mathematical model will

be as follows:
Max/min subject to: z = c1x1 + c2x2 + ... + cnxn a11x1 + a12x2 + ... + a1nxn (, =, ) b1 a21x1 + a22x2 + ... + a2nxn (, =, ) b2 : am1x1 + am2x2 + ... + amnxn (, =, ) bm

xj = decision variables bi = constraint levels cj = objective function coefficients aij = constraint coefficients

LP Model: Example 1
25

RESOURCE REQUIREMENTS
PRODUCT Bowl Mug

Labor (hr/unit) 1 2

Clay Revenue (lb/unit) ($/unit) 4 40 3 50

There are 40 hours of labor and 120 pounds of clay available each day Step 1: Decision variables x1 = number of bowls to produce x2 = number of mugs to produce

LP Model: Example 1
26

RESOURCE REQUIREMENTS
PRODUCT Bowl Mug

Labor (hr/unit) 1 2

Clay Revenue (lb/unit) ($/unit) 4 40 3 50

There are 40 hours of labor and 120 pounds of clay available each day Step 2: Objective Function Maximize Profit

Maximize Z = $40 x1 + 50 x2

LP Model: Example 1
27

RESOURCE REQUIREMENTS
PRODUCT Bowl Mug

Labor (hr/unit) 1 2

Clay Revenue (lb/unit) ($/unit) 4 40 3 50

There are 40 hours of labor and 120 pounds of clay available each day Step 3: Constraints x1+ 2x2 < 40 hr (labor constraint) Subject to:
4x1+ 3x2 < 120 lb (clay constraint) x 1 , x2 > 0 (Non-negativity constraint)

LP Model: Example 1
28

We can write the mathematical model as one

block as follows:
Decision variables find the optimum values of: x1 = number of bowls to produce x2 = number of mugs to produce Objective Function Maximize Profit Maximize Z = $40 x1 + 50 x2 Subject to: x1+ 2x2 < 40 hr (labor constraint) 4x1+ 3x2 < 120 lb (clay constraint) x1 , x2 > 0 (Non-negativity constraint)

Solving LP Problems
29

Graphical Solution method: is one of the most

common tools in solving LP models The steps of solving the LP problems using the graphical solution method:
1. 2. 3.

Plot model constraint on a set of coordinates in a plane. Identify the feasible solution space on the graph where all constraints are satisfied simultaneously. Plot objective function to find the point on boundary of this space that maximizes (or minimizes) value of objective function.

Graphical Solution: Example 1


30

Decision variables find the optimum values of: x1 = number of bowls to produce x2 = number of mugs to produce Objective Function Maximize Profit Maximize Z = $40 x1 + 50 x2 Subject to: x1+ 2x2 < 40 hr (labor constraint) 4x1+ 3x2 < 120 lb (clay constraint) x1 , x2 > 0 (Non-negativity constraint)

Graphical Solution: Example 1


31

x2 50 40 30 20 10 0 | 10 | 20

4 x1 + 3 x2 <120 lb Maximize Z = $40 x1 + 50 x2


Optimal point: x1 = 24 bowls, Area common to x2 =8 mugs both constraints (Feasibility Z = Region) $1360

x1 + 2 x2 <40 hr
| 30 | 40 | 50 | 60 x1

Graphical Solution: Example 2


32

Find the maximum and minimum values of the

function z =3x1 + 5x2, given the following set of constraints,


3 x1 + 2 x2 < 18 x1 < 4 2 x2 < 12 x1 and x2 > 0

Graphical Solution: Example 2


33

To solve this problem, follow the following steps:


1.

2.

3.

Represent the given inequalities and find the solution space. Represent the given function, and find its direction of increase and decrease. Find the points that would both belong to the solution space and give the maximum and minimum values of the function.

Graphical Solution: Example 2


34

Representing the Inequalities

Graphical Solution: Example 2


35

Draw the objective function equation with (0,0)

Graphical Solution: Example 2


36

The direction of decrease is the one downwards and vice versa.

Decrease

Increase

Graphical Solution: Example 2


37

shift the straight line in the direction of increase till it reaches the furthest point that still belongs to solution space

Graphical Solution: Example 2


38

shift the straight line in the direction of increase till it reaches the furthest point that still belongs to solution space

Graphical Solution: Example 2


39

The Optimum Solution at (2,6) Therefore the objective function = 36 X1 = 2 X2 = 6 Z = 36

Example 3: Model Formulation


40

Shirtstop makes t-shirts with logos and sells them in its chain

of retail stores. They contract with two different plantsone in Puerto Rico and one in the Bahamas. The shirts from the plant in Puerto Rice cost $0.46 apiece and 9% of them are defective and can't be sold. The shirts from the Bahamas cost only $0.35 each but they have an 18% defective rate. Shirtstop needs 3,500 shirts. To retain their relationship with the two plants they want to order at least 1,000 shirts from each. They would also like at least 88% of the shirts they receive to be salable. Formulate a linear programming model for this problem.

Example 3: Model Formulation


41

Decision variables find the optimum values of:


X1: Number of t-shirts bought from the plant in Puerto Rico X2: Number of t-shirts bought from the plant in Bahamas

Objective Function Minimize Cost Minimize Z = 0.46X1 + 0.35X2 Subject to: X1 > 1000, X2 > 1000 0.82X1 + 0.91X2 > 3500 0.82X1 + 0.91X2 > 0.88 (X1 + X2) X1, X2 > 0

An Introduction to Linear Programming


42

Lecture 2 (Cont d)

Examples

Example 1
43

Find the maximum values of the function z = 5x + 2y, given the following set of constraints:
2x

+ 3y 6, 3x + 2y 6, x and y 0

Solution
44

3x + 2y 6

(Unbounded Solution)
2

2x + 3y 6
1-

Example 2 (Infeasible Solution)


45

Find the minimum values of the function z = 5x + 2y, given the following set of constraints:
3x

+ 3y 9, 4x + 5y 20, x and y 0

Solution
46

(Infeasible Solution)
3x + 3y 9

4-

32

4x + 5y 20

1I I I I I

Example 3 (Redundant Constraint)


47

Find the maximum values of the function z = 3x1 + 5x2, given the following set of constraints:
x1

4, 2x2 12, 3x1 + 2x2 18, 3x1 + 5x2 50, x1 and x2 0

Solution
48

4x + 5y 20
13 12 11 10 9876543 2 1I I I I

Redundant Constraint Z= 36 Optimum Solution X1 =2 X2 = 6

4x + 5y 20 4x + 5y 20

4x + 5y 20
I I I I I I I I I I I I I

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Solution (Change Objective)


49

13 12 11 10 9876543 2 1I I I I I

If z = 3x1 + 2x2
Optimum Solution

Z= 18 X1 =4 X2 = 3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Example 4
50

Find the minimum value of the given function z = 3 x1 2 x2, and the point at which it occurs, for the given set of constraints:
4 x1

+ 5 x2 < 20 x1 + x 2 > 3 x1 = 1 x1 and x2 > 0

Solution
51

x1 = 1 z = 3 x1 2 x2

4-

3-

4 x1 + 5 x2 < 20
2

x1 + x2
1I I I I

>3
I

Example 5
52

Progress city is studying the feasibility of introducing a mass transit bus system that will reduce the pollution problem by reducing in-city driving. The initial study seeks the determination of the minimum number of buses that can handle transportation needs. After gathering necessary information, the city engineer noticed that the minimum number of buses needed to meet fluctuates with the time of the day. The figure below summarizes the engineers findings. It was decided that to carry out the required daily maintenance, each bus could operate only 8 successive hours a day.

Example 5
53

Solution
54

Solution
55

Decision variables:

X1: Number of buses starting at 12:01 A.M.


X2: Number of buses starting at 04:01 A.M. X3: Number of buses starting at 08:01 A.M. X4: Number of buses starting at 12:01 P.M. X5: Number of buses starting at 04:01 P.M.

X6: Number of buses starting at 08:01 P.M.

Solution
56

Objective function: Minimize z = X1 + X2 + X3 + X4 + X5 + X6 Subject to: X1 + X6 > 4 X1 + X2 >8 X2 + X3 > 10 X3 + X 4 >7 X 4 + X5 > 12 X5 + X 6 > 4 X 1 , X2 , X3 , X4 , X 5 , X6 > 0

Example 6
57

A cargo plane has three compartments for storing cargo: front, center, and back. These compartments have capacity limits on both weight and space, as summarized below:
Compartment Front Center Back Weight capacity (tons) 12 18 10 Space capacity (cube feet) 7000 9000 5000

Example 6
58

Furthermore, the weight of the cargo in the respective compartments must be the same proportion of that compartments weight capacity to maintain the balance of the airplane. The following four cargoes have been offered for shipment on an upcoming flight as space is available:
Cargo 1 2 3 4 Weight (tons) 20 16 25 13 Volume (cubic feet/ton) 500 700 600 400 Profit ($/ton) 320 400 360 290

Example 6
59

Any portion of these cargoes can be accepted. The objective is to determine how much (if any) of each cargo should be accepted and how to distribute each among the compartments to maximize the total profit for the flight. Formulate a linear programming model for this problem.

Solution
60

Decision variables: : Number of tons of cargo type 1 stored in the front compartment : Number of tons of cargo type 1 stored in the center compartment : Number of tons of cargo type 1 stored in the back compartment : Number of tons of cargo type 2 stored in the front compartment : Number of tons of cargo type 2 stored in the center compartment : Number of tons of cargo type 2 stored in the back compartment : Number of tons of cargo type 3 stored in the front compartment : Number of tons of cargo type 3 stored in the center compartment : Number of tons of cargo type 3 stored in the back compartment : Number of tons of cargo type 4 stored in the front compartment : Number of tons of cargo type 4 stored in the center compartment : Number of tons of cargo type 4 stored in the back compartment

Solution
61

Objective function: Maximize

Solution
62

Subject to:

Solution
63

Subject to:

Example 7
64

The pacific paper company produces paper rolls with a standard width of 20 feet each. Special customer orders with different widths are produced by slitting the standard rolls. Typical orders (which may vary from day to day) are summarized in the following table:
Order Desired width (ft) Desired number of rolls

1 2 3

5 7 9

150 200 300

Example 7
65

In practice, an order is filled by setting the slitting knives to the desired widths. Usually, there are a number of ways in which a standard roll can be slit to fill a given order. The next figure shows three possible knife settings for the 20-foot roll. Although there are other feasible settings, we limit the discussion for the moment to considering settings A, B, and C. We can combine the given settings in a number of ways to fill orders for widths 5, 7, and 9 feet.

Example 7
66

Example 7
67

Find the optimum combination of settings to fulfill the orders while minimizing the trim loss. The following are two feasible combinations:
1. Slit 300 (standard rolls) using setting A, and 75 rolls using setting B. 2. Slit 200 rolls using setting A, and 100 rolls using setting C.

Solution
68

Required width (ft) 1

Knife settings 2 3 4 5 6

Minimum number of rolls

5
7 9 Trim loss per foot of length

0
1 1 4

2
1 0 3

2
0 1 1

4
0 0 0

1
2 0 1

0
0 2 2

150
200 300

Solution
69

Decision Variables

Xi = Number of standard rolls to be slit according to setting i for I = 1,2, ,6

Solution
70

Objective Function

Minimize Z = X1 + X2 + X3 + X4 + X5 + X6 Subject to 2X1 + 2X3 + 4X4 + X5 > 150 X 1 + X2 + 2X5 > 200 X 1 + X3 + 2X6 > 300 X1, X2, X3, X4, X5, X6 > 0

Solving LP Problems The Simplex Method


71

Lecture 3

Introduction
72

solving LP models using graphical method is only limited

to solving models with a maximum number of two decision variables. When the number of variables exceeds this, which is the case in most practical cases, the graphical method becomes inconvenient. We, thus, seek another method for solving LP models with more than two variables. The most common method is the analytical Simplex method. The Simplex method is an algorithm (a sequence of steps) that solves LP models. There are many common Simplex algorithms: the extended tableau, the condensed tableau, and the 2-phase method.

LP Terminologies
73

Feasible solution: The set of feasible solutions to a linear

programming problem form a convex set for which all included points satisfy all constraints and non-negativity conditions. Infeasible solution: Any point that does not satisfy all the constraints and non-negativity conditions is termed infeasible. Basic solution: A basic solution may be identified as the intersection of two (or more) constraints. Extreme points: The extreme points of the convex set of feasible solutions are equivalent to the set of basic feasible solutions. Optimal solution: The optimal solution to a given linear programming problem, if it exists, will occur at one or more extreme points.

Steps of the Simplex Process


74

The general steps to the Simplex process are:


1.
2.

Begin the search at an extreme point (a basic feasible


solution).

3. 4.

Determine if movement to an adjacent extreme point can improve on the optimization of the objective function. If not, then present solution is optimal. Move to the adjacent extreme point which offers the most improvement in the objective function. Continue steps 2 and 3 until the optimal solution is found or until it can be shown that the problem is either unbounded or infeasible.

Standard LP Form
75

The properties of this form are as follows:


All

the constraints are equations. All the variables are nonnegative. The objective function may be maximization or minimization

We shall call the inequalities with the sign of < Type I inequalities and inequalities of the sign > Type II inequalities.

Standard LP Form
76

Type I inequalities <

In the constraint X1 + 2X2 < 6, Converting it to this equation X1 + 2X2 + S1 = 6 (Adding a Slack Variable) Type II inequalities > In the constraint 3X1 + 2X2 3X3 5 Converting it to this equation 3X1 + 2X2 3X3 S2 = 5 (Adding a Surplus Variable)

Standard LP Form
77

The Artificial Variable


is added to overcome the negative value of the Surplus variable, the artificial variable doesnt have any physical significance; it is truly an artificial device employed to drive an immediate recognizable basic feasible solution.

Example: 3X1 + 2X2 3X3 5 Converting it to this equation 3X1 + 2X2 3X3 S2 + R1 = 5

Standard LP Form
78

Impact on the objective function


For

Simplicity, the objective functions should be considered as the maximization form. Thus, when dealing with a minimization objective, we simply multiply the objective by 1 and maximize it.

Given a maximization objective z, r surplus variables, and t artificial variables, the modified objective is: n r t
Maximize z c j x j c k s k c p R p
j 1 k 1 p 1

Standard LP Form
79

Maximize z c j x j c k s k c p R p
j 1 k 1 p 1

Original Objective Function Impact of the slack and surplus variables Where ck = zero Impact of the artificial variables Where cp = -M

Example on an LP Model
80

Maximize

Z = 7X1 3X2 + 5X3 Subject to,


X1 + X2 + X 3 > 9 3X1 + 2X2 + X3 < 12

X1, X2, X3 > 0

Transforming it to the Standard LP Form


81

The new Constraints

X1 + X2 + X3 - S1 + R1 =9 3X1 + 2X2 + X3 + S2 = 12 X1, X2, X3, S1, S2, and R1 > 0 The new Objective Function Maximize z= 7X1 3X2 + 5X3 + 0S1 MR1 + 0S2

Note: we will use (X) instead of S and R

Transforming it to the Standard LP Form


82

The new Constraints

X1 + X2 + X3 -X4 + X5 =9 3X1 + 2X2 + X3 + X6 = 12 X1, X2, X3, X4, X5, and X6 > 0 The new Objective Function Maximize z= 7X1 3X2 + 5X3 + 0X4 MX5 + 0X6

Therefore the solution will become

The Extended Tableau


83

After transforming the problem to the standard LP form, we set up the initial extended tableau as follows:
Coefficient Basic of the Variables Basic Labels Variables CB, 1 . . XB, 1 . . Variable Labels X1 y1,1 . . X2 y1,2 . . . . Xn y1,n . . Basic Feasible Solution Values XB,1 . .

.
CB, m

.
XB, m

.
ym,1 z1 c 1

.
ym,2 z2 c 2

.
ym,n zn c n

.
XB,m z

Indicator Row

The Extended Tableau


84

After transforming the problem to the standard LP form, we set up the initial extended tableau as follows: Where, CB,m: The coefficient of the basic variable number m in the objective function. XB,m: The basic variable number m ym,n: The coefficient of the variable number n in the constraint associated with basic variable number m zn cn: The indicator value of variable number n. Youll learn how to calculate it.

Example
85

Given the following problem, setup the initial extended tableau, then find the optimum solution to the problem using the Simplex algorithm.

Maximize
z = 6X1 + 8X2

Subject to,
4X1 + X2 20 X1 + 4X2 40 X1, X2 0

Step 1: Find Standard LP Form


86

Maximize
z = 6X1 + 8X2 + 0X3 + 0X4

Subject to,
4X1 + X2 + X3 = 20 X1 + 4X2 + X4 = 40 X1, X2, X3, X4 0

Step 2: Construct the Initial Extended Tableau


87

cj
cB 0 0 BV X3 X4

6
X1

8
X2

0
X3

0
X4 XB

Step 2: Construct the Initial Extended Tableau


88

Fill in the values of yi,j

cj
cB 0 0 BV X3 X4

6
X1 4 1

8
X2 1 4

0
X3 1 0

0
X4 0 1 XB

Step 2: Construct the Initial Extended Tableau


89

Fill in the values of the starting basic feasible

solution
cj
cB 0 0 BV X3 X4

6
X1 4 1

8
X2 1 4

0
X3 1 0

0
X4 0 1 XB 20 40

Step 2: Construct the Initial Extended Tableau


90

Calculate the indicator row, as follows:

zj cj = cbyj cj
cj
cB 0 0 BV X3 X4

6
X1 4 1

8
X2 1 4

0
X3 1 0

0
X4 0 1 XB 20 40

Step 2: Construct the Initial Extended Tableau


91

Calculate the indicator row, as follows:

z1 c1 = [(4x0) + (1x0)] 6 = -6
cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4

0
X3 1 0

0
X4 0 1 XB 20 40

Step 2: Construct the Initial Extended Tableau


92

Calculate the indicator row, as follows:

z2 c2 = [(1x0) + (4x0)] 8 = -8
cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0

0
X4 0 1 XB 20 40

Step 2: Construct the Initial Extended Tableau


93

Therefore the indicator row is as follows:

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40

Step 2: Construct the Initial Extended Tableau


94

Compute the value of the objective function

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 2: Construct the Initial Extended Tableau


95

This is one of the feasible solutions (iteration 0). If there are negative values in the indicator row, you can reach a better solution by continuing with the following steps.

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 3: Determine the Entering Variable


96

The variable having the most negative zj cj value. The entering variable is X2 (because its zj cj is equal to -8).

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 4: Determine the Departing Variable


97

Divide the XB column by the yi column of the entering variable, and choosing the least nonnegative value as the departing (leaving) variable.

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 4: Determine the Departing Variable


98

cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 4: Determine the Departing Variable


99

Pivot Element (yij)


cj
cB 0 0 BV X3 X4

6
X1 4 1 -6

8
X2 1 4 -8

0
X3 1 0 0

0
X4 0 1 0 XB 20 40 0

Step 5: Construct the new tableau iteration 1


100

Replace the departing variable with the entering

variable.
cj
cB 0 8 BV X3 X2

6
X1

8
X2

0
X3

0
X4 XB

Step 5: Construct the new tableau iteration 1


101

The row of the entering variable in the new tableau (i.e.

row number i) is obtained by dividing the old row i by the pivot element. cj
cB 0 8 BV X3 X2 1/4 1 0 1/4 10

6
X1

8
X2

0
X3

0
X4 XB

Step 5: Construct the new tableau iteration 1


102

The column of the departing variable in the new

tableau is all equal to zero, except to the element in the entering variable row which is equal to one. cj
cB 0 8 BV X3 X2 1/4

6
X1

8
X2 0 1 0

0
X3

0
X4 XB

1/4

10

Step 5: Construct the new tableau iteration 1


103

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2 1/4

6
X1

8
X2 0 1 0

0
X3

0
X4 XB

1/4

10

Step 5: Construct the new tableau iteration 1


104

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2 1/4

6
X1

8
X2 0 1 0

0
X3

0
X4 XB

1/4

10

Step 5: Construct the new tableau iteration 1


105

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4

8
X2 0 1 0

0
X3

0
X4 XB

1/4

10

Step 5: Construct the new tableau iteration 1


106

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4

8
X2 0 1 0

0
X3

0
X4 -1/4 XB

1/4

10

Step 5: Construct the new tableau iteration 1


107

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4

8
X2 0 1 0

0
X3 1 0

0
X4 -1/4 1/4 10 XB

Step 5: Construct the new tableau iteration 1


108

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4

8
X2 0 1 0

0
X3 1 0

0
X4 -1/4 1/4 XB 10 10

Step 5: Construct the new tableau iteration 1


109

The remaining elements of the tableau are calculated

using the following relations. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4 -4

8
X2 0 1 0

0
X3 1 0

0
X4 -1/4 1/4 XB 10 10

Step 5: Construct the new tableau iteration 1


110

Calculate the new objective value and indicator row,

and the final form of the new tableau is given as follows. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4 -4

8
X2 0 1 0

0
X3 1 0 0

0
X4 -1/4 1/4 2 XB 10 10 80

Repeat Steps 3 and 4 for Iteration 2


111

The first iteration tableau with the entering and

departing variables shown. cj


cB 0 8 BV X3 X2

6
X1 15/4 1/4 -4

8
X2 0 1 0

0
X3 1 0 0

0
X4 -1/4 1/4 2 XB 10 10 80

Repeat Steps 5 for Iteration 2


112

The completed second iteration tableau

cj
cB 6 8 BV X1 X2

6
X1 1 0 0

8
X2 0 1 0

0
X3 4/15 -1/15

0
X4 -1/15 4/15 XB 8/3 28/3

16/15 26/15 272/3

Repeat Steps 5 for Iteration 2


113

Now, since all the zj cj are nonnegative, and there are

no artificial variables in the basis, we have reached the optimal solution. cj


cB 6 8 BV X1 X2

6
X1 1 0 0

8
X2 0 1 0

0
X3 4/15 -1/15

0
X4 -1/15 4/15 XB 8/3 28/3

16/15 26/15 272/3

The Optimum Solution


114

X*1 = 8/3

X*2 = 28/3
X*3 = 0 X*4 = 0 z* = 272/3

Summary
115

We can summarize the Simplex algorithm in the following steps,


1. 2.

3.

Find standard LP form Find the starting basic solution by constructing the initial tableau Decide whether the solution is now optimal, infeasible, unbounded, or can be improved according to the following diagram.

Summary
116 Check indicator row (zj - cj)

There are negative values (Do not stop)

There are no negative values (Stop)

There are positive ratios (Solution can be further improved)

There are no negative ratios (Solution is unbounded)

There are artificial variables in the basis (Solution is infeasible)

There are no artificial variables in the basis (Solution is optimal)

Summary
117

4. If the solution is optimal, infeasible, or

unbounded, then the problem is completed. If the solution can be improved, then do a new iteration. 5. Go to step III.

Special Types of LP Problems


118

Lecture 4

Special Features
119

There are a number of particular features that

tend to identify or isolate the special problem classes that are presented.
Variables: are usually integers and could also be of binary value. 2. Network Representation: consists of:
1.

Nodes Branches

3.

Computational Complexity

The Transportation Problem


120

Lecture 4 A

The Transportation Problem


121

A transportation problem basically deals with the problem, which aims to find the best way to fulfill the demand of n demand points (sources) using the capacities of m supply points (sinks). While trying to find the best way, generally a variable cost of shipping the product from one supply point to a demand point or a similar constraint should be taken into consideration.

The Transportation Problem (Contd)


122

I
[10]

[8]

(2) (4) (7) (3)

Sources

II
(5) [15]
``

[12]

Sinks

(1) (7)

B
(3) (2)

(2) (6) (6)

III

[10]

[15]

IV

[10]

Formulating Transportation Problems


123

Example 1: Powerco has three electric power plants that supply the electric needs of four cities:

The associated supply of each plant and demand of each city is given in the table 1. The cost of sending 1 million kwh of electricity from a plant to a city depends on the distance the electricity must travel.

The Transportation Table


124

A transportation problem is specified by the supply, the demand, and the shipping costs. So the relevant data can be summarized in a transportation tableau. The transportation table implicitly expresses the supply and demand constraints and the shipping cost between each demand and supply point.

The Transportation Table


125

Table 1. Shipping costs, Supply, and Demand for Powerco Example


From City 1 Plant 1 $8 To City 2 City 3 City 4 $9 Supply (Million kwh) 35

$6

$10

Plant 2 Plant 3
Demand (Million kwh)

$9 $14 45

$12 $9 20

$13 $16 30

$7 $5 30

50 40

Solution
126

1. Decision Variable: Since we have to

determine how much electricity is sent from each plant to each city;

Xij = Amount of electricity produced at plant i and sent to city j X14 = Amount of electricity produced at plant 1 and sent to city 4

Solution (Contd)
127

2. Objective Function: Since we want to minimize

the total cost of shipping from plants to cities;

Minimize Z = 8X11+6X12+10X13+9X14+9X21+ 12X22+ 13X23+7X24 +14X31+9X32+16X33+5X34

3. Supply Constraints: Since each supply point has

a limited production capacity;


X11+X12+X13+X14 <=

35 X21+X22+X23+X24 <= 50 X31+X32+X33+X34 <= 40

Solution (Contd)
128

4. Demand Constraints: Since each demand point

has a limited production capacity;

X11+X21+X31 >=

45 X12+X22+X32 >= 20 X13+X23+X33 >= 30 X14+X24+X34 >= 30


5. Sign Constraints: Since a negative amount of

electricity can not be shipped all Xijs must be non negative;


>= 0 (i= 1,2,3; j= 1,2,3,4)

Xij

LP Formulation of Powercos Problem


129

Min Z = 8X11+6X12+10X13+9X14+9X21+12X22+13X23

+7X24 +14X31+9X32+16X33+5X34

S.T.: X11+X12+X13+X14 <= 35 (Supply Constraints)

X21+X22+X23+X24 <= 50 X31+X32+X33+X34 <= 40 X11+X21+X31 >= 45 (Demand Constraints) X12+X22+X32 >= 20 X13+X23+X33 >= 30 X14+X24+X34 >= 30 Xij >= 0 (i= 1,2,3; j= 1,2,3,4) (Sign Constraints)

General Description of a Transportation Problem


130

A set of m supply points from which a good is shipped. Supply point i can supply at most si units. 2. A set of n demand points to which the good is shipped. Demand point j must receive at least di units of the shipped good. 3. Each unit produced at supply point i and shipped to demand point j incurs a variable cost of cij.
1.

General Description of a Transportation Problem


131

Xij = number of units shipped from supply point i to demand point j


min cijXij
i 1 j 1 i m j n

s.t. Xij si (i 1,2,...,m)


j 1

j n

X
i 1

i m

ij

dj ( j 1,2,...,n)

Xij 0(i 1,2,...,m; j 1,2,...,n)

Balanced Transportation Problem


132

If Total supply equals to total demand, the problem is said to be a balanced transportation problem:

s d
i i 1 j 1

i m

j n

Balancing Transportation Problems


133

1. Balancing a TP if total supply exceeds total

demand:

By adding dummy demand point. Since shipments to the dummy demand point are not real, they are assigned a cost of zero.

2. Balancing a transportation problem if total supply

is strictly less than total demand:

There is no doubt that in such a case one or more of the demand will be left unmet. Generally in such situations a penalty cost is often associated with unmet demand and as one can guess this time the total penalty cost is desired to be minimum

Finding Basic Feasible Solution for TP


134

Unlike other Linear Programming problems, a balanced TP with m supply points and n demand points is easier to solve, although it has m + n equality constraints. The reason for that is, if a set of decision variables (xijs) satisfy all but one constraint, the values for xijs will satisfy that remaining constraint automatically.

Solving a Balanced Transportation Problem


135

There are three basic Methods to find the

basic feasible solution for a balanced Transportation Problem: 1. Northwest Corner Method 2. Minimum Cost Method 3. Vogels Method

1. Northwest Corner Method


136

To find the BFS by the NWC method:

Begin in the upper left (northwest) corner of the transportation tableau and set x11 as large as possible (here the limitations for setting x11 to a larger number, will be the demand of demand point 1 and the supply of supply point 1. Your x11 value can not be greater than minimum of this 2 values).

1. Northwest Corner Method (Contd)


137

According to the explanation in the previous 5 slide we can set x11=3 (meaning demand of 6 demand point 1 is satisfied by supply point 1).
2 3 3 5 2 3 2 6 2 X 5 2 3

1. Northwest Corner Method (Contd)


138

After we check the east and south cells, we saw 3 X that we can go east 2 (meaning supply point 1 still has capacity to fulfill some demand). 6
2 X
3

3
2 3

3
X 3 2

1. Northwest Corner Method (Contd)


139

After applying the same procedure, we saw that 3 2 we can go south this time (meaning X demand point 2 needs more 3 supply 2 by supply point 2). 1
2 X 3 X 2 3 2 1 X 3 X X 2 X X X 2

1. Northwest Corner Method (Contd)


140

Finally, we will have the following BFS, which is: x11=3, x12=2, x22=3, x23=2, x24=1, x34=2
3 2 3 2 1 2 X X X X X X X

2. Least Cost Method


141

The Northwest Corner Method dos not utilize shipping

costs. It can yield an initial bfs easily but the total shipping cost may be very high. The least cost method uses shipping costs in order come up with a bfs that has a lower cost. To begin the least cost method, first we find the decision variable with the smallest shipping cost (Xij). Then assign Xij its largest possible value, which is the minimum of si and dj

2. Least Cost Method (Contd)


142

After that, as in the Northwest Corner Method we

should cross out row i and column j and reduce the supply or demand of the noncrossed-out row or column by the value of Xij. Then we will choose the cell with the minimum cost of shipping from the cells that do not lie in a crossed-out row or column and we will repeat the procedure.

2. Least Cost Method (Contd)


143

Step 1: Select the cell with minimum cost.


2 3 5 6 5 2 1 3 5 10 3 8 4 6

15

12

2. Least Cost Method (Contd)


144

Step 2: Cross-out column 2


2 3 5 6 5 2 8 3 8 4 6 15 1 3 5 2

12

2. Least Cost Method (Contd)


145

Step 3: Find the new cell with minimum shipping cost and cross-out row 2
2 3 5 6 5 2 2 3 8 8 4 6 15 1 3 5 X

10

2. Least Cost Method (Contd)


146

Step 4: Find the new cell with minimum shipping cost and cross-out row 1
2 5 2 2 3 8 8 4 6 15 1 3 5 X 3 5 6 X

2. Least Cost Method (Contd)


147

Step 5: Find the new cell with minimum shipping cost and cross-out column 1
2 5 2 2 3 5 X X 4 6 8 8 4 6 10 1 3 5 X 3 5 6 X

2. Least Cost Method (Contd)


148

Step 6: Find the new cell with minimum shipping cost and cross-out column 3
2 5 2 2 3 5 X X 8 8 4 X 6 4 6 6 1 3 5 X 3 5 6 X

2. Least Cost Method (Contd)


149

Step 7: Finally assign 6 to last cell. The BFS is found as: X11=5, X21=2, X22=8, X31=5, X33=4 and X34=6
2 5 2 2 3 5 X X 8 8 4 X 4 6 X 6 X 1 3 5 X 3 5 6 X

3. Vogels Method
150

Begin with computing each row and column a penalty.

The penalty will be equal to the difference between the two smallest shipping costs in the row or column. Identify the row or column with the largest penalty. Find the first basic variable which has the smallest shipping cost in that row or column. Then assign the highest possible value to that variable, and cross-out the row or column as in the previous methods. Compute new penalties and use the same procedure.

3. Vogels Method (Contd)


151

Step 1: Compute the penalties.


Supply 6 7 8 10 15 80 78 7-6=1 Row Penalty

15

78-15=63

Demand Column Penalty

15 15-6=9

5 80-7=73

5 78-8=70

3. Vogels Method (Contd)


152

Step 2: Identify the largest penalty and assign

the highest possible value to the variable.


Supply 6 5 15 80 78 15 78-15=63 7 8 5 8-6=2 Row Penalty

Demand Column Penalty

15 15-6=9

X _

5 78-8=70

3. Vogels Method (Contd)


153

Step 3: Identify the largest penalty and assign the highest possible value to the variable.
Supply 6 5 15 80 7 5 78 15 _ 8 0 _ Row Penalty

Demand Column Penalty

15 15-6=9

X _

X _

3. Vogels Method (Contd)


154

Step 4: Identify the largest penalty and assign the highest possible value to the variable.
Supply 6 0 15 5 80 7 5 78 15 _ 8 X _ Row Penalty

Demand Column Penalty

15 _

X _

X _

3. Vogels Method (Contd)


155

Step 5: Finally the BFS is found as X11=0, X12=5, X13=5, and X21=15
Supply 6 0 15 15 Demand Column Penalty X _ X _ X _ 5 80 7 5 78 X _ 8 X _ Row Penalty

Improving the Obtained Solution


156

1. Determine the entering variable: Using the method of multipliers. Calculate the multipliers u & v, where:
Values

of the multipliers can be determined from this relation by assuming an arbitrary value for any one of them. For each non-basic variable , calculating

The entering variable is then selected as the one with the most positive

Improving the Obtained Solution (Contd)


157

1. Determine the entering

1 1 5

2 10

4 15 25

variable:
For

5 15 5 the opposite table, the 2 3 5 equations associated with 5 15 15 10 the basic variables are given as: x : u + v = c = 10 x : u + v = c = 9 11 1 1 11 23 2 3 23

x12: u1 + v2 = c12 = 0 x22: u2 + v2 = c22 = 7


By

x24: u2 + v4 = c24 = 20 x34: u3 + v4 = c34 = 18

letting u1 = 0, the values of the multipliers are successively determined as v1 = 10, v2 = 0, u2 = 7, v3 = 2, v4 = 13, and u3 = 5.

Improving the Obtained Solution (Contd)


158

1. Determine the entering variable:


X31

has the most positive

Improving the Obtained Solution (Contd)


159

2. Determine

the

leaving

variable

(Loop

construction):

A closed loop for the current entering variable is constructed. The loop starts and ends at the designated nonbasic variable. It consists of successive horizontal and vertical (connected) segments whose end points must be basic variables, except for the end points that are associated with the entering variable.

Improving the Obtained Solution (Contd)


160

2. Determine

the

leaving

variable

(Loop

construction):

This means that every corner element of the loop must be a cell containing a basic variable. It is immaterial whether the loop is traced in a clockwise or counterclockwise direction.

In the example:

This loop may be defined in terms of the basic variables as X31 X11 X12 X22 X24 X34 X31

Improving the Obtained Solution (Contd)


161

1
10 1 5

2
0 10

3
20

4
11 15

12 2 5

+
7 15 9 5 20 25

0
3

+
16
5

14

18
5

x31

+
5 15 15 10

Improving the Obtained Solution (Contd)


162

2. Determine

the

leaving

variable

(Loop

construction):

The leaving variable is selected from among the corner variables of the loop that will decrease when the entering variable X31 increases above the zero level. These are indicated by the by the variables in the squares labeled with minus signs. In our particular problem, these variables are X11, X22, and X34.

Improving the Obtained Solution (Contd)


163

2. Determine

the

leaving

variable

(Loop

construction):

The leaving variable is selected as the one having the smallest value, since it will be the first to reach zero value and any further decrease will cause it to be negative. Since the three variables have the same value (=5), we arbitrarily select any of them as the leaving variable. Suppose that X34 is taken as the leaving variable, then the value of X31 is increased to 5, and the values of the corner basic variables are adjusted accordingly

Improving the Obtained Solution (Contd)


164

1 10

2 0 15 12 7 0 15

3 20

4 11

1
0 2 10 9 20

15

25

0
3

14

16

18
5

5
5 15 15 10

Improving the Obtained Solution (Contd)


165

3. Repeat the Previous Steps Till Optimality

Is Reached:

The new basic solution should be checked for optimality by computing the new multipliers. The previous steps should be repeated for each iteration. The optimum solution is obtained when all the are non-positive.

The Transshipment Problem


166

Lecture 4 B

The Transshipment Problem


167

It is a more general view of the transportation

problem. Not only is movement allowed from sources to sinks, but also:
From

sources to sources. From sinks to sinks. From sinks back to sources.


Costs are usually decreased, but problem size

increases significantly.

Transportation vs. Transshipment


168

Transportation
C A D B E

Transshipment
C A D B E

The Transshipment Matrix


169 To From 1 . . Source i . . m 1 . . Sink j . . n Demand

Source

Sink

Availability a1 + U . . ai + U . . am + U U . . U . . U

1im

1jn

(1) Source-to-source sub-matrix

(2) Source-to-sink submatrix

(3) Sink-to-source sub-matrix


UUU

(4) Sink-to-sink submatrix


b1 + U bj + U bn + U

The Transshipment Matrix (Contd)


170

Contains 4 main sub-matricies:


1.
2. 3. 4.

source-to-source, source-to-sink, sink-to-source, sink-to-sink.

All

availabilities and demands include a constant U:


the maximum amount that could be transshipped

Transshipment Example
171

Transshipment Network
[9]

Embedded Transportation Network


I
[20] [9]

I
[20]

A
(3)

(12) (10) (14) (2)

(12) (10) (14)

II
(6) (10) (5) (6)

[9] (3)
(6) (10) [7]

II B
(5)

[9]

[7]

III

[9]

III

[9]

Transshipment Example (Contd)


172

We shall first, for the purpose of comparison,

solve for the solution to the embedded transportation problem.


I A 12 9 6 9 10 II 10 2 5 III 14 Available 20

B Demand 9

7
9 9

Transshipment Example (Contd)


173

Then, we construct the transshipment matrix:


To From Source A B A 0 3 12 10 14 27 27 Source B 3 0 6 10 5 Sink

I
12 6 0 2 3 9 + 27

II
10 10 2 0 6 9 + 27

III
14 5 3 6 0 9 + 27

Available 20 + 27 7 + 27 27 27 27

I
Sink

II III

Demand

Transshipment Example (Contd)


174

Since

, we have let U equal to 27 units. Next is to obtain initial feasible solution:


Could be achieved by VAM. Solution of the embedded transportation problem will be used instead. Start by filling in the source-to-sink portion of the sub-matrix (which is the embedded transportation matrix). Next, we allocate, to each main diagonal cell, the amount U, which, for this problem, is 27 units.

Transshipment Example (Contd)


175

The resultant feasible initial allocation:


To
From A A B 27 0 3 12 10 14 27 27 B 3 0 6 10 5 36 9

Source

Sink

I
12 6 0 2 3 9

II
10 10 2 0 6 36 2 7

III
14 5 3 6 0 36

Available

Source

47 34 27 27 27

27

I
Sink

27

II III

27

27

Demand

Transshipment Example (Contd)


176

Next,

solving the resultant matrix using the normal transportation technique. Final transshipment solution:
To From Source Sink

A
A B 27 0 3 12 10 14 27 11 16

B
3 0 6 10 5 27

I
12 6 0 2 3 36 9

II
10 10 2 0 6 36

III
14 5 3 6 0 36

Available 47 34 27 27 27

Source

9 27

I
Sink

II III

27

27

Demand

Transshipment Example (Contd)


177

Final solution representation:


I
[20] [9]

A
11

9 [7]

II
9

[9]

B III
[9]

The Assignment Problem


178

Lecture 4 C

The Assignment Problem


179

The assignment problem is a special subclass of the

transportation problem. The assignment problem gets its name from a particular application in which we wish to assign "individuals" to "tasks (or tasks to machines, etc.). It is assumed that each individual can be assigned to only one task, and each task is assigned to only one individual.

The Mathematical Model


180

Decision Variables:

Objective Function:

= Number of source nodes (jobs, employees, etc.) n = Number of sink nodes (machines, offices, etc.) cij = Cost of assigning source i to sink j

The Mathematical Model (Contd)


181

Subject to:

The Assignment Problem Example


182

Machineco has four jobs to be completed. Each machine must be assigned to complete one job. The time required to setup each machine for completing each job is shown in the table below. Machinco wants to minimize the total setup time needed to complete the four jobs.

The Assignment Problem Example


183

Setup times (Also called the cost matrix)


Time (Hours)
Job1 Job2 Job3 Job4 Machine 1 Machine 2 Machine 3 14 2 7 5 12 8 8 6 3 7 5 9

Machine 4

10

The Model
184

According to the setup table Machincos problem can be

formulated as follows (for i,j=1,2,3,4):


min Z 14 X 11 5 X 12 8 X 13 7 X 14 2 X 21 12 X 22 6 X 23 5 X 24 7 X 31 8 X 32 3 X 33 9 X 34 2 X 41 X 42 6 X 43 10 X 44 s.t. X 11 X 12 X 13 X 14 1 X 21 X 22 X 23 X 24 1 X 31 X 32 X 33 X 34 1 X 41 X 42 X 43 X 44 1 X 11 X 21 X 31 X 41 1 X 12 X 22 X 32 X 42 1 X 13 X 23 X 33 X 43 1 X 14 X 24 X 34 X 44 1 Xij 0 or Xij 1

The Model
185

For the model on the previous page note that:


Xij=1

if machine i is assigned to meet the demands of

job j Xij=0 if machine i is assigned to meet the demands of job j In general an assignment problem is a balanced transportation problem in which all supplies and demands are equal to 1.

Solution Method (Contd)


186

Although the transportation simplex appears to

be very efficient, there is a certain class of transportation problems, called assignment problems, for which the transportation simplex is often very inefficient. For that reason there is an other method called The Hungarian Method. Some basic ideas:
1.

Suppose we ranked all feasible assignments in increasing order of cost.

Solution Method (Contd)


187

2.

3.

4.

The ranking does not change if one subtracts the same amount, say, D, from all costs in the same row, since all assignment costs are reduced by D. The ranking does not change if one subtracts the same amount, say, D, from all costs in the same column, since all assignment costs are reduced by D. An assignment selects one entry in each row and one in each column.

Solution Method (Contd)


188

5.

6.

As long as all costs are kept nonnegative, if the reduced cost matrix allows a zero cost assignment, that assignment is optimal. If there is a zero cost in each row and a zero cost in each column of the reduced cost matrix, this assignment is optimal.

Solution Method (Contd)


189

The steps of The Hungarian Method are as listed below:

Step1: Find the minimum element in each row of the mxm cost matrix. Construct a new matrix by subtracting from each cost the minimum cost in its row. For this new matrix, find the minimum cost in each column. Construct a new matrix (reduced cost matrix) by subtracting from each cost the minimum cost in its column. Step 2: Draw the minimum number of lines (horizontal and/or vertical) that are needed to cover all zeros in the reduced cost matrix. If m lines are required , an optimal solution is available among the covered zeros in the matrix. If fewer than m lines are required, proceed to step 3.

Solution Method (Contd)


190

The steps of The Hungarian Method are as

listed below:

Step 3: Find the smallest nonzero element (call its value k) in the reduced cost matrix that is uncovered by the lines drawn in step 2. Now subtract k from each uncovered element of the reduced cost matrix and add k to each element that is covered by two lines. Return to step 2.

Solving the Assignment Problem


191

Row reduction:
Time (Hours) Job 1 Machine 1 Machine 2 Machine 3 Machine 4 14-5 2-2 7-3 2-2 Job 2 5-5 12-2 8-3 4-2 Job 3 8-5 6-2 3-3 6-2 Job 4 7-5 5-2 9-3 10-2

Solving the Assignment Problem


192

Column reduction:
Time (Hours) Job1
Machine 1 Machine 2 Machine 3 Machine 4 9 0 4 0

Job2
0 10 5 2

Job3
3 4 0 4

Job4
2-2 3-2 6-2 8-2

Solving the Assignment Problem


193

Result of column reduction:


Time (Hours) Job1 Machine 1 Machine 2 Machine 3 Machine 4 9 0 4 0 Job2 0 10 5 2 Job3 3 4 0 4 Job4 0 1 4 6

Solving the Assignment Problem


194

Crossing out zeros:


Time (Hours) Job1 Machine 1 Machine 2 Machine 3 Machine 4 9+1 0 4 0 Job2 0 10-1 5-1 2-1 Job3 3+1 4 0 4 Job4 0 1-1 4-1 6-1

Solving the Assignment Problem


195

Crossing out zeros after modification:


Time (Hours) Job1 Machine 1 Machine 2 Machine 3 Machine 4 10 0 4 0 Job2 0 9 4 1 Job3 4 4 0 4 Job4 0 0 3 5

Solving the Assignment Problem


196

Optimal Assignment For the Reduced Cost Matrix


Time (Hours) Job1 Job2 Job3 Job4 Machine 1 Machine 2 Machine 3 Machine 4 10 0 4 0 0 9 4 1 4 4 0 4 0 0 3 5