or presentation
TRANSCRIPT
-
8/2/2019 Or Presentation
1/123
Operations Research 7Operations Research 7thth
EditionEdition
HAMDY A.TAHAHAMDY A.TAHA
Presentation Prepared by:Presentation Prepared by:
Nasser Mohammed AliNasser Mohammed Ali
Submitted to :Submitted to :
DR. Farouk ShaabanDR. Farouk Shaaban
-
8/2/2019 Or Presentation
2/123
IntroductionIntroduction
Operations Research (OR)
It is a scientific approach to determine
the optimum (best) solution to a decisionproblem under the restriction of limited
resources. Using the mathematical
techniques to model, analyze, and solve theproblem
-
8/2/2019 Or Presentation
3/123
Phases of OR
1. Definition of the problem
2. Model Construction
3. Solution of the model
4. Model validity5. Implementation of the solution
-
8/2/2019 Or Presentation
4/123
Definition of the problem includesDefinition of the problem includes
The description of the decision variables
(alternatives)
The determination of the objective of thestudy
The specification of the limitations under
which the modeled system operates
-
8/2/2019 Or Presentation
5/123
Model ConstructionModel Construction
Translating the real world problem into
mathematical relationships (the most
suitable model to represent the system, LP,dynamic, integer,)
-
8/2/2019 Or Presentation
6/123
Solution of the modelSolution of the model
Using wellUsing well--defined optimization techniques.defined optimization techniques.
An important aspect of model solution isAn important aspect of model solution is
sensitivity analysis.sensitivity analysis.
-
8/2/2019 Or Presentation
7/123
Model validityModel validity
Testing and evaluation of the model. ATesting and evaluation of the model. A
common method for testing a validity of acommon method for testing a validity of a
model is to compare its performance withmodel is to compare its performance withsome past data available for the actualsome past data available for the actual
system.system.
-
8/2/2019 Or Presentation
8/123
Implementation of the solutionImplementation of the solution
Implementation of the solution of validatedImplementation of the solution of validated
model involves the translation of themodel involves the translation of the
model's results into instructions issued inmodel's results into instructions issued inunderstandable form to the individuals.understandable form to the individuals.
-
8/2/2019 Or Presentation
9/123
Basic components of the modelBasic components of the model
1.1. Decision VariablesDecision Variables
2.2. Objective FunctionObjective Function
3.3. ConstraintsConstraints
-
8/2/2019 Or Presentation
10/123
Decision VariablesDecision Variables
It is the unknown to determined from theIt is the unknown to determined from the
solution of a model (what does the modelsolution of a model (what does the model
seek to determine). It is one of the spe
cificseek to determine). It is one of t
he spe
cificdecisions made by a decision maker (DM).decisions made by a decision maker (DM).
-
8/2/2019 Or Presentation
11/123
Objective FunctionObjective Function
It is the end result (goal) desired to beIt is the end result (goal) desired to be
achieved by the system. A commonachieved by the system. A common
objective is to maximize profit orobjective is to maximize profit orminimize cost. It is expressed as aminimize cost. It is expressed as a
mathematical function of the systemmathematical function of the system
decision variables.decision variables.
-
8/2/2019 Or Presentation
12/123
ConstraintsConstraints
These are the limitations imposed on theThese are the limitations imposed on the
variables to satisfy the restriction of thevariables to satisfy the restriction of the
modeled system. They m
ust be expressed asmodeled system. T
hey m
ust be expressed asmathematical functions of the systemmathematical functions of the system
decision variables (D.V).decision variables (D.V).
-
8/2/2019 Or Presentation
13/123
Example 1:Example 1:
A company manufacturesA company manufactures two products A&B.two products A&B.
withwith4 & 3 units4 & 3 units. A&B take. A&B take 3&2 minutes3&2 minutes
respectively to be machined. The total timerespectively to be machined. The total time
available at machining departmentavailable at machining department is 800 hoursis 800 hours
(100 days or 20 weeks). A market research(100 days or 20 weeks). A market research
showed thatshowed that at leastat least 10000 units of A10000 units of A and notand not
more thanmore than 6000 units of B6000 units of B are needed. It isare needed. It isrequired to determine the number ofunits ofrequired to determine the number ofunits of
A&B to be produced to maximize profit.A&B to be produced to maximize profit.
-
8/2/2019 Or Presentation
14/123
-
8/2/2019 Or Presentation
15/123
Example 2:Example 2: Feed mix problemFeed mix problem
A farmer is interested in feeding his cattle atA farmer is interested in feeding his cattle at
minimum cost.minimum cost. Two feeds are used A&BTwo feeds are used A&B. Eachcow. Eachcow
must getmust get at leastat least 400 grams/day of protein400 grams/day of protein,, at leastat least
800 grams/day ofcarbohydrates800 grams/day ofcarbohydrates, and, and not more thannot more than100 grams/day of fat100 grams/day of fat. Given that. Given that A contains 10%A contains 10%
protein, 80% carbohydrates and 10% fat while Bprotein, 80% carbohydrates and 10% fat while B
contains 40% protein, 60% carbohydratescontains 40% protein, 60% carbohydrates andand no fatno fat..
A costs 2 L.E/kgA costs 2 L.E/kg, and, and B costs 5 L.E/kg.B costs 5 L.E/kg. Formulate theFormulate theproblem to determine the optimum amount of eachproblem to determine the optimum amount of each
feed to minimize cost.feed to minimize cost.
-
8/2/2019 Or Presentation
16/123
Problem FormulationProblem Formulation
Decision variablesDecision variablesX1= weight of feed A kg/day/animalX1= weight of feed A kg/day/animal
X2= weight of feed B kg/day/animalX2= weight of feed B kg/day/animal
Objective FunctionObjective FunctionMaximize Z= 2XMaximize Z= 2X11 + 5X+ 5X22
ConstraintsConstraintsProteinProtein 0.1 X0.1 X
11+ 0.4 X+ 0.4 X
22 0.4 0.4
CarbohydratesCarbohydrates 0.8 X0.8 X11 + 0.6 X+ 0.6 X22 0.8 0.8
FatsFats 0.1 X0.1 X11 0.1 0.1
XX11, X, X22 0 0
-
8/2/2019 Or Presentation
17/123
Example 3:Example 3: Blending ProblemBlending Problem
An iron ore fromAn iron ore from 4 mines4 mines will be blended.will be blended.
The analysis has shown that, in order toThe analysis has shown that, in order to
obtain suitable tensile properties, minim
umobtain s
uitable tensile properties, minim
umrequirements must be met forrequirements must be met for3 basic3 basic
elements A, B, and Celements A, B, and C. Each of the. Each of the 4 mines4 mines
contains different amounts of thecontains different amounts of the 3 elements3 elements
((see the tablesee the table). Formulate to find the least). Formulate to find the least
cost blend for one ton of iron ore.cost blend for one ton of iron ore.
-
8/2/2019 Or Presentation
18/123
-
8/2/2019 Or Presentation
19/123
Problem FormulationProblem Formulation
Decision variablesDecision variablesX1= Fraction of ton to be selected from mine number1X1= Fraction of ton to be selected from mine number1
X2= Fraction of ton to be selected from mine number 2X2= Fraction of ton to be selected from mine number 2
X3= Fraction of ton to be selected from mine number 3X3= Fraction of ton to be selected from mine number 3
X4= Fraction of ton to be selected from mine number 4X4= Fraction of ton to be selected from mine number 4
Objective FunctionObjective Function
Minimize Z= 800 X1 + 400 X2 + 600 X3 + 500 X4Minimize Z= 800 X1 + 400 X2 + 600 X3 + 500 X4
ConstraintsConstraints
10 X10 X11+ 3X+ 3X22 + 8X+ 8X33 + 2X+ 2X44 55
90 X90 X11 + 150 X+ 150 X22 + 75 X+ 75 X33+ 175 X+ 175 X44 1010
45 X45 X11 + 25 X+ 25 X22 + 20 X+ 20 X33+ 37 X+ 37 X44 3030
XX11 + X+ X22 + X+ X33 + X+ X44 11
XX11, X, X22, X, X33, X, X44 00
u
uu
u
!
-
8/2/2019 Or Presentation
20/123
Example 4:Example 4: Inspection ProblemInspection Problem
A company hasA company has 2 grades2 grades of inspectors 1&2. It isof inspectors 1&2. It isrequired thatrequired that at leastat least 1800 pieces1800 piecesbe inspectedbe inspectedper 8per 8
hour dayhour day.. Grade 1Grade 1 inspectors can check pieces at theinspectors can check pieces at the
rate of 25 perhourrate of 25 perhourwith anwith an accuracy of 98%.accuracy of 98%. Grade 2Grade 2
inspectors can check at theinspectors can check at the rate of15 pieces perhourrate of15 pieces perhourwith anwith an accuracyaccuracy of 95%.of 95%. Grade 1costs 4 L.E/hourGrade 1costs 4 L.E/hour,,
grade 2 costs 3 L.E/hourgrade 2 costs 3 L.E/hour.. Each time an error is madeEach time an error is made
by an inspectorcosts the company 2 L.Eby an inspectorcosts the company 2 L.E. There are. There are 88
grade 1grade 1 andand 10 grade 210 grade 2 inspectors available. Theinspectors available. Thecompany wants to determine the optimal assignmentcompany wants to determine the optimal assignment
of inspectors which will minimize the total cost ofof inspectors which will minimize the total cost of
inspection/day.inspection/day.
-
8/2/2019 Or Presentation
21/123
Problem FormulationProblem Formulation
Decision variablesDecision variablesX1= Number of grade 1 inspectors/day.X1= Number of grade 1 inspectors/day.
X2=X2=Number of grade 2 inspectors/day.Number of grade 2 inspectors/day.
Objective FunctionObjective Function
Cost of inspection = Cost of error + Inspector salary/dayCost of inspection = Cost of error + Inspector salary/day
Cost of grade 1/hour= 4 + (2 X 25 X 0.02) = 5 L.ECost of grade 1/hour= 4 + (2 X 25 X 0.02) = 5 L.E
Cost of grade 2/hour= 3 + (2 X15 X 0.05) = 4.5 L.ECost of grade 2/hour= 3 + (2 X15 X 0.05) = 4.5 L.E
Minimize Z= 8 (5 X1 + 4.5 X2) = 40 X1 + 36 X2Minimize Z= 8 (5 X1 + 4.5 X2) = 40 X1 + 36 X2
ConstraintsConstraints
XX11
8 8
XX22 10 10
8(25) X8(25) X11+ 8(15)X+ 8(15)X22 1800 1800
200 X200 X11+ 120 X+ 120 X22 1800 1800
XX11,, XX22 0 0
-
8/2/2019 Or Presentation
22/123
Example 5:Example 5: TrimTrim--loss Problem.loss Problem.
A company produces paper rolls with aA company produces paper rolls with astandard width of 20 feet. Each special customerstandard width of 20 feet. Each special customer
orders with different widths are produced byorders with different widths are produced by
slitting the standard rolls. Typical orders areslitting the standard rolls. Typical orders are
summarized in the following tables.summarized in the following tables.
-
8/2/2019 Or Presentation
23/123
Possible knife settingsPossible knife settings
Formulate to minimize the trim loss and the numberFormulate to minimize the trim loss and the number
of rolls needed to satisfy the order.of rolls needed to satisfy the order.
Figure
2.9
-
8/2/2019 Or Presentation
24/123
-
8/2/2019 Or Presentation
25/123
Problem FormulationProblem FormulationDecision variablesDecision variables
XXjj ==Number of standard rolls to be cutNumber of standard rolls to be cut accordingaccording toto
setting j j =1, 2, 3, 4, 5, 6setting j j =1, 2, 3, 4, 5, 6
Number of 5 feet rolls producedNumber of 5 feet rolls produced = 2 X= 2 X22 + 2 X+ 2 X33 + 4 X+ 4 X44 + X+ X55
Number of 7 feet rolls producedNumber of 7 feet rolls produced =X=X11 + X+ X22+ 2 X+ 2 X55 Number of 9 feet rolls producedNumber of 9 feet rolls produced =X=X11 + X+ X33+ 2 X+ 2 X66 Let YLet Y11, Y, Y22, Y, Y33be the number of surplus rolls of the 5, 7, 9 feetbe the number of surplus rolls of the 5, 7, 9 feet
rolls thusrolls thus
YY11= 2 X= 2 X22 + 2 X+ 2 X33 + 4 X+ 4 X44 + X+ X55 -- 150150YY22=X=X11 + X+ X22+ 2 X+ 2 X55 -- 200200
YY33=X=X11 + X+ X33+ 2 X+ 2 X66 -- 300300
The total trim losses = L (4XThe total trim losses = L (4X11 +3 X+3 X22+ X+ X33 + X+ X55 + 2 X+ 2 X66 + 5Y+ 5Y11++
7Y7Y22+ 9Y+ 9Y33)) **Where L is the length of the standard roll.Where L is the length of the standard roll.
-
8/2/2019 Or Presentation
26/123
Objective FunctionObjective Function
MinimizeMinimize Z= L(4XZ= L(4X11 +3 X+3 X22+ X+ X33 + X+ X55 + 2 X+ 2 X66 ++5Y5Y11+ 7Y+ 7Y22+ 9Y+ 9Y33))
ConstraintsConstraints
2 X2 X22+ 2 X+ 2 X33+ 4 X+ 4 X44+ X+ X55 -- YY11 == 150150XX11+ X+ X22 + 2 X+ 2 X55 -- YY22 = 200= 200
XX11+ X+ X33 + 2 X+ 2 X66 -- YY33 == 300300
X1, X2, X3, X4, X5, X6X1, X2, X3, X4, X5, X6 0 0
Y1, Y2, Y3Y1, Y2, Y3 0 0
-
8/2/2019 Or Presentation
27/123
General form of a LP problem with mGeneral form of a LP problem with m
constraints and n decision variables is:constraints and n decision variables is:
Maximize Z = CMaximize Z = C11XX11+ C+ C22XX22+ + C+ + CnnXXnn ConstraintsConstraints
AA1111XX11 + A+ A1212XX22++ A++ A1n1nXXnn B B11
AA2121XX11 + A+ A2222XX22++ A++ A2n2nXXnn B B22
..
..
..
..
AAm1m1XX11+ A+ Am2m2XX22+...+ A+...+ AmnmnXXnn B Bmm
XX11
, X, X22,, X,, X
nn 0 0
-
8/2/2019 Or Presentation
28/123
OROR
MaximizeMaximize
ConstraintsConstraints
!
!
n
jjjxcz
1
!
e
n
jijij bxa
1
mi ,...,2,1, !
xj 0u nj ,...,2,1, !
-
8/2/2019 Or Presentation
29/123
WhereWhere
nn==Number of activities.Number of activities.
XXjj= Level of activity= Level of activity jj
CCjj= Contribution of the objective function/unit of= Contribution of the objective function/unit ofactivity jactivity j
mm= Number of resources= Number of resources
BBii = Amount of resource i available.= Amount of resource i available.AAijij= Amount of resource i consumed by one unit of= Amount of resource i consumed by one unit of
activity jactivity j
-
8/2/2019 Or Presentation
30/123
Terminology of solutions for a LP model:Terminology of solutions for a LP model:
A SolutionA Solution
Any specifications of values of XAny specifications of values of X11, X, X22, , X, , Xnn is calledis calleda solution.a solution.
A Feasible SolutionA Feasible SolutionIs a solution for which all the constraints areIs a solution for which all the constraints are
satisfied.satisfied.
An Optimal SolutionAn Optimal Solution
Is a feasible solution that has the most favorable valueIs a feasible solution that has the most favorable valueof the objective function (largest of maximize orof the objective function (largest of maximize orsmallest for minimize)smallest for minimize)
Notes
-
8/2/2019 Or Presentation
31/123
If there is exactly one optimal solution it mustIf there is exactly one optimal solution it must
be acorner point feasible sol
ution.be a
corner point feasible sol
ution.
If there are multiple optimal solutions, then atIf there are multiple optimal solutions, then atleast two of them must be adjacent cornerleast two of them must be adjacent corner--
point feasible solutions.point feasible solutions.
Two cornerTwo corner--point feasible solutions are said topoint feasible solutions are said to
be adjacent if the line segment connectingbe adjacent if the line segment connectingthem lies on the boundary of the feasiblethem lies on the boundary of the feasibleregion (one of the constraints).region (one of the constraints).
-
8/2/2019 Or Presentation
32/123
Graphical SolutionGraphical Solution
Construction of the LP modelConstruction of the LP model
Example 1: The Reddy Mikks CompanyExample 1: The Reddy Mikks Company
Reddy Mikks produces both interior and exterior paintsReddy Mikks produces both interior and exterior paintsfrom two raw materials, M1&M2. The following tablefrom two raw materials, M1&M2. The following table
provides the basic data of the problem.provides the basic data of the problem.
-
8/2/2019 Or Presentation
33/123
A market survey indicates that the dailyA market survey indicates that the daily
demand for interior paint cannot exceed that ofdemand for interior paint cannot exceed that ofexterior paint by more than 1 ton. Also, theexterior paint by more than 1 ton. Also, the
maximum daily demand of interior paint is 2maximum daily demand of interior paint is 2
ton.ton. Reddy Mikks wants to determine the optimumReddy Mikks wants to determine the optimum
(best) product mix of interior and exterior(best) product mix of interior and exterior
paints that maximizes the total daily profitpaints that maximizes the total daily profit
-
8/2/2019 Or Presentation
34/123
Problem FormulationProblem Formulation
Decision variablesDecision variables
XX11=Tons produced daily of exterior paint.=Tons produced daily of exterior paint.
XX22=Tons produced daily of interior paint.=Tons produced daily of interior paint.
Objective FunctionObjective FunctionMaximize Z= 5 XMaximize Z= 5 X11 + 4 X+ 4 X22
ConstraintsConstraints
6 X6 X11+4 X+4 X22 2424
XX11+2 X+2 X22 66-- XX11+ X+ X22 11
XX22 22
XX11, X, X22 00
e
ee
e
u
-
8/2/2019 Or Presentation
35/123
Any solution that satisfies all the constraints of theAny solution that satisfies all the constraints of themodel is a feasible solution. For example, X1=3 tonsmodel is a feasible solution. For example, X1=3 tons
and X2=1 ton is a feasible solution. We have anand X2=1 ton is a feasible solution. We have an
infinite number of feasible solutions, but we areinfinite number of feasible solutions, but we are
interested in the optimum feasible solution that yieldsinterested in the optimum feasible solution that yieldsthe maximum total profit.the maximum total profit.
-
8/2/2019 Or Presentation
36/123
Graphical SolutionGraphical Solution
The graphical solution is valid only for twoThe graphical solution is valid only for two--
variable problem which is rarely occurred.variable problem which is rarely occurred.
The grap
hical sol
ution in
cludes two basi
c
The grap
hical sol
ution in
cludes two basi
csteps:steps:
1.1. The determination of the solution space thatThe determination of the solution space that
defines the feasible solutions that satisfyalldefines the feasible solutions that satisfyall
the constraints.the constraints.2.2. The determination of the optimum solutionThe determination of the optimum solution
from among all the points in the feasiblefrom among all the points in the feasible
solution space.solution space.
-
8/2/2019 Or Presentation
37/123
-
8/2/2019 Or Presentation
38/123
-
8/2/2019 Or Presentation
39/123
ABCDEF consists of an infinite number of points; weABCDEF consists of an infinite number of points; we
need a systematic procedure that identifies theneed a systematic procedure that identifies the
optimum solutions. The optimum solution isoptimum solutions. The optimum solution isassociated with a corner point of the solution space.associated with a corner point of the solution space.
To determine the direction in which the profitTo determine the direction in which the profit
function increases we assign arbitrary increasingfunction increases we assign arbitrary increasing
values of10 and 15values of10 and 15
5 X5 X11 + 4 X+ 4 X22=10=10
AndAnd 5 X5 X11 + 4 X+ 4 X22=15=15
The optimum solution is mixture of 3 tons of exteriorThe optimum solution is mixture of 3 tons of exteriorand 1.5 tons of interior paints will yield a daily profitand 1.5 tons of interior paints will yield a daily profit
of 21000$.of 21000$.
-
8/2/2019 Or Presentation
40/123
Example 2:Example 2: The Diet ProblemThe Diet Problem
Farm uses at least 800lb of special feed daily.Farm uses at least 800lb of special feed daily.The special feed is a mixture ofcorn andThe special feed is a mixture ofcorn and
soybean with the following composition.soybean with the following composition.
The food mixture must contain at least 30%The food mixture must contain at least 30%protein and at most 5% fiber. They want toprotein and at most 5% fiber. They want to
determine the daily minimum cost feed mix.determine the daily minimum cost feed mix.
-
8/2/2019 Or Presentation
41/123
Problem FormulationProblem Formulation
Decision variablesDecision variables
X1= lb ofcorn in the daily mix.X1= lb ofcorn in the daily mix.
X2= lb of soybean in the daily mix.X2= lb of soybean in the daily mix.
Objective FunctionObjective Function
Minimize Z= 0.3 XMinimize Z= 0.3 X11+ 0.9 X+ 0.9 X22 ConstraintsConstraints
X1+X1+ X2 800X2 800
0.09X1+ 0.6 X2 0.3 (X1+X2) 0.21X10.09X1+ 0.6 X2 0.3 (X1+X2) 0.21X1--0.3 X2 00.3 X2 0
0.02X1+0.06 X2 0.05(X1+X2) 0.03X10.02X1+0.06 X2 0.05(X1+X2) 0.03X1--0.01X2 00.01X2 0X1,X1, X2X2 00
u
uue
u e
-
8/2/2019 Or Presentation
42/123
-
8/2/2019 Or Presentation
43/123
Slack, Surplus, and Unrestricted
variables
Slack Variable: Forconstraints 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.
-
8/2/2019 Or Presentation
44/123
Surplus VariableSurplus Variable:: It is used in the constraints of typeIt is used in the constraints of type(( ) normally set minimum specification) normally set minimum specificationrequirements. Surplus represents the excess of therequirements. Surplus represents the excess of theL.H.S over the minimum requirement. For exampleL.H.S over the minimum requirement. For example(X(X11+X+X22 800) is equivalent to (X800) is equivalent to (X11+X+X22 -- SS11= 800)= 800)provided that Sprovided that S11 0, this signifies that a surplus0, this signifies that a surplus
amount of feed over the minimum requirement willamount of feed over the minimum requirement willbe producedbe produced
Unrestricted Variable:Unrestricted Variable: The variable whichcan beThe variable whichcan bepositive or negativepositive or negative
-
8/2/2019 Or Presentation
45/123
The Simplex MethodThe Simplex Method
IntroductionIntroduction
It is a general algebraic method to solve a set ofIt is a general algebraic method to solve a set of
linear equations. We use simplex method to getlinear equations. We use simplex method to get
extreme (orcorner) point solution. We must firstextreme (orcorner) point solution. We must firstconvert the model into the standard LP form by usingconvert the model into the standard LP form by using
slack or surplus variables to convert the inequalityslack or surplus variables to convert the inequality
constraints into equations. Our interest in the standardconstraints into equations. Our interest in the standard
LP form lies in the basic solutions of theLP form lies in the basic solutions of thesimultaneous linear equations.simultaneous linear equations.
-
8/2/2019 Or Presentation
46/123
Standard LP Form and its BasicStandard LP Form and its Basic
SolutionSolution
Example 1:Example 1: Express the following LP modelExpress the following LP modelin standard form.in standard form.
Maximize Z= 2XMaximize Z= 2X11+ 3X+ 3X22 +5 X+5 X33S.TS.T XX11+ X+ X22 -- XX33 --55
--6X6X11+ 7X+ 7X22 -- 9 X9 X33 4 4
XX11 + X+ X22 + 4 X+ 4 X33 =10=10
XX11, X, X22 00
XX33 unrestrictedunrestricted
-
8/2/2019 Or Presentation
47/123
Standard LP formStandard LP form
Maximize Z= 2XMaximize Z= 2X11 + 3 X+ 3 X22+5 X+5 X++
33--5 X5 X--33
S.TS.T --XX11-- XX22+3 X+3 X++
33--3 X3 X--33+ X+ X44 = 5= 5
--6X6X11+7 X+7 X22--9 X9 X++
33+9 X+9 X--33+ X+ X55 = 4= 4
XX11+ X+ X22+4 X+4 X++
33--4 X4 X--33 =10=10
X1, X2, X+3, XX1, X2, X+3, X--3, X4, X53, X4, X5 0 0
-
8/2/2019 Or Presentation
48/123
Determination of basic solutionsDetermination of basic solutions
The standard LP form includes mThe standard LP form includes m
simultaneous linear equations in n unknownssimultaneous linear equations in n unknowns
or variables (m
-
8/2/2019 Or Presentation
49/123
The resulting solution is basic solution if allThe resulting solution is basic solution if all
values are satisfying nonvalues are satisfying non--negativity. The nonnegativity. The non--
basic solution is feasible basic solutionbasic solution is feasible basic solution
otherwise, it is infeasible. The maximumotherwise, it is infeasible. The maximum
number of possible basic solution for mnumber of possible basic solution for m
equations in n unknowns isequations in n unknowns is
)!(!
!
mnm
n
-
8/2/2019 Or Presentation
50/123
Example 2:Example 2:
Maximize Z= 5XMaximize Z= 5X11 + 6X+ 6X22
S.TS.T 2X2X11 + 3X+ 3X22 18 18
2X2X11 + X+ X22 12123X3X11 + 3X+ 3X22 = 24= 24
XX11, X, X22 0 0
-
8/2/2019 Or Presentation
51/123
Standard LP formStandard LP form
Maximize Z=5XMaximize Z=5X11 + 6X+ 6X22
S.TS.T 2X2X11 + 3X+ 3X22 + X+ X33 =18=18
2X2X11 + X+ X22 + X+ X44 =12=123X3X11 + 3X+ 3X22 + X+ X55 = 24= 24
XX11, X, X22, X, X33, X, X44, X, X55 0 0
-
8/2/2019 Or Presentation
52/123
Maximum number of possible basicMaximum number of possible basic
solutions is:solutions is:
There are 3 constraints so, m=3. And we haveThere are 3 constraints so, m=3. And we have
5 variables so, n=55 variables so, n=5
10!2!3!3*4*5
!2!3!5
)!35(!3!5 !!!
-
8/2/2019 Or Presentation
53/123
The basic feasible solutions are the corner pointsThe basic feasible solutions are the corner points
-
8/2/2019 Or Presentation
54/123
The Simplex AlgorithmThe Simplex Algorithm
We solve the Reddy Mikks model, whereWe solve the Reddy Mikks model, whereX1=Tons produced daily of exterior paint.X1=Tons produced daily of exterior paint.
X2=Tons produced daily of interior paint.X2=Tons produced daily of interior paint.
Exterior and interior paints are produced from twoExterior and interior paints are produced from twotypes of raw materials M1 and M2types of raw materials M1 and M2
MaximizeMaximize ZZ --5 X5 X11-- 4 X4 X22+0 X+0 X33+0 X+0 X44+0 X+0 X55+0X+0X66=0=0
6 X6 X11+4 X+4 X22+ X+ X33 24 24
XX11+2 X+2 X22+ X+ X44 6 6
-- XX11+ X+ X22 + X+ X55 11
XX22 + X+ X66 2 2
XX11, X, X22, X, X33, X, X44, X, X55, X, X66 0 0
-
8/2/2019 Or Presentation
55/123
The variables X3, X4, X5, X6 are the slacksThe variables X3, X4, X5, X6 are the slacks
associated with the four (associated with the four () constraints.) constraints.
-
8/2/2019 Or Presentation
56/123
The starting basic feasible solution isThe starting basic feasible solution is
Is the starting solution optimal?
No, since the coefficients ofX1 and X2 are still negative so they
can increase the profit of Z.
-
8/2/2019 Or Presentation
57/123
We choose XWe choose X11with more negative (with more negative (--5) i.e.; X5) i.e.; X11 is theis the
entering variableentering variable..
Since none of the Z-row coefficients associated with the non-basic
variables X3, X4 is negative the last table is optimal.
-
8/2/2019 Or Presentation
58/123
-
8/2/2019 Or Presentation
59/123
The rules for selecting the entering and leavingThe rules for selecting the entering and leaving
variables are referred to as the optimality andvariables are referred to as the optimality and
feasibility conditionsfeasibility conditions
1)1) Optimality conditionsOptimality conditions
2)2) Feasibility ConditionFeasibility Condition
-
8/2/2019 Or Presentation
60/123
1.1. Optimality conditions:Optimality conditions:
The entering variable inThe entering variable in
maximizationmaximization(minimization) problem is(minimization) problem is
the nonthe non--basic variablebasic variable
having the most negativehaving the most negative
(positive) coefficient in(positive) coefficient in
the Zthe Z--row. Ties arerow. Ties arebroken arbitrarily. Thebroken arbitrarily. The
optimum is reached at theoptimum is reached at the
iteration where all the Ziteration where all the Z--
row coefficients of therow coefficients of thenonnon--basic variables arebasic variables are
nonnon--negative (nonnegative (non--
positive)positive)
2.2. Feasibility Condition:Feasibility Condition:
for both the maximum andfor both the maximum and
minimu
m problems th
eminimu
m problems th
eleaving variables is theleaving variables is the
basic variables associatedbasic variables associated
with the smallest nonwith the smallest non--
negative ratio. Ties arenegative ratio. Ties are
broken arbitrarily.broken arbitrarily.
-
8/2/2019 Or Presentation
61/123
The steps of the simplex method are:The steps of the simplex method are:
1.1. Determine a starting basic feasible solutionDetermine a starting basic feasible solution
2.2. Select an entering variable using theSelect an entering variable using theoptimality condition. Stop if there is nooptimality condition. Stop if there is no
entering variable.entering variable.3.3. Select a leaving variable using the feasibilitySelect a leaving variable using the feasibility
condition.condition.
4.4. Determine the new basic solution by usingDetermine the new basic solution by usingthe appropriate Gaussthe appropriate Gauss--Jordan computation.Jordan computation.
5.5. Go to step 1Go to step 1
-
8/2/2019 Or Presentation
62/123
Special Cases in Simplex MethodSpecial Cases in Simplex Method
1.1. DegeneracyDegeneracy
2.2. Alternative optima (Infinity ofSolution)Alternative optima (Infinity ofSolution)
3.3. Unbou
ndedS
olu
tionUnbou
ndedS
olu
tion4.4. NonNon--existing orInfeasible Solutionexisting orInfeasible Solution
-
8/2/2019 Or Presentation
63/123
Degeneracy:Degeneracy: one or more basicone or more basic
variable(s) has zero valuevariable(s) has zero value..
If you find more than one leaving variableIf you find more than one leaving variable
(i.e.; we have two or more variables having the(i.e.; we have two or more variables having the
same ratio in the R.H.S) so one or more of thesame ratio in the R.H.S) so one or more of the
basic variable(s) will be equal zero in the nextbasic variable(s) will be equal zero in the next
iteration. This condition indicates that theiteration. This condition indicates that the
model has at least one redundant constraint.model has at least one redundant constraint.
-
8/2/2019 Or Presentation
64/123
Example 1:Example 1:
Maximize Z= 3 XMaximize Z= 3 X11+ 9X+ 9X22
XX11+4 X+4 X22 88
XX11+2 X+2 X22 44
XX11, X, X22 00
Standard LP formStandard LP form
Maximize Z=3XMaximize Z=3X11 + 9X+ 9X22
S.TS.T XX11+4X+4X22+ X+ X33 = 8= 8XX11+ 2X+ 2X22 + X+ X44= 4= 4
XX11, X, X22, X, X33, X, X44 00
-
8/2/2019 Or Presentation
65/123
X1=0 , X2 =2 , X3 =0 , X4=0 , Z=18Is it possible to stop at the second iteration (when degeneracyfirst appears) even though it is not optimum? The answer is NO,
because the solution may be temporarily degenerate.
-
8/2/2019 Or Presentation
66/123
Alternative optimaAlternative optima (Infinity of(Infinity of
Solution):Solution):
When the objective function is parallel to aWhen the objective function is parallel to a
binding constraint. So the objective functionbinding constraint. So the objective function
(Z) will have the same optimal value at more(Z) will have the same optimal value at more
than one solution pointthan one solution point..
-
8/2/2019 Or Presentation
67/123
Example 2:Example 2:
Maximize Z= 2 XMaximize Z= 2 X11+ 4 X+ 4 X22
XX11+2 X+2 X22 5 5
XX11+ X+ X2222 4 4
XX11, X, X22 0 0
Standard LP formStandard LP form
Maximize Z=2XMaximize Z=2X11 + 4X+ 4X22
S.TS.T XX11+2X+2X22+ X+ X33 = 8= 8XX11+ X+ X22+ X+ X44 = 4= 4
XX11, X, X22 , X, X33 , X, X44 0 0
-
8/2/2019 Or Presentation
68/123
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
-
8/2/2019 Or Presentation
69/123
Unbounded Solution:Unbounded Solution:
In which the objective function (Z) can beIn which the objective function (Z) can be
increased indefinitely without violating and ofincreased indefinitely without violating and of
the constraints i.e.; the solution space isthe constraints i.e.; the solution space is
unbounded in at least one directionunbounded in at least one direction..
-
8/2/2019 Or Presentation
70/123
Example 3:Example 3:
Maximize Z= 2 X1 + X2Maximize Z= 2 X1 + X2
S.T X1S.T X1 -- X2X2 1010
2X12X1 4040
X1 , X2X1 , X2 00 Standard LP formStandard LP form
Maximize Z=2XMaximize Z=2X11 +X+X22S.TS.T XX11--XX22+ X+ X33 =10=10
2X2X11 + X+ X44 = 40= 40
XX11, X, X22 , X, X33 , X, X44 0 0
-
8/2/2019 Or Presentation
71/123
BothXBothX11, X, X22 are candidates for entering the solution. But all theare candidates for entering the solution. But all the
constraint coefficient underXconstraint coefficient underX22 are negative or zero, meaning thatare negative or zero, meaning that
XX22 can be increased indefinitely without violating any of thecan be increased indefinitely without violating any of the
constraints. Any increase in Xconstraints. Any increase in X22 will increase Z so it can bewill increase Z so it can be
increased as Xincreased as X22 . Thus, the problem has no bounded . Thus, the problem has no bounded
solution.solution.
-
8/2/2019 Or Presentation
72/123
NonNon--existing or Infeasible Solution:existing or Infeasible Solution:
If the constraints are not satisfiedIf the constraints are not satisfied
simultaneously, the model has no feasiblesimultaneously, the model has no feasible
solution. This situation can never occur if allsolution. This situation can never occur if all
the constraints are of the type (assuming nonthe constraints are of the type (assuming non--negative R.H.Sconstraints) because the slacksnegative R.H.Sconstraints) because the slacks
provide a feasible solution.provide a feasible solution.
-
8/2/2019 Or Presentation
73/123
Example 4:Example 4:
Maximize Z= 3 XMaximize Z= 3 X11+2 X+2 X22
S.TS.T 2 X2 X11 + X+ X22 2 2
3 X3 X11 +4X+4X22 12 12
XX11 , X, X22 0 0
T i M d l d IT i M d l d I
-
8/2/2019 Or Presentation
74/123
Transportation Model and ItsTransportation Model and Its
VariantsVariants
Definition of the transportation modelDefinition of the transportation model
The transportation model is a special class ofThe transportation model is a special class of
the LP problem. It deals with the situation inthe LP problem. It deals with the situation in
which a commodity is shipped from sourcewhich a commodity is shipped from source
(e.g. factories) to destinations (e.g.(e.g. factories) to destinations (e.g.
warehouses). The objective is to determine thewarehouses). The objective is to determine the
amou
nts sh
ipped from each
sou
rce to ea
chamo
unts s
hipped from ea
chsou
rce to ea
chdestination that minimize the total shippingdestination that minimize the total shipping
cost while satisfying both the supply limits andcost while satisfying both the supply limits and
the demand requirements.the demand requirements.
-
8/2/2019 Or Presentation
75/123
WhereWhere
aaii: represents the amount available at source i where i=1,2,3 m: represents the amount available at source i where i=1,2,3 m
bbjj: represents the demand by destination j where j=1,2,3 n: represents the demand by destination j where j=1,2,3 n
ij: arc from source i to destination j (road)ij: arc from source i to destination j (road)CCijij: cost forunit shipped from source i to destination j: cost forunit shipped from source i to destination j
XXijij: units supplied from source i to destination j: units supplied from source i to destination j
The objective is to determine Xij that will minimize the total
transportation cost while satisfying all the supply and demand restriction.
-
8/2/2019 Or Presentation
76/123
Example 1:Example 1:
There are three plants A, B, C and twoThere are three plants A, B, C and two
destinations 1and 2, the distance between themdestinations 1and 2, the distance between them
is as followsis as follows
The mile costs 8 cents find the cost/unit roundThe mile costs 8 cents find the cost/unit round
to $to $
-
8/2/2019 Or Presentation
77/123
We define
XX1111 as the amount shipped from A to 1as the amount shipped from A to 1
XX1212 as the amount shipped from A to 2as the amount shipped from A to 2
XX2121 as the amount shipped from B to 1as the amount shipped from B to 1
XX2222 as the amount shipped from B to 2as the amount shipped from B to 2
XX3131 as the amount shipped from C to 1as the amount shipped from C to 1
XX3232 as the amount shipped from C to 2as the amount shipped from C to 2
The plants A, B, and C produces 1000, 1500,The plants A, B, and C produces 1000, 1500,and1200 cars respectively. The destination 1&2and1200 cars respectively. The destination 1&2
demands are 2300 and 1400 cars.demands are 2300 and 1400 cars...
-
8/2/2019 Or Presentation
78/123
The LP model isThe LP model is
Minimize Z=80 XMinimize Z=80 X1111
+215 X+215 X1212 +100 X+100 X2121 +108+108
XX2222 +102 X+102 X3131 +68 X+68 X3232S.TS.TXX
1111+ X+ X
1212 =1000 . (A)=1000 . (A)
XX2121 + X+ X2222 =1500 . (B)=1500 . (B)
XX3131 + X+ X3232 =1200 . (C)=1200 . (C)
XX1111
+ X+ X2121+ X+ X3131 =2300 .. (1)=2300 .. (1)
XX1212 + X+ X2222+ X+ X3232 =1400 .. (2)=1400 .. (2)
XXijij 00 i=1, 2, 3i=1, 2, 3 j=1, 2j=1, 2
-
8/2/2019 Or Presentation
79/123
These constraints are all equations because theThese constraints are all equations because the
total supply from t
he th
ree plants=
1
000 +total supply from t
he th
ree plants=
1
000 +1500 + 1200 = 3700 cars, equals the total1500 + 1200 = 3700 cars, equals the total
demands at the two destinations = 2300 + 1400demands at the two destinations = 2300 + 1400
= 3700 cars.= 3700 cars.
The LP model can be solved by the simplexThe LP model can be solved by the simplex
method. However, the special structure of themethod. However, the special structure of the
constraints allows us to solve the problemconstraints allows us to solve the problem
more conveniently using the transportationmore conveniently using the transportationtableau.tableau.
-
8/2/2019 Or Presentation
80/123
Wh
en th
e total su
pply does not equ
al th
e totalWh
en th
e total su
pply does not equ
al th
e totaldemand, the transportation model is said to bedemand, the transportation model is said to beunbalanced. We must add a dummy source orunbalanced. We must add a dummy source ordestination.destination.
E l 2E l 2
-
8/2/2019 Or Presentation
81/123
Example 2:Example 2: In example (1) suppose that plant B capacity isIn example (1) suppose that plant B capacity is
1300 cars (instead of1500). The total supply1300 cars (instead of1500). The total supply=3500cars and the total demand = 3700cars.So=3500cars and the total demand = 3700cars.So
the total supply < the total demand. Therefore, wethe total supply < the total demand. Therefore, we
have to add dummy source withcapacity 200have to add dummy source withcapacity 200
carscars..
E l 3E l 3
-
8/2/2019 Or Presentation
82/123
Example 3Example 3:: In example (1) suppose that the demand of theIn example (1) suppose that the demand of the
destination 1 is 1900 cars (instead of 2300). Thedestination 1 is 1900 cars (instead of 2300). Thetotal supply =3700cars and the total demand =total supply =3700cars and the total demand =
3300cars. So the total supply > the total demand.3300cars. So the total supply > the total demand.
Therefore, we have to add dummy destinationTherefore, we have to add dummy destination
with 400 cars.with 400 cars.
-
8/2/2019 Or Presentation
83/123
The Transportation AlgorithmThe Transportation Algorithm
Step (1):Step (1): Determine an Initial Basic FeasibleDetermine an Initial Basic FeasibleSolution (IBFS) by using one of the followingSolution (IBFS) by using one of the followingmethods.methods.
1.1. The NorthThe North--West Corner Method OR,West Corner Method OR,
2.2. The LeastThe Least--Cost Method OR,Cost Method OR,
3.3. Vogel Approximation Method.Vogel Approximation Method.
In general, the number of basic variables in a BFSIn general, the number of basic variables in a BFSis given by the number of independent constraints,is given by the number of independent constraints,
thus the number of variables that can take a positivethus the number of variables that can take a positivevalue is limited to (total number of sources (m) +value is limited to (total number of sources (m) +total number of destinations (n)total number of destinations (n)--1).1).
Step (2):Step (2): Improve the IBFSImprove the IBFS
1.1. Determine an entering variable.Determine an entering variable.
2.2. Determine a leaving variable.Determine a leaving variable.
3.3. Obtain a new BFSObtain a new BFS4.4. If the solution is optimal stop. Otherwise; repeat step (2).If the solution is optimal stop. Otherwise; repeat step (2).
-
8/2/2019 Or Presentation
84/123
Solve the following transportation problem.Solve the following transportation problem.
Example 3:Example 3:
S l tiS l ti
-
8/2/2019 Or Presentation
85/123
SolutionSolution
Step (1): finding the IBFSStep (1): finding the IBFS
a)a) NorthNorth--West Corner MethodWest Corner Method
Transportation Cost = 5(10) +10(2) +5(7) +15(9) +5(20) +10(18) =520
-
8/2/2019 Or Presentation
86/123
Steps ofNorthSteps ofNorth--West MethodWest Method
Allocate as much as possible to a selected cell XAllocate as much as possible to a selected cell X1111
Cross out the row orcolumn with zero supply of demand (ifCross out the row orcolumn with zero supply of demand (if
both are satisfied at the same time, only one should be crossedboth are satisfied at the same time, only one should be crossed
out).out).
If exactly one row orcolumn is left uncrossed out stop.If exactly one row orcolumn is left uncrossed out stop.
Otherwise go to step(1)Otherwise go to step(1)
-
8/2/2019 Or Presentation
87/123
b)b) The LeastThe Least--Cost Method:Cost Method: this method gives athis method gives a
better starting solution because it takes the costbetter starting solution because it takes the cost
into considerationinto consideration
Transportation Cost =15(2) +15(9) +0(7) +10(20) +5(4) +5(18) =475Transportation Cost =15(2) +15(9) +0(7) +10(20) +5(4) +5(18) =475
-
8/2/2019 Or Presentation
88/123
Steps of LeastSteps of Least--Cost MethodCost Method
Assign as much as possible to the variable with the smallestAssign as much as possible to the variable with the smallest
unit cost cell.unit cost cell.
Cross out the row orcolumn with zero supply of demand (ifCross out the row orcolumn with zero supply of demand (if
both are satisfied at the same time, only one should be crossedboth are satisfied at the same time, only one should be crossed
out).out).
If exactly one row orcolumn is left uncrossed out stop.If exactly one row orcolumn is left uncrossed out stop.
Otherwise go to step(1)Otherwise go to step(1)
-
8/2/2019 Or Presentation
89/123
c)c) The Vogel Approximation Method:The Vogel Approximation Method: thisthis
method provides a better starting solutionmethod provides a better starting solution
(optimal orclosed to the optimal solution)(optimal orclosed to the optimal solution)
Steps of Vogel ApproximationSteps of Vogel Approximation
-
8/2/2019 Or Presentation
90/123
Steps of Vogel ApproximationSteps of Vogel Approximation
MethodMethod In each row and column, subtract the lowest two costs fromIn each row and column, subtract the lowest two costs from
each other.each other.
Determine the row orcolumn with the largest difference.Determine the row orcolumn with the largest difference.
Allocate as much as possible to the variable with the least costAllocate as much as possible to the variable with the least costin the selected row orcolumn. Any row orcolumn with zeroin the selected row orcolumn. Any row orcolumn with zerosupply or would no be used in computing the following step.supply or would no be used in computing the following step.
If exactly one row orcolumn remains uncrossed out stop.If exactly one row orcolumn remains uncrossed out stop.Otherwise, go to step (1).Otherwise, go to step (1).
If only one row orcolumn with positive supply or demandIf only one row orcolumn with positive supply or demandremains uncrossed out determine the basic variable by theremains uncrossed out determine the basic variable by the
leastleast--cost method.cost method. If all uncrossed out rows and columns have assigned zeroIf all uncrossed out rows and columns have assigned zero
supply and demand, determine the zero basic variable by thesupply and demand, determine the zero basic variable by theleastleast--cost method.cost method.
-
8/2/2019 Or Presentation
91/123
-
8/2/2019 Or Presentation
92/123
-
8/2/2019 Or Presentation
93/123
-
8/2/2019 Or Presentation
94/123
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.
-
8/2/2019 Or Presentation
95/123
Improving the IBFSImproving the IBFS
Determine an entering variable using methodDetermine an entering variable using method
of multipliers (U, V method), In this methodof multipliers (U, V method), In this method
associate the multipliers with row I andassociate the multipliers with row I and
column j of the transportation tableau.column j of the transportation tableau.
yy For eachcurrent basic variableFor eachcurrent basic variable
UUii + V+ Vjj = C= Cijij for each basicXfor each basicXijijyy For nonFor non--basic variablebasic variable
C'C'ijij = U= Uii + V+ Vjj -- CCijij for each nonfor each non--basicXbasicXijij
Choose the nonChoose the non--basic variable with the largest positivebasic variable with the largest positive
-
8/2/2019 Or Presentation
96/123
Choose the nonChoose the non--basic variable with the largest positivebasic variable with the largest positive
coefficient (C'coefficient (C'ijij) to be the entering variable. The solution is) to be the entering variable. The solution is
optimal if and only if all C'optimal if and only if all C'ijij areare nonnon--positive.positive.
ConsiderConsiderthe same example:the same example:
-
8/2/2019 Or Presentation
97/123
The entering variable must have the maximum C'The entering variable must have the maximum C'ijijwhich is Xwhich is X3131 = 9= 9
To determine the leaving variable make a closedTo determine the leaving variable make a closedloop of basic variable starting with maximum C'loop of basic variable starting with maximum C'ijij ofofnonnon--basic variable keepingbasic variable keeping::
1.1. Supply and demand requirements remain satisfied.Supply and demand requirements remain satisfied.
2.2. No negative shipments are allowed through any of theNo negative shipments are allowed through any of theroutes.routes.
Therefore, =5 and XTherefore, =5 and X3131will be basic with value 5will be basic with value 5and Xand X2222 is a basic variable but with value 0 and Xis a basic variable but with value 0 and X1111will be nonwill be non--basic (leaving variable)basic (leaving variable)
The cost of the IBFS by Northwest corner methodThe cost of the IBFS by Northwest corner methodwas 520$was 520$
The first iteration cost is 475$ (less which is better)The first iteration cost is 475$ (less which is better)
In the second iterationIn the second iteration
-
8/2/2019 Or Presentation
98/123
In the second iterationIn the second iteration
Get the entering variable with maximum C'Get the entering variable with maximum C'ijij = C'= C'1414 = 4= 4
The Leaving variable is XThe Leaving variable is X2424 =10=10
XX1414 =10 and the new solution is:=10 and the new solution is:
All C'All C' i i f lli i f ll b i i bl hb i i bl h
-
8/2/2019 Or Presentation
99/123
All C'All C'ijij is negative for all nonis negative for all non--basic variables, so thebasic variables, so the
solution is optimal which is:solution is optimal which is:
XX1212 =5, X=5, X1414 =10, X=10, X2222 =10, X=10, X2323 =15, X=15, X3131 =5, X=5, X3434 =5=5
With optimum costWith optimum cost = 5*2 +10*11 + 10*7 + 15*9= 5*2 +10*11 + 10*7 + 15*9
+5*4 + 5*18+5*4 + 5*18
=1
0+11
0+70+1
35+20+90=
1
0+11
0+70+1
35+20+90= 435= 435
-
8/2/2019 Or Presentation
100/123
The Assignment ModelThe Assignment Model
ThereThere areare nn machinesmachines MM11,, MM22,, MM33,, MnMn.. AndAnd nn
differentdifferent jobsjobs JJ11,, JJ22,, ..,, JnJn..
TheThe jobsjobs areare toto bebe assignedassigned toto thesethese machinesmachines.. TheThe
machinemachine costcost forfor eacheachjobjob dependsdepends onon thethe machinemachine totowhichwhich itit isis assignedassigned.. EachEach machinemachine cancan workwork onlyonly onon
oneone jobjob.. TheThe problemproblem isis toto assignassign thethe jobsjobs toto thethe
machinesmachines toto minimizeminimize thethe totaltotal costcost ofof machiningmachining..
NumberNumber ofof possiblepossible assignmentassignment == n!n!
IfIf n=n=55,, thenthen 55!! == 120120 waysways
The Linear ProgrammingThe Linear Programming
-
8/2/2019 Or Presentation
101/123
The Linear ProgrammingThe Linear Programming
Formulation of the ProblemFormulation of the Problem Decision variablesDecision variables
XXijij job i is assigned to machine jjob i is assigned to machine j
Objective FunctionObjective Function
MinimizeMinimize
ConstraintsConstraints
i=1, 2 ni=1, 2 n
j=1, 2 nj=1, 2 n
XXijij =1=1 if the job i is assigned to the machine jif the job i is assigned to the machine j
XXijij =0=0 other wiseother wise
XCij
n
j
n
iijZ ! !
!
1 1
!
!
n
jijX
1
1
1
1
!
!
n
iij
X
The Assignment AlgorithmThe Assignment Algorithm
-
8/2/2019 Or Presentation
102/123
The Assignment AlgorithmThe Assignment Algorithm
(Hungarian Algorithm)(Hungarian Algorithm)
It is the most efficient way or solving theIt is the most efficient way or solving the
assignment problem. It is based on the ideaassignment problem. It is based on the idea
that if a constant is added or subtracted fromthat if a constant is added or subtracted from
any row orcolumn the optimal assignment isany row orcolumn the optimal assignment isnot affected.not affected.
The Algorithm StepsThe Algorithm Steps
-
8/2/2019 Or Presentation
103/123
The Algorithm StepsThe Algorithm Steps
1.1. Subtract the smallest value in eachcolumn from all the valuesSubtract the smallest value in eachcolumn from all the values
in that column.in that column.2.2. Subtract the smallest value in each row from all the values inSubtract the smallest value in each row from all the values in
that row.that row.
3.3. Note: step 1 & 2 will produce a cost matrix containing at leastNote: step 1 & 2 will produce a cost matrix containing at leastone zero element in each row orcolumn.one zero element in each row orcolumn.
4.4. Determine a feasible assignment using the cells with zero cost.Determine a feasible assignment using the cells with zero cost.I this is possible stop, as optimal solution is found. This step isI this is possible stop, as optimal solution is found. This step isdone as follows:done as follows:* Determine the number of lines required to cover all zeros.* Determine the number of lines required to cover all zeros.
* If the number of lines is equal to n, stop (This is the optimal* If the number of lines is equal to n, stop (This is the optimalassignment).assignment).
* If the number of lines is less than n then go to (4).* If the number of lines is less than n then go to (4).
5.5. Subtract the smallest value not covered with lines from allSubtract the smallest value not covered with lines from alluncovered values and add it to the value at the intersection ofuncovered values and add it to the value at the intersection ofthe lines then go to (3).the lines then go to (3).
6.6. Note: Obtain the minimum cost from the original table.Note: Obtain the minimum cost from the original table.
-
8/2/2019 Or Presentation
104/123
Example 1:Example 1:
Solve the following assignment problem.Solve the following assignment problem.
S l iS l i
-
8/2/2019 Or Presentation
105/123
SolutionSolution::
The optimal assignment is XThe optimal assignment is X1212, X, X2121, X, X3333
Job1 is assigned to machine2Job1 is assigned to machine2
Job2 is assigned to machine1Job2 is assigned to machine1
Job3 is assigned to machine3Job3 is assigned to machine3
The cost =10 + 9 + 8 = 27$The cost =10 + 9 + 8 = 27$
E l 2E l 2
-
8/2/2019 Or Presentation
106/123
Example 2:Example 2:
Solve the following assignment problemSolve the following assignment problem..
S l iS l i
-
8/2/2019 Or Presentation
107/123
SolutionSolution::
The optimal assignment is XThe optimal assignment is X1515, X, X2222, X, X3333, X, X44,44, XX5151
Job1 is assigned to machine5Job1 is assigned to machine5
Job2 is assigned to machine2Job2 is assigned to machine2
Job3 is assigned to machine3Job3 is assigned to machine3Job4 is assigned to machine4Job4 is assigned to machine4
Job5 is assigned to machine1Job5 is assigned to machine1
The cost = 3 + 4 + 2 + 5 + 3 =17$The cost = 3 + 4 + 2 + 5 + 3 =17$
N t k M d lN t k M d l
-
8/2/2019 Or Presentation
108/123
Network ModelsNetwork Models
There is a multitude of operations research situationsThere is a multitude of operations research situationsthat can be modeled and solved as networks (nodesthat can be modeled and solved as networks (nodesconnected with branches)connected with branches)
We have 5 network algorithms such as:We have 5 network algorithms such as:
1.1. Minimal spanning tree.Minimal spanning tree.
2.2. Shortest route algorithm.Shortest route algorithm.
3.3. MinimumMinimum--cost capacitated network algorithm.cost capacitated network algorithm.
4.4. Critical Path Method (CPM).Critical Path Method (CPM).5.5. Program Evaluation and Review TechniqueProgram Evaluation and Review Technique
(PERT).(PERT).
Project planning and control withProject planning and control with
-
8/2/2019 Or Presentation
109/123
Project planning and control withProject planning and control with
PERTPERT--CPMCPM
The successful management of largeThe successful management of large--scale projectsscale projects
requires careful planning, scheduling and control ofrequires careful planning, scheduling and control of
numerous interrelated activities especially when thesenumerous interrelated activities especially when these
activities
have to be performed in a spe
cifieda
ctivities
have to be performed in a spe
cifiedtechnological sequence, to aid in these tasks specialtechnological sequence, to aid in these tasks special
procedures based on the use of network techniquesprocedures based on the use of network techniques
were developed. The most important of thesewere developed. The most important of these
procedures are:pro
cedures are:
oo Critical Path Method (CPM).Critical Path Method (CPM).
oo Program Evaluation and Review Technique (PERT).Program Evaluation and Review Technique (PERT).
A li ti f PERT & CPMA li ti f PERT & CPM
-
8/2/2019 Or Presentation
110/123
Applications ofPERT & CPMApplications ofPERT & CPM
1.1. Construction projects ( buildings, highways,Construction projects ( buildings, highways,houses, bridges)houses, bridges)
2.2. Preparations of bids and proposals for largePreparations of bids and proposals for largeprojects.projects.
3.3. Maintenance planning of oil refineries, ship repairMaintenance planning of oil refineries, ship repairand other large operations.and other large operations.
4.4. Manufacture and assembly of large items as aeroManufacture and assembly of large items as aeroplans and computers.plans and computers.
5.5. Development of new weapons system.Development of new weapons system.
6.6. Simple projects such as cleaning and painting.Simple projects such as cleaning and painting.
Basic TerminologyBasic Terminology
-
8/2/2019 Or Presentation
111/123
Basic TerminologyBasic Terminology
A Project:A Project:
A project defines a combination of interrelatedA project defines a combination of interrelated
activities that must be done in a certain order beforeactivities that must be done in a certain order before
the entire taskcan be completed.the entire taskcan be completed.
An Activity:An Activity: It is an effort required to complete a plan of theIt is an effort required to complete a plan of the
project. Most activities can not start until someproject. Most activities can not start until some
others are completed.others are completed.
Real Activity:Real Activity:
Consumes resources and time.Consumes resources and time.
-
8/2/2019 Or Presentation
112/123
Waiting Activity:Waiting Activity:Consumes time.Consumes time.
Dummy Activity:Dummy Activity:
Consumes no time and no reso
urces.
It represents t
heCons
umes no time and no reso
urces.
It represents t
hedependence of one activity upon another.dependence of one activity upon another.
An Event:An Event:
Represents a point in time. It signifies the beginningRepresents a point in time. It signifies the beginning
or ending of some activities.or ending of some activities.
Network RepresentationNetwork Representation
-
8/2/2019 Or Presentation
113/123
Network RepresentationNetwork Representation
An activity is represented by a line or an arrow (usually withAn activity is represented by a line or an arrow (usually with
time estimate written along it). The arrow begins and endstime estimate written along it). The arrow begins and ends
with an event which is represented by a node.with an event which is represented by a node.
A dummy activity is represented by dashed line arrow or solidA dummy activity is represented by dashed line arrow or solid
arrow with zero time estimate.arrow with zero time estimate.
The arrow must be oriented from left to right.The arrow must be oriented from left to right.
The network must have one initial node and one ending node.The network must have one initial node and one ending node.
Any two events may not be connected by more than oneAny two events may not be connected by more than one
activity.activity.
Event numbers must not be duplicated in the network.Event numbers must not be duplicated in the network.
Each activity is represented by one and only one arrow. NoEach activity is represented by one and only one arrow. No
single activity can be represented twice in the network.single activity can be represented twice in the network.
Numbering a networkNumbering a network
-
8/2/2019 Or Presentation
114/123
Numbering a networkNumbering a network1.1. An initial event is one whichhas arrows coming outAn initial event is one whichhas arrows coming out
of it only. Number it (1).of it only. Number it (1).
2.2. Delete all arrows emerging from event (1). ThisDelete all arrows emerging from event (1). This
will create at least one more initial event, numberwill create at least one more initial event, number
these new events(s) as (2, 3).these new events(s) as (2, 3).
3.3. Delete all emerging arrows from these numberedDelete all emerging arrows from these numbered
events which will create new initial events andevents which will create new initial events and
continue until the last event whichhas no arrowscontinue until the last event whichhas no arrows
emerging from it.emerging from it.
Solution by Linear ProgrammingSolution by Linear Programming
-
8/2/2019 Or Presentation
115/123
y g gy g g
FormulationFormulation
Each node represents a variable.Each node represents a variable.
Each arc represents a constraint.Each arc represents a constraint.
Example 1:Example 1:
-
8/2/2019 Or Presentation
116/123
pp
Consider the following Network problem.Consider the following Network problem.
SolutionSolution
-
8/2/2019 Or Presentation
117/123
Objective FunctionObjective Function
Minimize Z= t5Minimize Z= t5 t1t1ConstraintsConstraints
tt22 tt11 3 3
tt33 tt11 1 1
tt33 tt22 0 0tt44 tt33 22
tt44 tt22 4 4
tt55 tt44 5 5
ttii 0 0 i=1, 2, 3, 4, 5i=1, 2, 3, 4, 5
This problem can be solved by simplex method ZThis problem can be solved by simplex method Z** is theis theminimum time required to complete the project.minimum time required to complete the project.
Solution by Network AnalysisSolution by Network Analysis
-
8/2/2019 Or Presentation
118/123
Solution by Network AnalysisSolution by Network Analysis
CPM Calculations:CPM Calculations:
Let DLet Dijij=Duration (completion time) of activity ij=Duration (completion time) of activity ij
ESESii=The earliest start time at which event (i)=The earliest start time at which event (i)occursoccurs
LFLFii=The latest finish time at which event (i)=The latest finish time at which event (i)
occurs without delaying the project beyond itsoccurs without delaying the project beyond its
earliest time.earliest time.
-
8/2/2019 Or Presentation
119/123
ESESii . Forward. Forward
ESESii = max [ES= max [ESii+ D+ Dijij] for all (i, j)] for all (i, j)
ESESii = max [(2+8), (1+6), (3+5)]= max [(2+8), (1+6), (3+5)]
= max [10, 7, 8] =10= max [10, 7, 8] =10
Start from the initial node and move to theStart from the initial node and move to the
terminal node for initial node ESterminal node for initial node ES11
= 0= 0
-
8/2/2019 Or Presentation
120/123
LFLFii . Backward. BackwardESESii = min [LF= min [LFjj -- DDijij] for all (i, j)] for all (i, j)
LFLFii = min [(10= min [(10--3), (93), (9--5), (135), (13--4)]4)]
= min [7, 4, 9] =10= min [7, 4, 9] =10
Start from the terminal node and move backwardStart from the terminal node and move backward
to the initial node for terminal node LFto the initial node for terminal node LFnn =ES=ESnn
Example 1:Example 1:
-
8/2/2019 Or Presentation
121/123
Example 1:Example 1:
Determine the critical path for the projectDetermine the critical path for the project
network given below (all the durations are innetwork given below (all the durations are in
days)days)
SolutionSolution
-
8/2/2019 Or Presentation
122/123
The critical path is defined by 1The critical path is defined by 1--22--44--55--66
The duration of the project = 25 daysThe duration of the project = 25 days
EndEnd
-
8/2/2019 Or Presentation
123/123
EndEnd
Hope the best for every one in his lifeHope the best for every one in his life
Good luckGood luck