SlideShare a Scribd company logo
1 of 83
Operations Research
First Year Computer
Text Book: Operations Research
7th Edition
Hamdy A. Taha
Course Outline
Part1: Deterministic Models
Chapter 2: Introduction to Linear Programming
2.1 Introduction.
2.2 Construction of the LP Model.
2.3 Graphical LP Solution.
2.3.1 Solution of a Maximization Model.
2.3.2 Solution of a Minimization Model.
2.3.3 Slack, Surplus, and Unrestricted Model.
2.4 Graphical Sensitivity Analysis.
2.4.1 Changes in the Objective Function Coefficient.
2.4.2 Unit Worth of a Resource.
2.5 Computer Solution of Linear Programming Problems.
2.6 Analysis of Selected Linear Programming Model.
2Dr.Farouk Sha'ban
Chapter 3: The Simplex Method
3.1 Introduction.
3.2 Standard Linear Programming Form and Its Solutions.
3.2.1 Standard Linear Programming Form.
3.2.2 Determination of Basic Solutions.
3.2.3 Unrestricted Variables and Basic Solution.
3.3 The Simplex Algorithm.
3.4 Simplex Method Application.
3.5 Special Cases in Simplex Method Application.
3.5.1 Degeneracy.
3.5.2 Alternative Optima.
3.5.3 Unbounded Solution.
3.5.4 Infeasible Solution.
3Dr.Farouk Sha'ban
Chapter 4: Duality.
4.1 Introduction.
4.2 Definition of the Dual Problem.
4.3 Relationship between the Optimal Primal and Dual.
Chapter 5: Transportation Model.
5.1 Definition of the Transportation Model.
5.3 The Transportation Algorithm.
5.3.1 Determination of the Starting Solution.
5.3.2 Iterative Computation of the Algorithm.
5.4 The Assignment Model.
4Dr.Farouk Sha'ban
Chapter 6: Network Models
6.1 Scope of Network Application.
6.2 Network Definitions.
6.3 Minimal Spanning Tree Algorithm.
6.4 Shortest Route Problem.
6.5 Maximal Flow Model.
6.7 CPM and PERT.
6.7.1 Network Representation.
6.7.2 Critical Path Computation.
6.7.3 Construction of the Time Schedule.
5Dr.Farouk Sha'ban
Introduction
Operations Research (OR)
It is a scientific approach to determine the optimum
(best) solution to a decision problem under the restriction
of limited resources. Using the mathematical techniques
to model, analyze, and solve the problem.
Phases of OR
1. Definition of the problem includes:-
• The description of the decision variables
(alternatives)
• The determination of the objective of the study
• The specification of the limitations under which
the modeled system operates. 6
Dr.Farouk Sha'ban
2. Model Construction
Translating the real world problem into
mathematical relationships (the most suitable
model to represent the system, LP, dynamic
programming, integer programming, ………..)
3.Solution of the model
Using well-defined optimization techniques.
An important aspect of model solution is
sensitivity analysis.
7Dr.Farouk Sha'ban
4.Model validity
Testing and evaluation of the model. A common
method for testing a validity of a model is to
compare its performance with some past data
available for the actual system.
5.Implementation of the solution
Implementation of the solution of validated model
involves the translation of the model's results into
instructions issued in understandable form to the
individual
8Dr.Farouk Sha'ban
Basic components of the model
1.Decision Variables
It is the unknown to determined from the solution of
a model (what does the model seek to determine). It
is one of the specific decisions made by a decision
maker (DM).
2.Objective Function
It is the end result (goal) desired to be achieved by
the system. A common objective is to maximize
profit or minimize cost. It is expressed as a
mathematical function of the system decision
variables.
9Dr.Farouk Sha'ban
3.Constraints
These are the limitations imposed on the
variables to satisfy the restriction of the modeled
system. They must be expressed as
mathematical functions of the system decision
variables (D.V.).
10Dr.Farouk Sha'ban
Example 1:
A company manufactures two products A&B. with
4 & 3 units. A&B take 3&2 minutes respectively
to be machined. The total time available at
machining department is 800 hours (100 days or
20 weeks). A market research showed that at
least 10000 units of A and not more than 6000
units of B are needed. It is required to determine
the number of units of A&B to be produced to
maximize profit.
11Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= number of units produced of A.
X2= number of units produced of B.
Objective Function
Maximize Z= 4 X1 + 3 X2
Constraints
3 X1 + 2 X2 <= 800x60
X1 >=10000
X2 <=6000
X1, X2 >=0
12Dr.Farouk Sha'ban
Example 2: Feed mix problem
A farmer is interested in feeding his cattle at minimum
cost.
Two feeds are used A&B. Each cow must get at least
400 grams/day of protein, at least 800 grams/day of
carbohydrates, and not more than 100 grams/day of
fat. Given that A contains 10% protein, 80%
carbohydrates and 10% fat while B contains 40%
protein, 60% carbohydrates and no fat. A costs 2
L.E/kg, and B costs 5 L.E/kg. Formulate the problem to
determine the optimum amount of each feed to
minimize cost.
13Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= weight of feed A kg/day/animal
X2= weight of feed B kg/day/animal
Objective Function
Minimize Z= 2 X1 + 5 X2
Constraints
Protein 0.1 X1 + 0.4 X2 >=0.4
Carbohydrates 0.8 X1 + 0.6 X2 >=0.8
Fats 0.1 X1 <= 0.1
X1, X2 >=0
14Dr.Farouk Sha'ban
Example 3: Blending Problem
An iron ore from 4 mines will be blended. The analysis has shown
that, in order to obtain suitable tensile properties, minimum requirements
must be met for 3 basic elements A, B, and C. Each of the 4 mines contains
different amounts of the 3 elements (see the table). Formulate to find the
least cost blend for one ton of iron ore.
15Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= Fraction of ton to be selected from mine number 1
X2= Fraction of ton to be selected from mine number 2
X3= Fraction of ton to be selected from mine number 3
X4= Fraction of ton to be selected from mine number 4
Objective Function
Minimize Z= 800 X1 + 400 X2 + 600 X3 + 500 X4
Constraints
10 X1 + 3 X2 + 8 X3 + 2X4 >= 5
90 X1 + 150 X2 + 75 X3 + 175 X4 >= 10
45 X1 + 25 X2 + 20 X3 + 37 X4 >= 30
X1 + X2 + X3 + X4 = 1
X1, X2, X3, X4 >= 0
16Dr.Farouk Sha'ban
Example 4: Inspection Problem
A company has 2 grades of inspectors 1&2. It is required that at
least 1800 pieces be inspected per 8 hour day. Grade 1 inspectors can
check pieces at the rate of 25 per hour with an accuracy of 98%. Grade
2 inspectors can check at the rate of 15 pieces per hour with an
accuracy of 95%. Grade 1 costs 4 L.E/hour, grade 2 costs 3 L.E/hour.
Each time an error is made by an inspector costs the company 2 L.E.
There are 8 grade 1 and 10 grade 2 inspectors available. The company
wants to determine the optimal assignment of inspectors which will
minimize the total cost of inspection/day.
17Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= Number of grade 1 inspectors/day.
X2= Number of grade 2 inspectors/day.
Objective Function
Cost of inspection = Cost of error + Inspector salary/day
Cost of grade 1/hour = 4 + (2 X 25 X 0.02) = 5 L.E
Cost of grade 2/hour = 3 + (2 X 15 X 0.05) = 4.5 L.E
Minimize Z= 8 (5 X1 + 4.5 X2)
= 40 X1 + 36 X2
Constraints
X1 <= 8
X2 <= 10
8(25) X1+ 8(15) X2 >= 1800
200 X1 + 120 X2 >= 1800
X1, X2 >=0
18
Dr.Farouk Sha'ban
Example 5: Trim-loss Problem.
A 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 are summarized in the
following tables.
Possible knife settings
19
Dr.Farouk Sha'ban
Formulate to minimize the trim loss and the number of rolls
needed to satisfy the order.
20Dr.Farouk Sha'ban
Problem Formulation
Decision variables
Xj = Number of standard rolls to be cut according to setting j
j = 1, 2, 3, 4, 5, 6
Number of 5 feet rolls produced = 2 X2 + 2 X3 + 4 X4 + X5
Number of 7 feet rolls produced = X1 + X2+ 2 X5
Number of 9 feet rolls produced = X1 + X3+ 2 X6
Let Y1, Y2, Y3 be the number of surplus rolls of the 5, 7, 9 feet rolls thus
Y1= 2 X2 + 2 X3 + 4 X4 + X5 - 150
Y2= X1 + X2+ 2 X5 - 200
Y3= X1 + X3+ 2 X6 - 300
The total trim losses = L (4X1 +3 X2+ X3 + X5 + 2 X6 + 5Y1+ 7Y2+ 9Y3)
Where L is the length of the standard roll.
Objective Function
Minimize Z= L(4X1 +3 X2+ X3 + X5 + 2 X6 + 5Y1+ 7Y2+ 9Y3)
Constraints
2 X2+ 2 X3+ 4 X4+ X5 - Y1 = 150
X1 + X2 +2X5 - Y2 = 200
X1 + X3 + 2 X6 - Y3 = 300
X1, X2, X3, X4, X5, X6 >= 0
Y1, Y2, Y3 >= 0
21Dr.Farouk Sha'ban
General form of a LP problem with m constraints and n
decision variables is:
Maximize Z = C1X1+ C2X2+ …………………. + CnXn
Constraints
A11X1 + A12X2+……………………+ A1nXn <= B1
A21X1 + A22X2+……………………+ A2nXn <= B2
.
.
.
.
Am1X1 + Am2X2+……………………+ AmnXn <= Bm
X1, X2, ……………………………………, Xn >= 0
22Dr.Farouk Sha'ban
OR
Maximize Z= Σn
j=1 CjXj
Constraints
Σn
j=1 aijXi <= bi Xi >=0 i = 1, …., m j = 1, …., n
Where
n = Number of activities.
Xj = Level of activity j
Cj =Contribution of the objective function/unit of activity j
m = Number of resources
Bi = Amount of resource i available.
Aij=Amount of resource i consumed by one unit of activity j
Other forms
1. Minimize Z= Σn
j=1 CjXj
2. Σn
j=1 AijXi >= Bi for some values of i
3. Σn
j=1 AijXi = Bi for some values of i
4. Xi unrestricted in sign for some values of i
23Dr.Farouk Sha'ban
Terminology of solutions for a LP model:
A Solution
Any specifications of values of X1, X2, ………, Xn is
called a solution.
A Feasible Solution
Is a solution for which all the constraints are satisfied.
An Optimal Solution
Is a feasible solution that has the most favorable value
of the objective function (largest for maximize or
smallest for minimize).
24Dr.Farouk Sha'ban
Note
•If there is exactly one optimal solution it must be a corner
point feasible solution.
•If there are multiple optimal solutions, then at least two of
them must be adjacent corner- point feasible solutions.
Two corner-point feasible solutions are said to be
adjacent if the line segment connecting them lies on the
boundary of the feasible region (one of the constraints).
25Dr.Farouk Sha'ban
Graphical Solution
Construction of the LP model
Example 1:
The Reddy Mikks Company
Reddy Mikks produces both interior and exterior paints
from two raw materials, M1&M2. The following table
provides the basic data of the problem.
26Dr.Farouk Sha'ban
A market survey indicates that the daily demand for interior
paint cannot exceed that of exterior paint by more than 1 ton.
Also, the maximum daily demand of interior paint is 2 ton.
Reddy Mikks wants to determine the optimum (best)
product mix of interior and exterior paints that maximizes the
total daily profit.
27Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= Tons produced daily of exterior paint.
X2= Tons produced daily of interior paint.
Objective Function
Maximize Z= 5 X1 + 4 X2
Constraints
6 X1 + 4 X2 <= 24
X1 + 2 X2 <= 6
- X1 + X2 <= 1
X2 <= 2
X1, X2 >=0
Any solution that satisfies all the constraints of the model is
a feasible solution. For example, X1=3 tons and X2=1 ton is a
feasible solution. We have an infinite number of feasible
solutions, but we are interested in the optimum feasible
solution that yields the maximum total profit.
28Dr.Farouk Sha'ban
Graphical Solution
The graphical solution is valid only for two-variable problem
which is rarely occurred.
The graphical solution includes two basic steps:
1. The determination of the solution space that defines
the feasible solutions that satisfy all the constraints.
2. The determination of the optimum solution from
among all the points in the feasible solution space.
29Dr.Farouk Sha'ban
.
ABCDEF consists of an infinite number of points; we need a
systematic procedure that identifies the optimum solutions. The
optimum solution is associated with a corner point of the
solution space.
30Dr.Farouk Sha'ban
To determine the direction in which the profit function increases
we assign arbitrary increasing values of 10 and 15
5 X1 + 4 X2=10
And 5 X1 + 4 X2=15
The optimum solution is mixture of 3 tons of exterior and 1.5 tons of
interior paints will yield a daily profit of 21000$. 31
Dr.Farouk Sha'ban
Example 2: The Diet Problem
Farm uses at least 800lb of special feed daily. The special feed is a
mixture of corn and soybean with the following composition.
The food mixture must contain at least 30% protein and at most
5% fiber. They want to determine the daily minimum cost feed
mix.
32Dr.Farouk Sha'ban
Problem Formulation
Decision variables
X1= lb of corn in the daily mix.
X2= lb of soybean in the daily mix.
Objective Function
Minimize Z= 0.3 X1 + 0.9 X2
Constraints
X1 + X2 >= 800
0.09X1+0.6 X2 >= 0.3(X1+X2) = -0.21X1+0.3 X2 >= 0
0.02X1+0.06 X2 <= 0.05(X1+X2) = 0.03X1-0.01 X2 >= 0
X1, X2 >= 0
33Dr.Farouk Sha'ban
34Dr.Farouk Sha'ban
Slack, Surplus, and Unrestricted variables
Slack Variable:
For constraints of the type (<=) the R.H.S normally
represents the limit on the availability of a resources and the
L.H.S represents the usage of this limited resource by the
different activities (variables) of the model.
A slack represents the amount by which the available
amount of the resource exceeds its usage by the activities.
For example (6 X1+4 X2<= 24) is equivalent to
(6 X1+4 X2 + S1= 24) provided that S1>=0.
The slack variable S1=24-6 X1-4 X2 represents the unused
amount of raw material M1.
35Dr.Farouk Sha'ban
Surplus Variable:
It is used in the constraints of type (>=) normally set minimum
specification requirements.
Surplus represents the excess of the L.H.S over the minimum
requirement.
For example (X1+X2 >= 800) is equivalent to (X1+X2 - S1= 800)
provided that S1>=0, this signifies that a surplus amount of feed
over the minimum requirement will be produced.
Unrestricted Variable:
The variable which can be positive or negative.
36Dr.Farouk Sha'ban
The Simplex Method
Introduction
It is a general algebraic method to solve a set of linear
equations.
We use simplex method to get extreme (or corner) point
solution.
We must first convert the model into the standard LP form by
using slack or surplus variables to convert the inequality
constraints into equations.
Our interest in the standard LP form lies in the basic
solutions of the simultaneous linear equations.
37Dr.Farouk Sha'ban
Standard LP Form and its Basic Solution
Example 1:
Express the following LP model in standard form.
Maximize Z= 2X1 + 3 X2 + 5X3
S.T X1 + X2 - X3 >= -5
-6X1 + 7 X2 - 9X3 <= 4
X1 + X2 + 4X3 = 10
X1, X2 >= 0
X3 unrestricted = X+3 - X-3
where X+3 , X-3
Standard LP form
Maximize Z= 2X1 + 3 X2 + 5 X+3 - 5 X-3
S.T -X1 - X2 + 3 X+3 - 3 X-3 + X4 = 5
-6X1 + 7X2 - 9 X+3 + 9 X-3 + X5 = 4
X1 + X2 + 4X+3 - 4 X-3 = 10
X1, X2, X+3, X-3, X4, X5 >=0
38
Dr.Farouk Sha'ban
Determination of basic solutions
The standard LP form includes m simultaneous linear equations in n
unknowns or variables (m<n).
We divide the n variables into 2 sets:
1. (n-m) variables to which we assign zero values which are called
non-basic variables.
1. Remaining m variables whose values are determined by solving the
resulting m equations which is called
basic variables.
The resulting solution is Basic Solution(BS). If all values are satisfying
non- negativity then resulting BS is Feasible Basic Solution(BFS),
otherwise, it is infeasible.
The maximum number of possible basic solution for m equations in n
unknowns is
)!(!
!
mnm
n

39Dr.Farouk Sha'ban
Example 2:
Maximize Z= 5X1 + 6 X2
S.T 2X1 + 3X2 >= 18
2X1 +X2 <= 12
3X1 + 3X2 = 24
X1, X2 >=0
Standard LP form
Maximize Z=5X1 + 6X2
S.T 2X1 +3X2 + X3 = 18
2X1 + X2 + X4 = 12
3X1 + 3X2 + X5 = 24
X1, X2, X3, X4, X5 >=0
40Dr.Farouk Sha'ban
The Simplex Algorithm
We solve the Reddy Mikks model,
where
X1= Tons produced daily of exterior paint.
X2= Tons produced daily of interior paint.
Exterior and interior paints are produced from two types of raw
materials M1 and M2
Maximize Z- 5 X1 - 4 X2 + 0 X3 + 0 X4 + 0 X5 +0 X6 = 0
S.T. 6 X1 +4 X2 + X3 <= 24
X1 +2 X2 + X4 <= 6
- X1 + X2 + X5 <= 1
X2 + X6 <=2
X1, X2, X3, X4, X5, X6 >=0
The variables X3, X4, X5, X6 are the slacks associated with the four
(<=) constraints.
41Dr.Farouk Sha'ban
The Starting Basic Feasible Solution is
Is the starting solution optimal? No, since the coefficients of X1
and X2 are still negative so they can increase the profit of Z.
We choose X1 with more negative (-5) i.e.; X1 is the entering
variable.
42Dr.Farouk Sha'ban
Since none of the Z-row coefficients associated with the non-basic
variables X3, X4 is negative the last table is optimal.
43
Dr.Farouk Sha'ban
The rules for selecting the entering and leaving variables are referred to
as the optimality and feasibility conditions
(a) Optimality conditions:
The entering variable in maximization (minimization) problem is the
non-basic variable having the most negative (positive) coefficient in the Z-
row. Ties are broken arbitrarily.
The optimum is reached at the iteration where all the Z-row
coefficients of the non-basic variables are non-negative (non-positive)
(b) Feasibility Condition:
for both the maximum and minimum problems the leaving variables is
the basic variables associated with the smallest non-negative ratio. Ties
are broken arbitrarily.
The steps of the simplex method are:
1. Determine a starting basic feasible solution
2. Select an entering variable using the optimality condition. Stop if
there is no entering variable.
3. Select a leaving variable using the feasibility condition.
4. Determine the new basic solution by using the appropriate Gauss-
Jordan computation.
5. Go to step 1 44Dr.Farouk Sha'ban
Special Cases in Simplex Method
1. Degeneracy
2. Alternative optima (Infinity of Solution)
3. Unbounded Solution
4. Non-existing or Infeasible Solution
1) Degeneracy
one or more basic variable(s) has zero value.
If you find more than one leaving variable (i.e.;
we have two or more variables having the same
ratio in the R.H.S) so one or more of the basic
variable(s)will be equal zero in the next iteration.
This condition indicates that the model has at
least one redundant constraint.
45Dr.Farouk Sha'ban
Example 1:
Maximize Z= 3 X1 + 9X2
X1 +4 X2 <= 8
X1 +2 X2 <= 4
X1, X2 >=0
Standard LP form
Maximize Z=3X1 + 9X2
S.T X1 +4X2 + X3 = 8
X1 + 2X2 + X4 = 4
X1, X2, X3, X4 >=0
46Dr.Farouk Sha'ban
X1=0, X2 =2, X3 =0, X4=0, Z=18
Is it possible to stop at the second iteration (when
degeneracy first appears) even though it is not optimum?
The answer is NO, because the
solution may be temporarily degenerate.
47Dr.Farouk Sha'ban
2) Alternative optima (Infinity ofSolution):
When the objective function is parallel to a binding
constraint. So the objective function (Z) will have the
same optimal value at more than one solution point.
Example 2:
Maximize Z= 2 X1 + 4 X2
X1 + 2X2 <= 5
X1 + X2 <= 4
X1, X2 >=0
Standard LP form
Maximize Z=2X1 + 4X2
S.T X1 +2X2 + X3 = 8
X1 + X2 + X4 = 4
X1, X2, X3, X4 >=0
48Dr.Farouk Sha'ban
First Optimum Solution: X1
*=0, X2
*=5/2, X3
*=0, X4
*=3/2, Z*=10
Second Optimum Solution: X1
*=3, X2
*=1, X3
*=0, X4
*=0, Z*=10
In the second table: X1=0 , X2= 5/2
In the third table: X1= 3 , X2= 1
The general form:
X1 = α (0) + (1-α) (3) = 3-3α
X2 = α (5/2) + (1-α) (1) = 1+3/2α
α = 0 → 1
49Dr.Farouk Sha'ban
3) Unbounded Solution:
In which the objective function (Z)
can be increased indefinitely without
violating any of the constraints i.e.;
the solution space is unbounded in at
least one direction.
Example 3:
Maximize Z= 2 X1+ X2
S.T X1- X2 <= 10
2X1 <= 40
X1, X2 >=0
50Dr.Farouk Sha'ban
Standard LP form
Maximize Z=2X1 +X2
S.T X1 -X2 + X3 = 10
2X1 + X4= 40
X1, X2, X3, X4 >=0
Both X1, X2 are candidates for entering the solution. But all the constraint
coefficient under X2 are negative or zero, meaning that X2 can be
increased indefinitely without violating any of the constraints. Any
increase in X2 will increase Z so it can be increased ∞ as X2 → ∞. Thus the
problem has no bounded solution.
51
Dr.Farouk Sha'ban
4) Non-existing or Infeasible
Solution:
If the constraints are not
satisfied simultaneously, the
model has no feasible solution.
This situation can never occur
if all the constraints are of the
type <= (assuming non-
negative R.H.S constraints)
because the slacks provide a
feasible solution.
Example 4:
Maximize Z= 3 X1 +2 X2
S.T 2 X1 + X2 <= 2
3 X1 +4 X2 >= 12
X1, X2 >=0
52Dr.Farouk Sha'ban
Transportation Model and Its Variants
Definition of the transportation model
The transportation model is a special class of the LP
problem. It deals with the situation in which a commodity
is shipped from source (e.g. factories) to destinations
(e.g. warehouses). The objective is to determine the
amounts shipped from each source to each destination
that minimize the total shipping cost while satisfying
both the supply limits and the demand requirements.
53
Dr.Farouk Sha'ban
Example 1:
There are three plants A, B, C and two destinations 1and 2, the
distance between them is as follows
The mile costs 8 cents find the cost/unit round to $
We define
X11 as the amount shipped from A to 1
X12 as the amount shipped from A to 2
X21 as the amount shipped from B to 1
X22 as the amount shipped from B to 2
X31 as the amount shipped from C to 1
X32 as the amount shipped from C to 2
The plants A, B, and C produces 1000, 1500, and1200 cars respectively.
The destination 1&2 demands are 2300 and 1400 cars.
54Dr.Farouk Sha'ban
The LP model is
Minimize Z=80 X11+215 X12 +100 X21 +108 X22 +102 X31 +68 X32
S.T X11 + X12 = 1000 ……….…… (A)
X21 + X22 = 1500 ……………. (B)
X31 + X32 = 1200 ……………. (C)
X11 + X21+ X31 = 2300 ……………. (1)
X12 + X22+ X32 = 1400 …………..... (2)
Xij >=0 i=1, 2, 3 j=1, 2
These constraints are all equations because the total supply from the three
plants = 1000 + 1500 + 1200 = 3700 cars, equals the total demands at the two
destinations = 2300 + 1400 = 3700 cars.
The LP model can be solved by the simplex method. However, the special
structure of the constraints allows us to solve the problem more conveniently
using the transportation tableau.
When the total supply does not equal the total demand, the
transportation model is said to be unbalanced. We must add a
dummy source or destination. 55
Dr.Farouk Sha'ban
Example 2:
In example (1) suppose that plant B
capacity is 1300 cars (instead of 1500). The
total supply =3500cars and the total demand
= 3700cars. So the total supply < the total
demand. Therefore, we have to add dummy
source with capacity 200 cars.
56Dr.Farouk Sha'ban
Example 3:
In example (1) suppose that the demand of
the destination 1 is 1900 cars (instead of 2300). The
total supply =3700cars and the total
demand = 3300cars. So the total supply > the total
demand. Therefore, we have to add dummy
destination with 400 cars.
57Dr.Farouk Sha'ban
The Transportation Algorithm
Step (1): Determine an Initial Basic Feasible Solution (IBFS) by
using one of the following methods.
1.The North-West Corner Method OR,
2.The Least-Cost Method OR,
3.Vogel Approximation Method.
A general T.M. with m sources and n destinations has m + n
constraints, one for each source and each destination. However,
because the T.M. is always balanced, one of these equation is
redundant. Thus, the model has m + n - 1 independent
constraint equations, which means that the starting basic
solution consists of m + n – 1 basic variables.
Step (2): Improve the IBFS
•Determine an entering variable.
•Determine a leaving variable.
•Obtain a new BFS
•If the solution is optimal stop. Otherwise; repeat step (2).
58Dr.Farouk Sha'ban
Steps of North-West Method
1. Allocate as much as possible to a selected
cell X11
2. Cross out the row or column with zero
supply or demand (if both are satisfied at
the same time, only one should be crossed
out).
3. If exactly one row or column is left
uncrossed out stop. Otherwise go to
step(1)
59Dr.Farouk Sha'ban
Example 3:
Solve the following
transportation problem.
Solution
Step (1):
finding the IBFS
•Using the North-West
Corner Method
Transportation Cost = 5(10) +10(2) +5(7) +15(9) +5(20) +10(18) =520
60Dr.Farouk Sha'ban
The Least-Cost Method:
This method gives a better starting solution because
it takes the cost into consideration
Transportation Cost = 15(2) +15(9) +0(7) +10(20) +5(4) +5(18) =475
61Dr.Farouk Sha'ban
Steps of Least-Cost Method
1. Assign as much as possible to the variable with
the smallest unit cost cell.
2. Cross out the row or column with zero supply of
demand (if both are satisfied at the same time,
only one should be crossed out).
3. If exactly one row or column is left uncrossed
out stop. Otherwise go to step(1)
62Dr.Farouk Sha'ban
The Vogel Approximation Method:
This method provides a better starting solution (optimal or
closed to the optimal solution)
Steps of Vogel Approximation Method
1. In each row and column, subtract the lowest two costs from
each other.
2. Determine the row or column with the largest difference.
3. Allocate as much as possible to the variable with the least
cost in the selected row or column. Any row or column with
zero supply or demand would not be used in computing the
following step.
4. If exactly one row or column remains uncrossed out stop.
Otherwise, go to step (1).
5. If only one row or column with positive supply or demand
remains uncrossed out determine the basic variable by the
least-cost method.
6. If all uncrossed out rows and columns have assigned zero
supply and demand, determine the zero basic variable by
the least-cost method.
Note: In all the three methods, if you have a tie you can break
the tie arbitrarily.
63Dr.Farouk Sha'ban
X31=5
X12=15
X23=15
X14=0,
X34=5,
X24=10
Transportation Cost = 15(2) + 15(9) +0(4)
+10(20) +5(4) +5(18) = 475
It is expected to produce better starting
solution than least-cost method. 64
Dr.Farouk Sha'ban
Improving the IBFS
Determine an entering variable using method of multipliers (U, V method),
In this method associate the multipliers with row I and column j of the
transportation tableau.
•For each current basic variable
Ui + Vj = Cij for each basic Xij
•For non-basic variable
C'ij = Ui + Vj - Cij for each non-basic Xij
Choose the non-basic variable with the largest positive coefficient (C'ij) to be
the entering variable. The solution is optimal if and only if all C'ij are non-
positive.
65Dr.Farouk Sha'ban
Improving the IBFS
Determine an entering variable using method of multipliers
(U,V) method, In this method associate the multipliers with row I
and column j of the transportation tableau.
For each current basic variable
Ui + Vj = Cij for each basic Xij
For non-basic variable
C’ij = Ui + Vj - Cij for each non-basic Xij
Choose the non-basic variable with the largest positive
coefficient (C’ij) to be the entering variable. The solution is
optimal if and only if all C’ij are non-positive.
Consider the same example:
66Dr.Farouk Sha'ban
67Dr.Farouk Sha'ban
The entering variable must have the maximum C'ij which is X31 = 9
To determine the leaving variable make a closed loop of basic variable
starting with maximum C'ij of non-basic variable keeping:
1. Supply and demand requirements remain satisfied.
2. No negative shipments are allowed through any of the routes.
Therefore, θ=5 and X31 will be basic with value 5 and X22 is a
basic variable but with value 0 and X11 will be non-basic (leaving variable)
The cost of the IBFS by Northwest corner method was 520$
The first iteration cost is 475$ (less which is better)
In the second iteration
Get the entering variable with maximum C'ij = C'14 = 4
The Leaving variable is X24 =10
X14 = 10
and the new solution is:
68Dr.Farouk Sha'ban
All C'ij is negative for all non-basic variables, so the solution is optimal which is:
X12 =5, X14 =10, X22 =10, X23 =15, X31 =5, X34 =5
With optimum cost = 5*2 +10*11 + 10*7 + 15*9 +5*4 + 5*18
= 10+110+70+135+20+90
= 435
69Dr.Farouk Sha'ban
The Assignment Model
There are n machines M1, M2, M3…, Mn. And n
different jobs J1, J2, …., Jn.
The jobs are to be assigned to these machines.
The machine cost for each job depends on the
machine to which it is assigned.
Each machine can work only on one job.
The problem is to assign the jobs to the machines to
minimize the total cost of machining.
Number of possible assignment = n!
If n=5, then 5! = 120 ways
70Dr.Farouk Sha'ban
The Linear Programming Formulation of the Problem
Decision variables
Xij job i is assigned to machine j
Objective Function
Minimize Z= Σn
j=1 Σn
i=1 Cij Xij
Constraints
Σn
j=1 Xij =1 i= 1, 2… n
Σn
i=1 Xij =1 j= 1, 2… n
Xij =1 if the job i is assigned to the machine j
Xij =0 other wise
The Assignment Algorithm (Hungarian Algorithm)
It is the most efficient way or solving the assignment problem.
It is based on the idea that if a constant is added or
subtracted from any row or column the optimal assignment is not
affected.
71Dr.Farouk Sha'ban
The Algorithm Steps
1. Subtract the smallest value in each column from all the
values in that column.
2. Subtract the smallest value in each row from all the
values in that row.
3. Note: step 1 & 2 will produce a cost matrix containing at
least one zero element in each row or column.
4. Determine a feasible assignment using the cells with
zero cost. If this is possible stop, as optimal solution is
found. This step is done as follows:
a) Determine the number of lines required to cover all
zeros.
b) If the number of lines is equal to n, stop (This is the
optimal assignment).
c) If the number of lines is less than n then go to (4).
5. Subtract the smallest value not covered with lines from
all uncovered values and add it to the value at the
intersection of the lines then go to (3).
Note: Obtain the minimum cost from the original table.
72Dr.Farouk Sha'ban
Example 1:
Solve the following
assignment problem.
Solution:
The optimal assignment is X12, X21, X33
Job1 is assigned to machine2
Job2 is assigned to machine1
Job3 is assigned to machine3
The cost = 10 + 9 + 8 = 27$
Jobs
Person
73Dr.Farouk Sha'ban
Example 2: Solve the following assignment problem.
Solution:
The optimal assignment is X15, X22, X33, X44, X51
Job1 is assigned to machine5
Job2 is assigned to machine2
Job3 is assigned to machine3
Job4 is assigned to machine4
Job5 is assigned to machine1
The cost = 3 + 4 + 2 + 5 + 3 = 17$
74Dr.Farouk Sha'ban
6.Network Models
6.1Introduction
There is a multitude of operations research situations that can be
modeled and solved as networks (nodes connected with branches)
We have 5 network algorithms such as:
1. Minimal spanning tree.
2. Shortest route algorithm.
3. Minimum-cost capacitated network algorithm.
4. Critical Path Method (CPM).
5. Program Evaluation and Review Technique (PERT).
6.7Project planning and control with PERT-CPM
The successful management of large-scale projects requires
careful planning, scheduling and control of numerous interrelated
activities especially when these activities have to be performed in a
specified technological sequence, to aid in these tasks special
procedures based on the use of network techniques were developed. The
most important of these procedures are:
 Critical Path Method (CPM).
 Program Evaluation and Review Technique (PERT).
75Dr.Farouk Sha'ban
Applications of PERT & CPM
1. Construction projects ( buildings, highways,
houses, bridges)
2. Preparations of bids and proposals for large
projects.
3. Maintenance planning of oil refineries, ship
repair and other large operations.
4. Manufacture and assembly of large items as
aero plans and computers.
5. Development of new weapons system.
6. Simple projects such as cleaning and painting. 76
Dr.Farouk Sha'ban
Basic Terminology
1. A Project:
A project defines a combination of interrelated activities that
must be done in a certain order before the entire task can be
completed.
2. An Activity:
It is an effort required to complete a plan of the project. Most
activities can not start until some others are completed.
3. Real Activity:
Consumes resources and time.
4. Waiting Activity:
Consumes time.
5. Dummy Activity:
Consumes no time and no resources. It represents the
dependence of one activity upon another.
6. An Event:
Represents a point in time. It signifies the beginning or ending
of some activities. 77Dr.Farouk Sha'ban
Network Representation
1. An activity is represented by a line or an arrow (usually with time
estimate written along it). The arrow begins and ends with an
event which is represented by a node.
1. A dummy activity is represented by dashed line arrow or solid
arrow with zero time estimate.
2. The arrow must be oriented from left to right.
3. The network must have one initial node and one ending node.
4. Any two events may not be connected by more than one activity.
5. Event numbers must not be duplicated in the network.
6. Each activity is represented by one and only one arrow. No
single activity can be represented twice in the network.
78Dr.Farouk Sha'ban
Numbering a network
1. An initial event is one which has arrows
coming out of it only. Number it (1).
2. Delete all arrows emerging from event (1).
This will create at least one more initial
event, number these new events(s) as (2,
3…).
3. Delete all emerging arrows from these
numbered events which will create new
initial events and continue until the last
event which has no arrows emerging from it.
79Dr.Farouk Sha'ban
Solution by Linear Programming Formulation
Each node represents a variable. Each arc represents a constraint.
Example 1:
Consider the following Network problem.
Decision variables
Let ti represents the time at which event (i) occurs i= 1, 2, 3, 4, 5.
t4: time at which jobs (C) & (D) are completed
t5: time at which the project is completed
Time of completion of the whole project = t5 – t1
Objective Function Minimize Z= t5 – t1
Constraints t2 – t1 ≥ 3 , t3 – t1 ≥ 1 , t3 – t2 ≥ 0
t4 – t3 ≥ 2 , t4 – t2 ≥ 4 , t5 – t4 ≥ 5
ti ≥ 0 i= 1, 2, 3, 4, 5
This problem can be solved by simplex method Z* is the minimum time
required to complete the project.
80Dr.Farouk Sha'ban
Solution by Network Analysis
CPM Calculations:
Let Dij = Duration (completion time) of activity ij
ESi = The earliest start time at which event (i) occurs
LFi = The latest finish time at which event (i) occurs without
delaying the project beyond its earliest time.
ESi ………. Forward
ESi = max [ESi+ Dij] for all (i, j)
ESi = max [(2+8), (1+6), (3+5)]
81Dr.Farouk Sha'ban
= max [10, 7, 8] =10
Start from the initial node and move to the terminal node for initial
node ES1= 0
LFi ………. Backward
ESi = min [LFj - Dij] for all (i, j)
LFi = min [(10-3), (9-5), (13-4)]
= min [7, 4, 9] =10
Start from the terminal node and move backward to the initial node for
terminal node LFn = ESn
82Dr.Farouk Sha'ban
Example1:
Determine the critical path for the
project network given below (all
the durations are in days)
Solution
The critical path is defined by
1-2-4-5-6
The duration of the project =
25 days
83Dr.Farouk Sha'ban

More Related Content

What's hot

Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation Case
Joseph Konnully
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
Abu Bashar
 
Operations Research
Operations ResearchOperations Research
Operations Research
ajithsrc
 

What's hot (20)

primal and dual problem
primal and dual problemprimal and dual problem
primal and dual problem
 
Simplex method - Maximisation Case
Simplex method - Maximisation CaseSimplex method - Maximisation Case
Simplex method - Maximisation Case
 
Duality in Linear Programming
Duality in Linear ProgrammingDuality in Linear Programming
Duality in Linear Programming
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
 
Introduction to Operations Research
Introduction to Operations ResearchIntroduction to Operations Research
Introduction to Operations Research
 
Operation research complete note
Operation research  complete noteOperation research  complete note
Operation research complete note
 
The Break-even Analysis
The Break-even AnalysisThe Break-even Analysis
The Break-even Analysis
 
Transportation problems
Transportation problemsTransportation problems
Transportation problems
 
Goal programming
Goal programmingGoal programming
Goal programming
 
Transportation Problem
Transportation ProblemTransportation Problem
Transportation Problem
 
BREAK-EVEN ANALYSIS
BREAK-EVEN ANALYSISBREAK-EVEN ANALYSIS
BREAK-EVEN ANALYSIS
 
Decision theory
Decision theoryDecision theory
Decision theory
 
Linear Programming Application
Linear Programming ApplicationLinear Programming Application
Linear Programming Application
 
Vogel's Approximation Method
Vogel's Approximation MethodVogel's Approximation Method
Vogel's Approximation Method
 
Operational reseach ppt
Operational reseach pptOperational reseach ppt
Operational reseach ppt
 
Operations Research
Operations ResearchOperations Research
Operations Research
 
Simplex method (maximization)
Simplex method (maximization)Simplex method (maximization)
Simplex method (maximization)
 
Integer Linear Programming
Integer Linear ProgrammingInteger Linear Programming
Integer Linear Programming
 
North West Corner Method
North West Corner MethodNorth West Corner Method
North West Corner Method
 
Integer Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear ProgrammingInteger Programming, Goal Programming, and Nonlinear Programming
Integer Programming, Goal Programming, and Nonlinear Programming
 

Similar to Operations research

Linear programming
Linear programmingLinear programming
Linear programming
Tarun Gehlot
 
beyond linear programming: mathematical programming extensions
beyond linear programming: mathematical programming extensionsbeyond linear programming: mathematical programming extensions
beyond linear programming: mathematical programming extensions
Angelica Angelo Ocon
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
Shakti Ranjan
 
Formulation Lpp
Formulation  LppFormulation  Lpp
Formulation Lpp
Sachin MK
 

Similar to Operations research (20)

Operation research - Chapter 01
Operation research - Chapter 01Operation research - Chapter 01
Operation research - Chapter 01
 
Operations Research - Introduction
Operations Research - IntroductionOperations Research - Introduction
Operations Research - Introduction
 
Decision making
Decision makingDecision making
Decision making
 
Lect or1 (2)
Lect or1 (2)Lect or1 (2)
Lect or1 (2)
 
CH-2 Linear Programing.pptx
CH-2 Linear Programing.pptxCH-2 Linear Programing.pptx
CH-2 Linear Programing.pptx
 
Linear programming
Linear programmingLinear programming
Linear programming
 
beyond linear programming: mathematical programming extensions
beyond linear programming: mathematical programming extensionsbeyond linear programming: mathematical programming extensions
beyond linear programming: mathematical programming extensions
 
181_Sample-Chapter.pdf
181_Sample-Chapter.pdf181_Sample-Chapter.pdf
181_Sample-Chapter.pdf
 
Introduction to Operations Research/ Management Science
Introduction to Operations Research/ Management Science Introduction to Operations Research/ Management Science
Introduction to Operations Research/ Management Science
 
MFCS2-Module1.pptx
MFCS2-Module1.pptxMFCS2-Module1.pptx
MFCS2-Module1.pptx
 
Bagian 3 PTI
Bagian 3 PTIBagian 3 PTI
Bagian 3 PTI
 
OR_Hamdy_taha.ppt
OR_Hamdy_taha.pptOR_Hamdy_taha.ppt
OR_Hamdy_taha.ppt
 
OR_Hamdy_taha.ppt
OR_Hamdy_taha.pptOR_Hamdy_taha.ppt
OR_Hamdy_taha.ppt
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
 
Formulation Lpp
Formulation  LppFormulation  Lpp
Formulation Lpp
 
Lp graphical and simplexx892
Lp graphical and simplexx892Lp graphical and simplexx892
Lp graphical and simplexx892
 
Chapter 6-INTEGER PROGRAMMING note.pdf
Chapter 6-INTEGER PROGRAMMING  note.pdfChapter 6-INTEGER PROGRAMMING  note.pdf
Chapter 6-INTEGER PROGRAMMING note.pdf
 
Intro week3 excel vba_114e
Intro week3 excel vba_114eIntro week3 excel vba_114e
Intro week3 excel vba_114e
 
Chapter two
Chapter twoChapter two
Chapter two
 
CH1.ppt
CH1.pptCH1.ppt
CH1.ppt
 

Recently uploaded

Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
Nauman Safdar
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
vineshkumarsajnani12
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 

Recently uploaded (20)

Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NSCROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
 
Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck Template
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTSJAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdf
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
 

Operations research

  • 1. Operations Research First Year Computer Text Book: Operations Research 7th Edition Hamdy A. Taha
  • 2. Course Outline Part1: Deterministic Models Chapter 2: Introduction to Linear Programming 2.1 Introduction. 2.2 Construction of the LP Model. 2.3 Graphical LP Solution. 2.3.1 Solution of a Maximization Model. 2.3.2 Solution of a Minimization Model. 2.3.3 Slack, Surplus, and Unrestricted Model. 2.4 Graphical Sensitivity Analysis. 2.4.1 Changes in the Objective Function Coefficient. 2.4.2 Unit Worth of a Resource. 2.5 Computer Solution of Linear Programming Problems. 2.6 Analysis of Selected Linear Programming Model. 2Dr.Farouk Sha'ban
  • 3. Chapter 3: The Simplex Method 3.1 Introduction. 3.2 Standard Linear Programming Form and Its Solutions. 3.2.1 Standard Linear Programming Form. 3.2.2 Determination of Basic Solutions. 3.2.3 Unrestricted Variables and Basic Solution. 3.3 The Simplex Algorithm. 3.4 Simplex Method Application. 3.5 Special Cases in Simplex Method Application. 3.5.1 Degeneracy. 3.5.2 Alternative Optima. 3.5.3 Unbounded Solution. 3.5.4 Infeasible Solution. 3Dr.Farouk Sha'ban
  • 4. Chapter 4: Duality. 4.1 Introduction. 4.2 Definition of the Dual Problem. 4.3 Relationship between the Optimal Primal and Dual. Chapter 5: Transportation Model. 5.1 Definition of the Transportation Model. 5.3 The Transportation Algorithm. 5.3.1 Determination of the Starting Solution. 5.3.2 Iterative Computation of the Algorithm. 5.4 The Assignment Model. 4Dr.Farouk Sha'ban
  • 5. Chapter 6: Network Models 6.1 Scope of Network Application. 6.2 Network Definitions. 6.3 Minimal Spanning Tree Algorithm. 6.4 Shortest Route Problem. 6.5 Maximal Flow Model. 6.7 CPM and PERT. 6.7.1 Network Representation. 6.7.2 Critical Path Computation. 6.7.3 Construction of the Time Schedule. 5Dr.Farouk Sha'ban
  • 6. Introduction Operations Research (OR) It is a scientific approach to determine the optimum (best) solution to a decision problem under the restriction of limited resources. Using the mathematical techniques to model, analyze, and solve the problem. Phases of OR 1. Definition of the problem includes:- • The description of the decision variables (alternatives) • The determination of the objective of the study • The specification of the limitations under which the modeled system operates. 6 Dr.Farouk Sha'ban
  • 7. 2. Model Construction Translating the real world problem into mathematical relationships (the most suitable model to represent the system, LP, dynamic programming, integer programming, ………..) 3.Solution of the model Using well-defined optimization techniques. An important aspect of model solution is sensitivity analysis. 7Dr.Farouk Sha'ban
  • 8. 4.Model validity Testing and evaluation of the model. A common method for testing a validity of a model is to compare its performance with some past data available for the actual system. 5.Implementation of the solution Implementation of the solution of validated model involves the translation of the model's results into instructions issued in understandable form to the individual 8Dr.Farouk Sha'ban
  • 9. Basic components of the model 1.Decision Variables It is the unknown to determined from the solution of a model (what does the model seek to determine). It is one of the specific decisions made by a decision maker (DM). 2.Objective Function It is the end result (goal) desired to be achieved by the system. A common objective is to maximize profit or minimize cost. It is expressed as a mathematical function of the system decision variables. 9Dr.Farouk Sha'ban
  • 10. 3.Constraints These are the limitations imposed on the variables to satisfy the restriction of the modeled system. They must be expressed as mathematical functions of the system decision variables (D.V.). 10Dr.Farouk Sha'ban
  • 11. Example 1: A company manufactures two products A&B. with 4 & 3 units. A&B take 3&2 minutes respectively to be machined. The total time available at machining department is 800 hours (100 days or 20 weeks). A market research showed that at least 10000 units of A and not more than 6000 units of B are needed. It is required to determine the number of units of A&B to be produced to maximize profit. 11Dr.Farouk Sha'ban
  • 12. Problem Formulation Decision variables X1= number of units produced of A. X2= number of units produced of B. Objective Function Maximize Z= 4 X1 + 3 X2 Constraints 3 X1 + 2 X2 <= 800x60 X1 >=10000 X2 <=6000 X1, X2 >=0 12Dr.Farouk Sha'ban
  • 13. Example 2: Feed mix problem A farmer is interested in feeding his cattle at minimum cost. Two feeds are used A&B. Each cow must get at least 400 grams/day of protein, at least 800 grams/day of carbohydrates, and not more than 100 grams/day of fat. Given that A contains 10% protein, 80% carbohydrates and 10% fat while B contains 40% protein, 60% carbohydrates and no fat. A costs 2 L.E/kg, and B costs 5 L.E/kg. Formulate the problem to determine the optimum amount of each feed to minimize cost. 13Dr.Farouk Sha'ban
  • 14. Problem Formulation Decision variables X1= weight of feed A kg/day/animal X2= weight of feed B kg/day/animal Objective Function Minimize Z= 2 X1 + 5 X2 Constraints Protein 0.1 X1 + 0.4 X2 >=0.4 Carbohydrates 0.8 X1 + 0.6 X2 >=0.8 Fats 0.1 X1 <= 0.1 X1, X2 >=0 14Dr.Farouk Sha'ban
  • 15. Example 3: Blending Problem An iron ore from 4 mines will be blended. The analysis has shown that, in order to obtain suitable tensile properties, minimum requirements must be met for 3 basic elements A, B, and C. Each of the 4 mines contains different amounts of the 3 elements (see the table). Formulate to find the least cost blend for one ton of iron ore. 15Dr.Farouk Sha'ban
  • 16. Problem Formulation Decision variables X1= Fraction of ton to be selected from mine number 1 X2= Fraction of ton to be selected from mine number 2 X3= Fraction of ton to be selected from mine number 3 X4= Fraction of ton to be selected from mine number 4 Objective Function Minimize Z= 800 X1 + 400 X2 + 600 X3 + 500 X4 Constraints 10 X1 + 3 X2 + 8 X3 + 2X4 >= 5 90 X1 + 150 X2 + 75 X3 + 175 X4 >= 10 45 X1 + 25 X2 + 20 X3 + 37 X4 >= 30 X1 + X2 + X3 + X4 = 1 X1, X2, X3, X4 >= 0 16Dr.Farouk Sha'ban
  • 17. Example 4: Inspection Problem A company has 2 grades of inspectors 1&2. It is required that at least 1800 pieces be inspected per 8 hour day. Grade 1 inspectors can check pieces at the rate of 25 per hour with an accuracy of 98%. Grade 2 inspectors can check at the rate of 15 pieces per hour with an accuracy of 95%. Grade 1 costs 4 L.E/hour, grade 2 costs 3 L.E/hour. Each time an error is made by an inspector costs the company 2 L.E. There are 8 grade 1 and 10 grade 2 inspectors available. The company wants to determine the optimal assignment of inspectors which will minimize the total cost of inspection/day. 17Dr.Farouk Sha'ban
  • 18. Problem Formulation Decision variables X1= Number of grade 1 inspectors/day. X2= Number of grade 2 inspectors/day. Objective Function Cost of inspection = Cost of error + Inspector salary/day Cost of grade 1/hour = 4 + (2 X 25 X 0.02) = 5 L.E Cost of grade 2/hour = 3 + (2 X 15 X 0.05) = 4.5 L.E Minimize Z= 8 (5 X1 + 4.5 X2) = 40 X1 + 36 X2 Constraints X1 <= 8 X2 <= 10 8(25) X1+ 8(15) X2 >= 1800 200 X1 + 120 X2 >= 1800 X1, X2 >=0 18 Dr.Farouk Sha'ban
  • 19. Example 5: Trim-loss Problem. A 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 are summarized in the following tables. Possible knife settings 19 Dr.Farouk Sha'ban
  • 20. Formulate to minimize the trim loss and the number of rolls needed to satisfy the order. 20Dr.Farouk Sha'ban
  • 21. Problem Formulation Decision variables Xj = Number of standard rolls to be cut according to setting j j = 1, 2, 3, 4, 5, 6 Number of 5 feet rolls produced = 2 X2 + 2 X3 + 4 X4 + X5 Number of 7 feet rolls produced = X1 + X2+ 2 X5 Number of 9 feet rolls produced = X1 + X3+ 2 X6 Let Y1, Y2, Y3 be the number of surplus rolls of the 5, 7, 9 feet rolls thus Y1= 2 X2 + 2 X3 + 4 X4 + X5 - 150 Y2= X1 + X2+ 2 X5 - 200 Y3= X1 + X3+ 2 X6 - 300 The total trim losses = L (4X1 +3 X2+ X3 + X5 + 2 X6 + 5Y1+ 7Y2+ 9Y3) Where L is the length of the standard roll. Objective Function Minimize Z= L(4X1 +3 X2+ X3 + X5 + 2 X6 + 5Y1+ 7Y2+ 9Y3) Constraints 2 X2+ 2 X3+ 4 X4+ X5 - Y1 = 150 X1 + X2 +2X5 - Y2 = 200 X1 + X3 + 2 X6 - Y3 = 300 X1, X2, X3, X4, X5, X6 >= 0 Y1, Y2, Y3 >= 0 21Dr.Farouk Sha'ban
  • 22. General form of a LP problem with m constraints and n decision variables is: Maximize Z = C1X1+ C2X2+ …………………. + CnXn Constraints A11X1 + A12X2+……………………+ A1nXn <= B1 A21X1 + A22X2+……………………+ A2nXn <= B2 . . . . Am1X1 + Am2X2+……………………+ AmnXn <= Bm X1, X2, ……………………………………, Xn >= 0 22Dr.Farouk Sha'ban
  • 23. OR Maximize Z= Σn j=1 CjXj Constraints Σn j=1 aijXi <= bi Xi >=0 i = 1, …., m j = 1, …., n Where n = Number of activities. Xj = Level of activity j Cj =Contribution of the objective function/unit of activity j m = Number of resources Bi = Amount of resource i available. Aij=Amount of resource i consumed by one unit of activity j Other forms 1. Minimize Z= Σn j=1 CjXj 2. Σn j=1 AijXi >= Bi for some values of i 3. Σn j=1 AijXi = Bi for some values of i 4. Xi unrestricted in sign for some values of i 23Dr.Farouk Sha'ban
  • 24. Terminology of solutions for a LP model: A Solution Any specifications of values of X1, X2, ………, Xn is called a solution. A Feasible Solution Is a solution for which all the constraints are satisfied. An Optimal Solution Is a feasible solution that has the most favorable value of the objective function (largest for maximize or smallest for minimize). 24Dr.Farouk Sha'ban
  • 25. Note •If there is exactly one optimal solution it must be a corner point feasible solution. •If there are multiple optimal solutions, then at least two of them must be adjacent corner- point feasible solutions. Two corner-point feasible solutions are said to be adjacent if the line segment connecting them lies on the boundary of the feasible region (one of the constraints). 25Dr.Farouk Sha'ban
  • 26. Graphical Solution Construction of the LP model Example 1: The Reddy Mikks Company Reddy Mikks produces both interior and exterior paints from two raw materials, M1&M2. The following table provides the basic data of the problem. 26Dr.Farouk Sha'ban
  • 27. A market survey indicates that the daily demand for interior paint cannot exceed that of exterior paint by more than 1 ton. Also, the maximum daily demand of interior paint is 2 ton. Reddy Mikks wants to determine the optimum (best) product mix of interior and exterior paints that maximizes the total daily profit. 27Dr.Farouk Sha'ban
  • 28. Problem Formulation Decision variables X1= Tons produced daily of exterior paint. X2= Tons produced daily of interior paint. Objective Function Maximize Z= 5 X1 + 4 X2 Constraints 6 X1 + 4 X2 <= 24 X1 + 2 X2 <= 6 - X1 + X2 <= 1 X2 <= 2 X1, X2 >=0 Any solution that satisfies all the constraints of the model is a feasible solution. For example, X1=3 tons and X2=1 ton is a feasible solution. We have an infinite number of feasible solutions, but we are interested in the optimum feasible solution that yields the maximum total profit. 28Dr.Farouk Sha'ban
  • 29. Graphical Solution The graphical solution is valid only for two-variable problem which is rarely occurred. The graphical solution includes two basic steps: 1. The determination of the solution space that defines the feasible solutions that satisfy all the constraints. 2. The determination of the optimum solution from among all the points in the feasible solution space. 29Dr.Farouk Sha'ban
  • 30. . ABCDEF consists of an infinite number of points; we need a systematic procedure that identifies the optimum solutions. The optimum solution is associated with a corner point of the solution space. 30Dr.Farouk Sha'ban
  • 31. To determine the direction in which the profit function increases we assign arbitrary increasing values of 10 and 15 5 X1 + 4 X2=10 And 5 X1 + 4 X2=15 The optimum solution is mixture of 3 tons of exterior and 1.5 tons of interior paints will yield a daily profit of 21000$. 31 Dr.Farouk Sha'ban
  • 32. Example 2: The Diet Problem Farm uses at least 800lb of special feed daily. The special feed is a mixture of corn and soybean with the following composition. The food mixture must contain at least 30% protein and at most 5% fiber. They want to determine the daily minimum cost feed mix. 32Dr.Farouk Sha'ban
  • 33. Problem Formulation Decision variables X1= lb of corn in the daily mix. X2= lb of soybean in the daily mix. Objective Function Minimize Z= 0.3 X1 + 0.9 X2 Constraints X1 + X2 >= 800 0.09X1+0.6 X2 >= 0.3(X1+X2) = -0.21X1+0.3 X2 >= 0 0.02X1+0.06 X2 <= 0.05(X1+X2) = 0.03X1-0.01 X2 >= 0 X1, X2 >= 0 33Dr.Farouk Sha'ban
  • 35. Slack, Surplus, and Unrestricted variables Slack Variable: For constraints of the type (<=) the R.H.S normally represents the limit on the availability of a resources and the L.H.S represents the usage of this limited resource by the different activities (variables) of the model. A slack represents the amount by which the available amount of the resource exceeds its usage by the activities. For example (6 X1+4 X2<= 24) is equivalent to (6 X1+4 X2 + S1= 24) provided that S1>=0. The slack variable S1=24-6 X1-4 X2 represents the unused amount of raw material M1. 35Dr.Farouk Sha'ban
  • 36. Surplus Variable: It is used in the constraints of type (>=) normally set minimum specification requirements. Surplus represents the excess of the L.H.S over the minimum requirement. For example (X1+X2 >= 800) is equivalent to (X1+X2 - S1= 800) provided that S1>=0, this signifies that a surplus amount of feed over the minimum requirement will be produced. Unrestricted Variable: The variable which can be positive or negative. 36Dr.Farouk Sha'ban
  • 37. The Simplex Method Introduction It is a general algebraic method to solve a set of linear equations. We use simplex method to get extreme (or corner) point solution. We must first convert the model into the standard LP form by using slack or surplus variables to convert the inequality constraints into equations. Our interest in the standard LP form lies in the basic solutions of the simultaneous linear equations. 37Dr.Farouk Sha'ban
  • 38. Standard LP Form and its Basic Solution Example 1: Express the following LP model in standard form. Maximize Z= 2X1 + 3 X2 + 5X3 S.T X1 + X2 - X3 >= -5 -6X1 + 7 X2 - 9X3 <= 4 X1 + X2 + 4X3 = 10 X1, X2 >= 0 X3 unrestricted = X+3 - X-3 where X+3 , X-3 Standard LP form Maximize Z= 2X1 + 3 X2 + 5 X+3 - 5 X-3 S.T -X1 - X2 + 3 X+3 - 3 X-3 + X4 = 5 -6X1 + 7X2 - 9 X+3 + 9 X-3 + X5 = 4 X1 + X2 + 4X+3 - 4 X-3 = 10 X1, X2, X+3, X-3, X4, X5 >=0 38 Dr.Farouk Sha'ban
  • 39. Determination of basic solutions The standard LP form includes m simultaneous linear equations in n unknowns or variables (m<n). We divide the n variables into 2 sets: 1. (n-m) variables to which we assign zero values which are called non-basic variables. 1. Remaining m variables whose values are determined by solving the resulting m equations which is called basic variables. The resulting solution is Basic Solution(BS). If all values are satisfying non- negativity then resulting BS is Feasible Basic Solution(BFS), otherwise, it is infeasible. The maximum number of possible basic solution for m equations in n unknowns is )!(! ! mnm n  39Dr.Farouk Sha'ban
  • 40. Example 2: Maximize Z= 5X1 + 6 X2 S.T 2X1 + 3X2 >= 18 2X1 +X2 <= 12 3X1 + 3X2 = 24 X1, X2 >=0 Standard LP form Maximize Z=5X1 + 6X2 S.T 2X1 +3X2 + X3 = 18 2X1 + X2 + X4 = 12 3X1 + 3X2 + X5 = 24 X1, X2, X3, X4, X5 >=0 40Dr.Farouk Sha'ban
  • 41. The Simplex Algorithm We solve the Reddy Mikks model, where X1= Tons produced daily of exterior paint. X2= Tons produced daily of interior paint. Exterior and interior paints are produced from two types of raw materials M1 and M2 Maximize Z- 5 X1 - 4 X2 + 0 X3 + 0 X4 + 0 X5 +0 X6 = 0 S.T. 6 X1 +4 X2 + X3 <= 24 X1 +2 X2 + X4 <= 6 - X1 + X2 + X5 <= 1 X2 + X6 <=2 X1, X2, X3, X4, X5, X6 >=0 The variables X3, X4, X5, X6 are the slacks associated with the four (<=) constraints. 41Dr.Farouk Sha'ban
  • 42. The Starting Basic Feasible Solution is Is the starting solution optimal? No, since the coefficients of X1 and X2 are still negative so they can increase the profit of Z. We choose X1 with more negative (-5) i.e.; X1 is the entering variable. 42Dr.Farouk Sha'ban
  • 43. Since none of the Z-row coefficients associated with the non-basic variables X3, X4 is negative the last table is optimal. 43 Dr.Farouk Sha'ban
  • 44. The rules for selecting the entering and leaving variables are referred to as the optimality and feasibility conditions (a) Optimality conditions: The entering variable in maximization (minimization) problem is the non-basic variable having the most negative (positive) coefficient in the Z- row. Ties are broken arbitrarily. The optimum is reached at the iteration where all the Z-row coefficients of the non-basic variables are non-negative (non-positive) (b) Feasibility Condition: for both the maximum and minimum problems the leaving variables is the basic variables associated with the smallest non-negative ratio. Ties are broken arbitrarily. The steps of the simplex method are: 1. Determine a starting basic feasible solution 2. Select an entering variable using the optimality condition. Stop if there is no entering variable. 3. Select a leaving variable using the feasibility condition. 4. Determine the new basic solution by using the appropriate Gauss- Jordan computation. 5. Go to step 1 44Dr.Farouk Sha'ban
  • 45. Special Cases in Simplex Method 1. Degeneracy 2. Alternative optima (Infinity of Solution) 3. Unbounded Solution 4. Non-existing or Infeasible Solution 1) Degeneracy one or more basic variable(s) has zero value. If you find more than one leaving variable (i.e.; we have two or more variables having the same ratio in the R.H.S) so one or more of the basic variable(s)will be equal zero in the next iteration. This condition indicates that the model has at least one redundant constraint. 45Dr.Farouk Sha'ban
  • 46. Example 1: Maximize Z= 3 X1 + 9X2 X1 +4 X2 <= 8 X1 +2 X2 <= 4 X1, X2 >=0 Standard LP form Maximize Z=3X1 + 9X2 S.T X1 +4X2 + X3 = 8 X1 + 2X2 + X4 = 4 X1, X2, X3, X4 >=0 46Dr.Farouk Sha'ban
  • 47. X1=0, X2 =2, X3 =0, X4=0, Z=18 Is it possible to stop at the second iteration (when degeneracy first appears) even though it is not optimum? The answer is NO, because the solution may be temporarily degenerate. 47Dr.Farouk Sha'ban
  • 48. 2) Alternative optima (Infinity ofSolution): When the objective function is parallel to a binding constraint. So the objective function (Z) will have the same optimal value at more than one solution point. Example 2: Maximize Z= 2 X1 + 4 X2 X1 + 2X2 <= 5 X1 + X2 <= 4 X1, X2 >=0 Standard LP form Maximize Z=2X1 + 4X2 S.T X1 +2X2 + X3 = 8 X1 + X2 + X4 = 4 X1, X2, X3, X4 >=0 48Dr.Farouk Sha'ban
  • 49. First Optimum Solution: X1 *=0, X2 *=5/2, X3 *=0, X4 *=3/2, Z*=10 Second Optimum Solution: X1 *=3, X2 *=1, X3 *=0, X4 *=0, Z*=10 In the second table: X1=0 , X2= 5/2 In the third table: X1= 3 , X2= 1 The general form: X1 = α (0) + (1-α) (3) = 3-3α X2 = α (5/2) + (1-α) (1) = 1+3/2α α = 0 → 1 49Dr.Farouk Sha'ban
  • 50. 3) Unbounded Solution: In which the objective function (Z) can be increased indefinitely without violating any of the constraints i.e.; the solution space is unbounded in at least one direction. Example 3: Maximize Z= 2 X1+ X2 S.T X1- X2 <= 10 2X1 <= 40 X1, X2 >=0 50Dr.Farouk Sha'ban
  • 51. Standard LP form Maximize Z=2X1 +X2 S.T X1 -X2 + X3 = 10 2X1 + X4= 40 X1, X2, X3, X4 >=0 Both X1, X2 are candidates for entering the solution. But all the constraint coefficient under X2 are negative or zero, meaning that X2 can be increased indefinitely without violating any of the constraints. Any increase in X2 will increase Z so it can be increased ∞ as X2 → ∞. Thus the problem has no bounded solution. 51 Dr.Farouk Sha'ban
  • 52. 4) Non-existing or Infeasible Solution: If the constraints are not satisfied simultaneously, the model has no feasible solution. This situation can never occur if all the constraints are of the type <= (assuming non- negative R.H.S constraints) because the slacks provide a feasible solution. Example 4: Maximize Z= 3 X1 +2 X2 S.T 2 X1 + X2 <= 2 3 X1 +4 X2 >= 12 X1, X2 >=0 52Dr.Farouk Sha'ban
  • 53. Transportation Model and Its Variants Definition of the transportation model The transportation model is a special class of the LP problem. It deals with the situation in which a commodity is shipped from source (e.g. factories) to destinations (e.g. warehouses). The objective is to determine the amounts shipped from each source to each destination that minimize the total shipping cost while satisfying both the supply limits and the demand requirements. 53 Dr.Farouk Sha'ban
  • 54. Example 1: There are three plants A, B, C and two destinations 1and 2, the distance between them is as follows The mile costs 8 cents find the cost/unit round to $ We define X11 as the amount shipped from A to 1 X12 as the amount shipped from A to 2 X21 as the amount shipped from B to 1 X22 as the amount shipped from B to 2 X31 as the amount shipped from C to 1 X32 as the amount shipped from C to 2 The plants A, B, and C produces 1000, 1500, and1200 cars respectively. The destination 1&2 demands are 2300 and 1400 cars. 54Dr.Farouk Sha'ban
  • 55. The LP model is Minimize Z=80 X11+215 X12 +100 X21 +108 X22 +102 X31 +68 X32 S.T X11 + X12 = 1000 ……….…… (A) X21 + X22 = 1500 ……………. (B) X31 + X32 = 1200 ……………. (C) X11 + X21+ X31 = 2300 ……………. (1) X12 + X22+ X32 = 1400 …………..... (2) Xij >=0 i=1, 2, 3 j=1, 2 These constraints are all equations because the total supply from the three plants = 1000 + 1500 + 1200 = 3700 cars, equals the total demands at the two destinations = 2300 + 1400 = 3700 cars. The LP model can be solved by the simplex method. However, the special structure of the constraints allows us to solve the problem more conveniently using the transportation tableau. When the total supply does not equal the total demand, the transportation model is said to be unbalanced. We must add a dummy source or destination. 55 Dr.Farouk Sha'ban
  • 56. Example 2: In example (1) suppose that plant B capacity is 1300 cars (instead of 1500). The total supply =3500cars and the total demand = 3700cars. So the total supply < the total demand. Therefore, we have to add dummy source with capacity 200 cars. 56Dr.Farouk Sha'ban
  • 57. Example 3: In example (1) suppose that the demand of the destination 1 is 1900 cars (instead of 2300). The total supply =3700cars and the total demand = 3300cars. So the total supply > the total demand. Therefore, we have to add dummy destination with 400 cars. 57Dr.Farouk Sha'ban
  • 58. The Transportation Algorithm Step (1): Determine an Initial Basic Feasible Solution (IBFS) by using one of the following methods. 1.The North-West Corner Method OR, 2.The Least-Cost Method OR, 3.Vogel Approximation Method. A general T.M. with m sources and n destinations has m + n constraints, one for each source and each destination. However, because the T.M. is always balanced, one of these equation is redundant. Thus, the model has m + n - 1 independent constraint equations, which means that the starting basic solution consists of m + n – 1 basic variables. Step (2): Improve the IBFS •Determine an entering variable. •Determine a leaving variable. •Obtain a new BFS •If the solution is optimal stop. Otherwise; repeat step (2). 58Dr.Farouk Sha'ban
  • 59. Steps of North-West Method 1. Allocate as much as possible to a selected cell X11 2. Cross out the row or column with zero supply or demand (if both are satisfied at the same time, only one should be crossed out). 3. If exactly one row or column is left uncrossed out stop. Otherwise go to step(1) 59Dr.Farouk Sha'ban
  • 60. Example 3: Solve the following transportation problem. Solution Step (1): finding the IBFS •Using the North-West Corner Method Transportation Cost = 5(10) +10(2) +5(7) +15(9) +5(20) +10(18) =520 60Dr.Farouk Sha'ban
  • 61. The Least-Cost Method: This method gives a better starting solution because it takes the cost into consideration Transportation Cost = 15(2) +15(9) +0(7) +10(20) +5(4) +5(18) =475 61Dr.Farouk Sha'ban
  • 62. Steps of Least-Cost Method 1. Assign as much as possible to the variable with the smallest unit cost cell. 2. Cross out the row or column with zero supply of demand (if both are satisfied at the same time, only one should be crossed out). 3. If exactly one row or column is left uncrossed out stop. Otherwise go to step(1) 62Dr.Farouk Sha'ban
  • 63. The Vogel Approximation Method: This method provides a better starting solution (optimal or closed to the optimal solution) Steps of Vogel Approximation Method 1. In each row and column, subtract the lowest two costs from each other. 2. Determine the row or column with the largest difference. 3. Allocate as much as possible to the variable with the least cost in the selected row or column. Any row or column with zero supply or demand would not be used in computing the following step. 4. If exactly one row or column remains uncrossed out stop. Otherwise, go to step (1). 5. If only one row or column with positive supply or demand remains uncrossed out determine the basic variable by the least-cost method. 6. If all uncrossed out rows and columns have assigned zero supply and demand, determine the zero basic variable by the least-cost method. Note: In all the three methods, if you have a tie you can break the tie arbitrarily. 63Dr.Farouk Sha'ban
  • 64. X31=5 X12=15 X23=15 X14=0, X34=5, X24=10 Transportation Cost = 15(2) + 15(9) +0(4) +10(20) +5(4) +5(18) = 475 It is expected to produce better starting solution than least-cost method. 64 Dr.Farouk Sha'ban
  • 65. Improving the IBFS Determine an entering variable using method of multipliers (U, V method), In this method associate the multipliers with row I and column j of the transportation tableau. •For each current basic variable Ui + Vj = Cij for each basic Xij •For non-basic variable C'ij = Ui + Vj - Cij for each non-basic Xij Choose the non-basic variable with the largest positive coefficient (C'ij) to be the entering variable. The solution is optimal if and only if all C'ij are non- positive. 65Dr.Farouk Sha'ban
  • 66. Improving the IBFS Determine an entering variable using method of multipliers (U,V) method, In this method associate the multipliers with row I and column j of the transportation tableau. For each current basic variable Ui + Vj = Cij for each basic Xij For non-basic variable C’ij = Ui + Vj - Cij for each non-basic Xij Choose the non-basic variable with the largest positive coefficient (C’ij) to be the entering variable. The solution is optimal if and only if all C’ij are non-positive. Consider the same example: 66Dr.Farouk Sha'ban
  • 68. The entering variable must have the maximum C'ij which is X31 = 9 To determine the leaving variable make a closed loop of basic variable starting with maximum C'ij of non-basic variable keeping: 1. Supply and demand requirements remain satisfied. 2. No negative shipments are allowed through any of the routes. Therefore, θ=5 and X31 will be basic with value 5 and X22 is a basic variable but with value 0 and X11 will be non-basic (leaving variable) The cost of the IBFS by Northwest corner method was 520$ The first iteration cost is 475$ (less which is better) In the second iteration Get the entering variable with maximum C'ij = C'14 = 4 The Leaving variable is X24 =10 X14 = 10 and the new solution is: 68Dr.Farouk Sha'ban
  • 69. All C'ij is negative for all non-basic variables, so the solution is optimal which is: X12 =5, X14 =10, X22 =10, X23 =15, X31 =5, X34 =5 With optimum cost = 5*2 +10*11 + 10*7 + 15*9 +5*4 + 5*18 = 10+110+70+135+20+90 = 435 69Dr.Farouk Sha'ban
  • 70. The Assignment Model There are n machines M1, M2, M3…, Mn. And n different jobs J1, J2, …., Jn. The jobs are to be assigned to these machines. The machine cost for each job depends on the machine to which it is assigned. Each machine can work only on one job. The problem is to assign the jobs to the machines to minimize the total cost of machining. Number of possible assignment = n! If n=5, then 5! = 120 ways 70Dr.Farouk Sha'ban
  • 71. The Linear Programming Formulation of the Problem Decision variables Xij job i is assigned to machine j Objective Function Minimize Z= Σn j=1 Σn i=1 Cij Xij Constraints Σn j=1 Xij =1 i= 1, 2… n Σn i=1 Xij =1 j= 1, 2… n Xij =1 if the job i is assigned to the machine j Xij =0 other wise The Assignment Algorithm (Hungarian Algorithm) It is the most efficient way or solving the assignment problem. It is based on the idea that if a constant is added or subtracted from any row or column the optimal assignment is not affected. 71Dr.Farouk Sha'ban
  • 72. The Algorithm Steps 1. Subtract the smallest value in each column from all the values in that column. 2. Subtract the smallest value in each row from all the values in that row. 3. Note: step 1 & 2 will produce a cost matrix containing at least one zero element in each row or column. 4. Determine a feasible assignment using the cells with zero cost. If this is possible stop, as optimal solution is found. This step is done as follows: a) Determine the number of lines required to cover all zeros. b) If the number of lines is equal to n, stop (This is the optimal assignment). c) If the number of lines is less than n then go to (4). 5. Subtract the smallest value not covered with lines from all uncovered values and add it to the value at the intersection of the lines then go to (3). Note: Obtain the minimum cost from the original table. 72Dr.Farouk Sha'ban
  • 73. Example 1: Solve the following assignment problem. Solution: The optimal assignment is X12, X21, X33 Job1 is assigned to machine2 Job2 is assigned to machine1 Job3 is assigned to machine3 The cost = 10 + 9 + 8 = 27$ Jobs Person 73Dr.Farouk Sha'ban
  • 74. Example 2: Solve the following assignment problem. Solution: The optimal assignment is X15, X22, X33, X44, X51 Job1 is assigned to machine5 Job2 is assigned to machine2 Job3 is assigned to machine3 Job4 is assigned to machine4 Job5 is assigned to machine1 The cost = 3 + 4 + 2 + 5 + 3 = 17$ 74Dr.Farouk Sha'ban
  • 75. 6.Network Models 6.1Introduction There is a multitude of operations research situations that can be modeled and solved as networks (nodes connected with branches) We have 5 network algorithms such as: 1. Minimal spanning tree. 2. Shortest route algorithm. 3. Minimum-cost capacitated network algorithm. 4. Critical Path Method (CPM). 5. Program Evaluation and Review Technique (PERT). 6.7Project planning and control with PERT-CPM The successful management of large-scale projects requires careful planning, scheduling and control of numerous interrelated activities especially when these activities have to be performed in a specified technological sequence, to aid in these tasks special procedures based on the use of network techniques were developed. The most important of these procedures are:  Critical Path Method (CPM).  Program Evaluation and Review Technique (PERT). 75Dr.Farouk Sha'ban
  • 76. Applications of PERT & CPM 1. Construction projects ( buildings, highways, houses, bridges) 2. Preparations of bids and proposals for large projects. 3. Maintenance planning of oil refineries, ship repair and other large operations. 4. Manufacture and assembly of large items as aero plans and computers. 5. Development of new weapons system. 6. Simple projects such as cleaning and painting. 76 Dr.Farouk Sha'ban
  • 77. Basic Terminology 1. A Project: A project defines a combination of interrelated activities that must be done in a certain order before the entire task can be completed. 2. An Activity: It is an effort required to complete a plan of the project. Most activities can not start until some others are completed. 3. Real Activity: Consumes resources and time. 4. Waiting Activity: Consumes time. 5. Dummy Activity: Consumes no time and no resources. It represents the dependence of one activity upon another. 6. An Event: Represents a point in time. It signifies the beginning or ending of some activities. 77Dr.Farouk Sha'ban
  • 78. Network Representation 1. An activity is represented by a line or an arrow (usually with time estimate written along it). The arrow begins and ends with an event which is represented by a node. 1. A dummy activity is represented by dashed line arrow or solid arrow with zero time estimate. 2. The arrow must be oriented from left to right. 3. The network must have one initial node and one ending node. 4. Any two events may not be connected by more than one activity. 5. Event numbers must not be duplicated in the network. 6. Each activity is represented by one and only one arrow. No single activity can be represented twice in the network. 78Dr.Farouk Sha'ban
  • 79. Numbering a network 1. An initial event is one which has arrows coming out of it only. Number it (1). 2. Delete all arrows emerging from event (1). This will create at least one more initial event, number these new events(s) as (2, 3…). 3. Delete all emerging arrows from these numbered events which will create new initial events and continue until the last event which has no arrows emerging from it. 79Dr.Farouk Sha'ban
  • 80. Solution by Linear Programming Formulation Each node represents a variable. Each arc represents a constraint. Example 1: Consider the following Network problem. Decision variables Let ti represents the time at which event (i) occurs i= 1, 2, 3, 4, 5. t4: time at which jobs (C) & (D) are completed t5: time at which the project is completed Time of completion of the whole project = t5 – t1 Objective Function Minimize Z= t5 – t1 Constraints t2 – t1 ≥ 3 , t3 – t1 ≥ 1 , t3 – t2 ≥ 0 t4 – t3 ≥ 2 , t4 – t2 ≥ 4 , t5 – t4 ≥ 5 ti ≥ 0 i= 1, 2, 3, 4, 5 This problem can be solved by simplex method Z* is the minimum time required to complete the project. 80Dr.Farouk Sha'ban
  • 81. Solution by Network Analysis CPM Calculations: Let Dij = Duration (completion time) of activity ij ESi = The earliest start time at which event (i) occurs LFi = The latest finish time at which event (i) occurs without delaying the project beyond its earliest time. ESi ………. Forward ESi = max [ESi+ Dij] for all (i, j) ESi = max [(2+8), (1+6), (3+5)] 81Dr.Farouk Sha'ban
  • 82. = max [10, 7, 8] =10 Start from the initial node and move to the terminal node for initial node ES1= 0 LFi ………. Backward ESi = min [LFj - Dij] for all (i, j) LFi = min [(10-3), (9-5), (13-4)] = min [7, 4, 9] =10 Start from the terminal node and move backward to the initial node for terminal node LFn = ESn 82Dr.Farouk Sha'ban
  • 83. Example1: Determine the critical path for the project network given below (all the durations are in days) Solution The critical path is defined by 1-2-4-5-6 The duration of the project = 25 days 83Dr.Farouk Sha'ban