Professional Documents
Culture Documents
Operations Research: Linear Programming Problems
Operations Research: Linear Programming Problems
Operations Research: Linear Programming Problems
LinearProgrammingProblems
ItisatypeofORproblemwhichisnothingbuttheprocessofdeterminingtheparticularplanofaction
from among several alternatives. The term linear indicates that the all relations in the problem are
linearinnature.
GeneralformatofLLP
.
Objectivefunction
Subjectto
Constraints
, ,
0 Nonveconstraints
Mathematicalformulation
AcompanymanufacturestwodifferenttypesofproductsP1&P2.Eachproductrequiresprocessingon
millingmachineanddrillingmachine.Buteachtypeofmachinehaslimitedhoursavailableperweek.
The net profit of the products, resource requirement and availability of resources are summarized as
givenbelow.DeveloptheLLPmodelforthegivenproblem.
P1
P2
m/chravailable/week
Millingm/c
2
5
200
Drillingm/c
4
2
240
Profit(Rs.)/unit 250 400
400
.
250
Subjectto
2
5
200
2
240
4
,
0
SolutionofLPP
Graphicalmethod(fortwovariablesonly)
Simplexmethod
Graphicalmethod
1.
.
6
8
Subjectto
10
60
5
4
40
4
,
0
10
0;
12;
60
6
0
Diagram
O(0,0)
A(10,0)
B(8,2)
C(0,6)
SubstituteO,A,B&Cinobj.function
Z(O)=0
Z(A)=60
Z(B)=64
Z(C)=48
Thereforesolution,Zmax=64
x1=8&x2=2
Simplexmethod
1. SolvethefollowingLPPusingsimplexmethod
.Z
2
Subjectto
2
18
2
12
2
13
,
0
Introducestackvariablex3,x4&x5
Aux.LPP
MaxZ=x1+2x2+0x3+0x4+0x5
Subto
2
8
2
12
2
3
, , , ,
0
II
4
0;
10;
40
10
0
I.B.F.S(InitialBasicFeasibleSolution)
, , )=(8,12,3)
Startingtable
1
2
0
CB
YB
XB Y1 Y2 Y3
0
y3
8
1 2* 1
0
y4
12 1
2
0
0
y5
3
1
2 0
ZjCj
0
1 2 0
Netevaluation
Enteringvectory2
Leavingvectory3
*Pivotelement
IIteration
1
2
0
0
Y4
0
1
0
0
0
Y5
0
0
1
0
Y4
Y5
CB
YB
XB
Y1
y3
y4
2*
y5
11
ZjCj
8
Netevaluation
Enteringvectory1
Leavingvectory4
PivotalCalculation
12
3
12
12
Y2
2 8
2
2 8
2
Y3
NoteifallthevaluesXB/Yiis0orveor,
then we cant proceed further. Then the
givenLPPishavingunboundedsolution.
11
2x
2 1
2
2 1
2
IIIteration,
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y2
Y1
Y5
11
ZjCjNet
12 0
0
0
1
0
evaluation
AlltheZjCjvaluesare0.Itisanoptimaltable.
x1=2
X2=5
Zmax=12
3
2.
5
Sub.To
2
2
10
5
8
12
3
,
0
Solution
Stackvariable:(x3+x4+x5)
Aux.LPP:MaxZ=5x1+3x2+0x3+0x4+0x5
Sub.to
2
2
10
5
8
12
3
4
, , , ,
0
I.B.F.S(InitialBasicFeasibleSolution)
, , )=(2,10,12)
Startingtable
1
2
0
0
CB
YB
XB
Y1
y3
y4
y5
Y3
Y4
Y5
1*
10
12
ZjCjNet
0
5
evaluation
IIteration
Enteringvectory1
Leavingvectory4
Y2
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y1
Y4
y5
ZjCjNet
10
evaluation
PivotalCalculation
2 5
10
1
2 3
12
1
3 1
8
1
5 1
2
1
5 1
0
1
5 0
1
1
x1=2
X2=0
Zmax=10
Conceptofduality
.
24x
30x
Sub.to
2
3
10
9
15
4
6
20
6
,
0
SolvethegivenLPP
Primal
3
5
Dual
Obj.function=
Min
Max
Dec.variable=
Constant=
10
15
20
Sub.to
2
4
9
3
6
6
,w w
24
30
0
Aux.LPP
.
10
15
20
Sub.to
2
4
6
24
9
6
30
3
,w w
0
IBFS
24,30
,
10 15 20
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
y3
24
6*
Y5
30
15
20
ZjCjNet
0
evaluation
10
y3entersthebasis
Y5leavesthebasis
IIteration
10
15
20
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
20
Y3
2/6
4/6
1/6
Y5
1*
20/6
10/6
20/6 0
ZjCjNet
80
evaluation
y1entersthebasis
Y5leavesthebasis
IIIteration,
10
15
20
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
20
Y3
3/6
2/6
10
Y1
100
15
10/3
ZjCj
Sub.to
3
2
2
, ,
4
5
3
4
0
4
,
5
3
,
4
0
(x4=slackvariable)
(x5=surplusvariable;x6=artificialvariable)
PhaseI
0
Sub. to
3
2
2
, , ,
4
,
5
3
,
4
0
IBFS
,
5,3,4
Starting table
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y6
Y3
Y4
Y6
2*
ZjCjNet
4
evaluation
Y2
entersthebasis
Y6
leavesthebasis
IIteration
0
0
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y6
Y3
11
5/2 0
3/2
3/2
Y4
Y2
ZjCj
1
0
0
0
0
0
0
evaluation
Tocheck
1. Tableisoptimal
2. Z=0
3. Atleastoneartificialvariabledisappearsfromthebasis(or)nequaltozero
PhaseII
9
Startingtable,
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y3
11
5/2
3/2
Y4
Y2
1/2
1/2
ZjCj
13 0
0
1
0
2
evaluation
Theobtainedtableisnotanoptimaltable.
All the ratios of XB/ Y5 is ve so we cannot proceed further. So the given LPP is said to have an
unboundedsolution.
TwoPhaseSimplexMethodAlgorithm
1. Introduceslackvariableforthelessthanorequaltoconstraintand1surplus&1artificialfor
each constraint. The coefficient of surplus variable in the object function is zero & the
constraintis1.Thecoefficientofartificialvariableintheobjectfunctionis1&theconstraint
is+1.
2. Gotophase1.Converttheobjectfunctionbygiving0coefficienttoallthevariablesexcept
theartificialvariables.
3. GettheIBFS&proceedfurtheruntilwegetanoptimaltable
4. Intheoptimaltable,checkwhetherthefollowingconditionsaresatisfied.
i)
Z=0
ii)
Atleastoneartificialvariabledisappearfromthebasisorequaltozero
Iftheaboveconditionsaresatisfied,proceedtophase2.
5. In the phase 2, go back to the original object function by omitting the artificial variables and
draw the starting table and iterate further until you get an optimal table and write down the
optimalsolution.
1.
2
10
Sub.To
6
4
6
3
3
2
, , ,
3
4
5
,
8
1
4
,
MaxZ=0x1+0x2+0x3+0x4+0x5+0x60x7
Sub.to
4
6
6
3
2
3
3
4
5
8
1
IBFS
,
8,1,4
Starting table
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y4
6*
Y5
Y7
ZjCj
4
evaluation
IIteration
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y2
4/3 2/3 1
1/6
Y5
Y7
13/2 1/2 0
13/2
ZjCj
0
evaluation
Tocheck
11
1. Tableisoptimal
2. Z=0
3. Atleastoneartificialvariabledisappearsfromthebasis.
PhaseII
CB
YB
XB
Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y2
4/3 2/3
1/6
Y5
7*
Y7
13/2
1/2
1/2
1/6
Y2
Y3
Y4
Y5
Y6
Y7
ZjCj
4/3 4/3
evaluation
2nditeration
2
CB
YB
XB
Y1
Y2
10/21 0
25/42 1/14
2/21
2/21
Y1
9/7
1/7
1/7
1/7
Y7
13/2
1/2
ZjCj
64/21 0
0
1/3
4/21
evaluation
Thereforex1=9/7;x2=10/21;x3=0;Max.Z=64/21
Transportationproblems
12
Transportationmatrix/table
Origins
Destinations
O1
O2
ON
Demand
D1D2 DM
C11
C12
Cn1
b1
C21
C22
Cn2
b2
C1m
C2m
Cnm
bm
Supply
availability
a1
a2
an
Requirement
Transportationproblem(TP)isthespecialcaseofLPP.Theobjectiveofwhichistotransportasingle
commodity from n origins to m destination in such a way that the total transportation cost is
minimum.
MethodsforfindingoutIBFS
1. Leastcostmethod
2. Northwestcornermethod
3. Vogelsapproximationmethod(VAM)(fornearoptimalsolution)
1. SolvethefollowingTP
To
Availability
b1
b2
b3
b4
u1
3
2
7
6 5000
From
u2
7
5
2
3 6000
u3
2
5
4
5 2500
Requirement 6000 4000 2000 1500
4000
2ndleastelement
3
7
6
5000 (1)
2
Leastelementie.(32=1)
7
5
2
3
6000 (2)
2
5
4
5
2500 (3)
13,500
6000 4000
2000 1500 13,500
(1)
(2)
(3)
(4)
b1
b3
b4
(3)
u1
1000
7
6
1000
3
13
u2
u3
7
2
2
4
3
5
6000 (1)
2500 (2)
9500
2000 1500 9500
(2)
(3)
6000
(1)
[ie50004000]
b1
b3
b4
7
2
3
6000 (1)
u2
u3
(2)
2500
4
5
2500
2
8500
5000
2000 1500 8500
(1)
(2)
(3)
[ie60001000]
b1
b3
b4
2000
1500
2500
6000
7
2
3
2500
u1
u2
u3
2000
1500
6000
6000
b1
1000
b2
b3
b4
4000
7
6
3
2
2000
2500
1500
5
7
2
3
2500
5
4
5
2
ZIBFS=(3x1000)+(2x4000)+7x2500)+(2x2000)+(3x1500)+(2x2500)
=42000
MODImethod
Degeneracy
m+n1=no.ofallocation
m=no.ofrows
14
3+41=6
6=6
Basiccells(cellhavingallocation)
ui+vj=cij
u1+v1=3
u1+v2=2
u2+v1=7
u2+v3=2
u2+v4=3
u3+v1=2
Let
v1=0
u1=3
v2=1
u2=7
v3=5
u3=2
v4=4
NonBasiccells(cellsnothavingallocation)
Netevaluation=ui+vjcij
357=9(ve)
346=7(ve)
715=1
215=4(ve)
254=7(ve)
245=7(ve)
b1
b2
b3
b4
u1
1000
4000
7
6
+3 2
u2
1500
2000
2500
+
5
2
3
7
u3
2500
5
4
5
2
(0)
(1)
(5)
(4)
Fromtable=2500&4000
Therefore=2500(iemin.ofvalues)
IIteration,
b1
b2
b3
b4
(ve)
(ve)
u1 2500
1500
7
6
3
2
n=no.ofcolumns
(3)
(7)
(2)
(3)
15
u2
u3
ve 2500 2000
7
5
2
(ve)
(ve)
2500
5
4
2
(6)
(5)
(2)
1500
(0)
3
(ve) (4)
5
(3)
ForBasiccells,
ui+vj=cij
u1+v1=3
u1+v2=2
u2+v2=5
u2+v3=2
u3+v4=3
u3+v1=2
Let
v1=6
u1=3
v2=5
u2=0
v3=2
u3=4
v4=3
ForNonbasiccells,
Netevaluation=ui+vjcij
Allthenonbasiccellsarehaving(ve)values.
Therefore,thecurrenttableisanoptimaltable.
Zopt=(3x3500)+(2x1500)+(5x2500)+(2x2000)+(3x1500)+(2x2500)
=39,500
Sequencingproblem
It is nothing but finding out the optimal order or sequence in which n jobs have to be
processedondefinitenumberoffacilities.Sothatthetotalelapsedtimeisminimum.
16
Twomachinesandnjobs
1. Findouttheoptimalsequence,totalelapsedandidletimeforeachmachine.(Timeinminutes)
Job J1 J2 J3 J4 J5 J6
m/c A
1
3 8 5 6 3
m/c B
5
6 3 2 2 10
Optimalsequence(Johnsonsalgorithm)
A
J1
J2
J3
J4
J5
J6
B
Totaltimeelapsed(TET)
Job m/cA
m/cB
In Out In out
6
1
1
0
J1
16
6
4
1
J2
16 22
7
4
J3
15 22 25
7
J4
15 20 25 27
J5
20 26 27 29
J6
Idletime m/cA=2926=3min.
m/cB=10=1min.
Totaltimeelapsed=29min.
Threemachines&njobs
1. Findtheoptimalsequence&idletimeforeachmachinesforthefollowingproblem.(Durationin
hours)
Jobs A B
C D E F G
M1
3 8
7 4 9 8 7
M2
4 3
2 5 1 4 3
M3
6 7
5 11 5 6 12
A B
C D E F G
G
7 11 9 9 10 12 10
(M1+M2)
H
10 10 7 16 6 10 15
(M2+M3+)
17
Optimalsequence
G A D G B F C E H
TET
Job
M1
M2
M3
In Out In out In out
13
7
7
3
3
0
A
12 13 24
7
7
3
D
14 14 17 24 36
7
G
14 22 22 25 36 43
B
22 30 30 34 43 49
F
30 37 37 39 49 54
C
37 46 46 47 54 59
E
Idletime
M1=5946=13hrs
M2=(3+2+5+5+3+7+12)=37hrs
M3=7hrs
TET=59hrs
nmachines&n;jobs
For n machines problem, conver n machines into 2 machines problem for find out the optimal
sequence.
MachineG=M1+M2++Mn1
MachineH=M2+M3++Mn
Networkscheduling
CPMCriticalPathMethod
PERTProgrammeEvaluation&ReviewTechnique
18
ActivityEventNET
Network
It is nothing but the graphical representation of all the operations involved in a project consisting of
activityandevent
Activity
Activityisnothingbutataskorjoborpieceofworktobeperformedwhichconsumestimeandother
resources.Itisrepresentedbyasymbol
Eventornode
Aneventisnothingbutaspecificdurationatwhichanactivitystartsorend.Itisrepresentedbyacircle
(O)
Dummyactivity
Itisnothingbutanimaginaryactivitywhichisusedforcompletingtheprojectnetwork.
Constructionofanetwork
1. Constructanetworkforthefollowingdata
A,B&Cfirstactivities
A&B
precede D
B
E,F&H
F&H
G
E&H
I&J
C,D,F&J
K
K
L
I,G&lTerminal
G
4
9
F
6
E
1
B
I
L
D2
3
8
A
J
5
D1 H
K
D
CriticalPathMethod(CPM)
2
7
CPMCalculation
19
1. Drawthenetworkandfindalsothetotallengthoftheprojectwhenthedurationoftheeachtask
areasfollows.
A<D,E
B,D<F
C<G
D,G<H
F,G<I
A=23
B=8
C=20
D=16
E=24
F=18
G=19
H=4
I=10(Durationindays)
20
G(19)
5
4
C(20)
D1(0)
D2(0) H(4)
B(8)
F(18)
I(10)
1
3
6
A(23)
E(24)
D(16)
Task Duration
Earliest
Latest
Start
Finish Start
Finish
23
0
23
23
0
12
8
0
39
8
31
13
20
0
38
20
18
14
39
23
39
16
23
23
47
23
67
24
43
27
39
39
57
0
57
35
57
39
57
18
39
36
20
57
19
38
45
39
39
57
0
57
56
39
39
67
4
63
57
43
57
67
10
57
67
67
Earlieststarttime(ESi)
ES1=0
ES2=0+23=23
8
8
ES3=Max
39
16
39
ES4=0+20=20
0
ES5=
39 39
39
19
18
57 , 39
57
ES6=
0
Float(or)slack
0
31
18
0
20
18
0
18
18
24
0
21
ES7=
24
4
0
47
43
67
67
Latestfinishtime(LFi)
LF7=67(ES7)
LF6=57ie(LF710)
4
LF
LF5=Min
63,57
57
0
LF
LF4=LF519=38
18
LF
LF3=Min
39,57
39
0
LF
24
LF
43 , 23
23
LF2=
16
LF
LF
23
LF
8
0,31,3
0
LF1=
LF
20
Note:
criticalactivitiesistheactivitywhicharehavingzeroslackorfloat
slack=latestfinishtimeearliestfinishtime
Criticalpathis
(12),(23),(36),(67),(12)
ie.,(12367)
Totallengthoftheprojectis67days
G
5
4
C
D1
H
D2
F(18)
B(8)
I(10)
1
3
6
7
A(23)
E
D(16)
22
PERT
1.
a)
b)
c)
d)
Asmallprojectiscomposedof7activitieswhosetimeestimatesarelistedinthetable.
Drawtheprojectnetwork
Findtheexpecteddurationandvarianceofeachactivity
Calculatetheexpectedlengthoftheproject
Calculatetheprobabilitythattheprojectwillbecompletedatleast4weeksbeforetheexpected
time.
Activity
12
13
14
25
Expectedduration
Optimistic
time(a)
1
1
2
1
Mostlikelytime
(m)
1
4
2
1
pessimistic
time(b)
7
7
8
1
23
35
46
56
Solution
Activity
2
2
3
14
8
15
5
5
6
Expectedduration
Optimistic
time(a)
Mostlikelytime
(m)
1
1
12
4
1
13
2
2
14
1
1
25
5
2
35
5
2
46
6
3
56
3
6
4
2
1
1
5
3
5
Thecriticalactivitiesare1356
solution
pessimistic
time(b)
7
7
8
1
14
8
15
Variance
t=
2
4
3
1
6
5
7
1
1
1
0
4
1
4
7
6
Totallengthoftheproject=17weeks(4+6+7=17)
Varianceoftheproject=1+4+4=9
24
13
1
17
4
3
1.33
Fromtheprobabilitytable,
ForZ=1.33
Probability,p=0.09=9%
Assignmentproblems
M/cs A
Jobs
1
2
3
4
5
10
7
13
12
8
12
16
14
10
13
15
14
7
11
15
12
14
9
13
11
8
11
9
10
15
Checkno.ofrows=no.ofcolumns,otherwiseadddummyroworcolumnwithzerocost
Hungarianalgorithm
25
2
0
6
2
0
4
9
7
0
5
7
7
0
1
7
4
7
2
3
3
0
4
2
0
7
Subtractleastcost(8)fromallthevaluesinthe1strow
2
0
6
2
0
4
9
7
0
5
7
7
0
1
7
4
7
2
3
3
0
4
2
0
7
Then,subtractleastcostineachcolumn
Here,no.oflinesn=4
No.ofrowsorcolumnsN=5
IfnN
Leastuncoveredelement=1
Add1tointersectingelements
Subtract1touncoveredelements
Nochangetocoveredelements
3
0
7
3
0
4
8
7
0
4
7
6
0
1
6
2
4
0
1
0
0
3
2
0
6
Here,n=N
M/cs A
Jobs
1
2
3
4
26
Encirclethesingzeroineachrowandcolumnfirst&crosstheotherzero
ie.,
job
machines cost
=8
=7
=7
=10
5
D
=11
optimalcost
Zmin= 43
Crashing
1. Asmallprojectconsistsofthefollowingactivities
Jobs
Normaltime Crashtime Crashcost
20
6
9
12
25
5
8
13
30
10
15
14
10
3
5
24
15
6
10
34
40
1
2
45
Findtheoptimallength&costoftheproject.IftheoverheadcostisRs.60/day
UsingCPM,
Thecriticalactivitiesare13,34,&45
Thenormalprojectlength=20days
27
Costslope(CS)=
60
9
25
6
35
3
60 15
10 6
60 40
2 1
45
4
20
1
11.66
11.25
20
Arrangethecostslopeinascendingorder.
Activitytobecrashed
34
34
34
34
13
13
13
45
Projectduration
20
19
18
17
16
15
14
13
12
Crashcost Overheadcost
20x60=1200
19x60=1140
1x15=15
18x60=1080
2x15=30
17x60=1020
3x1545
16x60=960
4x15=60
15x60=900
60+25=85
14x60=840
85+25=110
13x60=780
110+25=135
12x60=720
135+25=175
Totalcost
1200
1155
1110
1065
1020
985
950
915
895
Optimallengthoftheproject=12days
Optimalcostoftheproject=Rs.895/
28