c – 1 linear programming. c – 2 linear programming a mathematical technique to help plan and...
TRANSCRIPT
C – 1
Linear ProgrammingLinear Programming
C – 2
Linear ProgrammingLinear Programming
A mathematical technique to A mathematical technique to help plan and make decisions help plan and make decisions relative to the trade-offs relative to the trade-offs necessary to allocate resourcesnecessary to allocate resources
Will find the minimum or Will find the minimum or maximum value of the objectivemaximum value of the objective
Guarantees the optimal solution Guarantees the optimal solution to the model formulatedto the model formulated
C – 3
Requirements of an Requirements of an LP ProblemLP Problem
1.1. LP problems seek to maximize or LP problems seek to maximize or minimize some quantity (usually minimize some quantity (usually profit or cost) expressed as an profit or cost) expressed as an objective functionobjective function
2.2. The presence of restrictions, or The presence of restrictions, or constraints, limits the degree to constraints, limits the degree to which we can pursue our which we can pursue our objectiveobjective
C – 4
Requirements of an Requirements of an LP ProblemLP Problem
3.3. There must be alternative courses There must be alternative courses of action to choose fromof action to choose from
4.4. The objective and constraints in The objective and constraints in linear programming problems linear programming problems must be expressed in terms of must be expressed in terms of linear equations or inequalitieslinear equations or inequalities
C – 5
Formulating LP ProblemsFormulating LP Problems
The product-mix problem at Shader ElectronicsThe product-mix problem at Shader Electronics
Two productsTwo products
1.1. Shader Walkman, a portable CD/DVD Shader Walkman, a portable CD/DVD playerplayer
2.2. Shader Watch-TV, a wristwatch-size Shader Watch-TV, a wristwatch-size Internet-connected color TVInternet-connected color TV
Determine the mix of products that will Determine the mix of products that will produce the maximum profitproduce the maximum profit
C – 6
Formulating LP ProblemsFormulating LP Problems
WalkmanWalkman Watch-TVsWatch-TVs Available HoursAvailable HoursDepartmentDepartment ((XX11)) ((XX22)) This WeekThis Week
Hours Required Hours Required to Produce 1 Unitto Produce 1 Unit
ElectronicElectronic 44 33 240240
AssemblyAssembly 22 11 100100
Profit per unitProfit per unit $7$7 $5$5
Decision Variables:Decision Variables:XX11 = number of Walkmans to be produced= number of Walkmans to be produced
XX22 = number of Watch-TVs to be produced= number of Watch-TVs to be produced
C – 7
Formulating LP ProblemsFormulating LP Problems
Objective Function:Objective Function:
Maximize Profit = Maximize Profit = $7$7XX11 + + $5$5XX22
There are three types of constraints Upper limits where the amount used is ≤
the amount of a resource Lower limits where the amount used is ≥
the amount of the resource Equalities where the amount used is =
the amount of the resource
C – 8
Formulating LP ProblemsFormulating LP Problems
Second Constraint:Second Constraint:
22XX11 + + 11XX22 ≤ 100 ≤ 100 (hours of assembly time)(hours of assembly time)
AssemblyAssemblytime availabletime available
AssemblyAssemblytime usedtime used is ≤is ≤
First Constraint:First Constraint:
44XX11 + + 33XX22 ≤ 240 ≤ 240 (hours of electronic time)(hours of electronic time)
ElectronicElectronictime availabletime available
ElectronicElectronictime usedtime used is ≤is ≤
C – 9
Graphical SolutionGraphical Solution
Can be used when there are two Can be used when there are two decision variablesdecision variables
1.1. Plot the constraint equations at their Plot the constraint equations at their limits by converting each equation to limits by converting each equation to an equalityan equality
2.2. Identify the feasible solution space Identify the feasible solution space
3.3. Create an iso-profit line based on the Create an iso-profit line based on the objective functionobjective function
4.4. Move this line outwards until the Move this line outwards until the optimal point is identifiedoptimal point is identified
C – 10
Graphical SolutionGraphical Solution
100 –
–
80 80 –
–
60 60 –
–
40 40 –
–
20 20 –
–
–| | | | | | | | | | |
00 2020 4040 6060 8080 100100
Nu
mb
er o
f W
atch
-TV
sN
um
ber
of
Wat
ch-T
Vs
Number of WalkmansNumber of Walkmans
XX11
XX22
Assembly (constraint B)Assembly (constraint B)
Electronics (constraint A)Electronics (constraint A)Feasible region
C – 11
Graphical SolutionGraphical Solution
100 –
–
80 80 –
–
60 60 –
–
40 40 –
–
20 20 –
–
–| | | | | | | | | | |
00 2020 4040 6060 8080 100100
Nu
mb
er o
f W
atch
-TV
sN
um
ber
of
Wat
ch-T
Vs
Number of WalkmansNumber of Walkmans
XX11
XX22
(0, 42)
(30, 0)(30, 0)
$210 = $7$210 = $7XX11 + $5 + $5XX22
C – 12
Graphical SolutionGraphical Solution
100 –
–
80 80 –
–
60 60 –
–
40 40 –
–
20 20 –
–
–| | | | | | | | | | |
00 2020 4040 6060 8080 100100
Nu
mb
er o
f W
atch
-TV
sN
um
ber
of
Wat
ch-T
Vs
Number of WalkmansNumber of Walkmans
XX11
XX22
$210 = $7$210 = $7XX11 + $5 + $5XX22
$350 = $7$350 = $7XX11 + $5 + $5XX22
$420 = $7$420 = $7XX11 + $5 + $5XX22
$280 = $7$280 = $7XX11 + $5 + $5XX22
C – 13
Graphical SolutionGraphical Solution
100 –
–
80 80 –
–
60 60 –
–
40 40 –
–
20 20 –
–
–| | | | | | | | | | |
00 2020 4040 6060 8080 100100
Nu
mb
er o
f W
atch
-TV
sN
um
ber
of
Wat
ch-T
Vs
Number of WalkmansNumber of Walkmans
XX11
XX22
$410 = $7$410 = $7XX11 + $5 + $5XX22
Maximum profit lineMaximum profit line
Optimal solution pointOptimal solution point((XX11 = 30, = 30, XX22 = 40) = 40)
C – 14
Corner-Point MethodCorner-Point Method
1
2
3
100 –
–
80 80 –
–
60 60 –
–
40 40 –
–
20 20 –
–
–| | | | | | | | | | |
00 2020 4040 6060 8080 100100
Nu
mb
er o
f W
atch
-TV
sN
um
ber
of
Wat
ch-T
Vs
Number of WalkmansNumber of Walkmans
XX11
XX22
4
C – 15
Solving Minimization Solving Minimization ProblemsProblems
Formulated and solved in much the Formulated and solved in much the same way as maximization same way as maximization problemsproblems
In the graphical approach an iso-In the graphical approach an iso-cost line is usedcost line is used
The objective is to move the iso-The objective is to move the iso-cost line inwards until it reaches the cost line inwards until it reaches the lowest cost corner pointlowest cost corner point
C – 16
Minimization ExampleMinimization Example
XX11 = = number of tons of black-and-white chemical number of tons of black-and-white chemical producedproduced
XX22 = = number of tons of color picture chemical number of tons of color picture chemical producedproduced
Minimize total cost Minimize total cost == 2,5002,500XX11 ++ 3,0003,000XX22
Subject to:Subject to:XX11 ≥ 30≥ 30 tons of black-and-white chemicaltons of black-and-white chemical
XX22 ≥ 20≥ 20 tons of color chemicaltons of color chemical
XX11 + X + X22 ≥ 60≥ 60 tons totaltons total
XX11,, X X22 ≥ $0≥ $0 nonnegativity requirementsnonnegativity requirements
C – 17
Minimization ExampleMinimization Example
Table B.9Table B.9
60 60 –
50 –
40 40 –
30 –
20 20 –
10 –
–| | | | | | |
00 1010 2020 3030 4040 5050 6060XX11
XX22
Feasible region
XX11 = 30= 30XX22 = 20= 20
XX11 + X + X22 = 60= 60
bb
aa
C – 18
Minimization ExampleMinimization Example
Total cost at aTotal cost at a == 2,5002,500XX11 ++ 3,0003,000XX22
== 2,500 (40)2,500 (40) ++ 3,000(20)3,000(20)== $160,000$160,000
Total cost at bTotal cost at b == 2,5002,500XX11 ++ 3,0003,000XX22
== 2,500 (30)2,500 (30) ++ 3,000(30)3,000(30)== $165,000$165,000
Lowest total cost is at point aLowest total cost is at point a
C – 19
LP ApplicationsLP Applications
Production-Mix ExampleProduction-Mix ExampleDepartmentDepartment
ProductProduct WiringWiring DrillingDrilling AssemblyAssembly InspectionInspection Unit ProfitUnit Profit
XJ201XJ201 .5.5 33 22 .5.5 $ 9$ 9XM897XM897 1.51.5 11 44 1.01.0 $12$12TR29TR29 1.51.5 22 11 .5.5 $15$15BR788BR788 1.01.0 33 22 .5.5 $11$11
CapacityCapacity MinimumMinimumDepartmentDepartment (in hours)(in hours) ProductProduct Production LevelProduction Level
WiringWiring 1,5001,500 XJ201XJ201 150150DrillingDrilling 2,3502,350 XM897XM897 100100AssemblyAssembly 2,6002,600 TR29TR29 300300InspectionInspection 1,2001,200 BR788BR788 400400
C – 20
LP ApplicationsLP Applications
XX11 = number of units of XJ201 produced = number of units of XJ201 produced
XX22 = number of units of XM897 produced = number of units of XM897 produced
XX33 = number of units of TR29 produced = number of units of TR29 produced
XX44 = number of units of BR788 produced = number of units of BR788 produced
Maximize profit Maximize profit = 9= 9XX11 + 12 + 12XX22 + 15 + 15XX33 + 11 + 11XX44
subject tosubject to .5.5XX11 + + 1.51.5XX22 + + 1.51.5XX33 + + 11XX44 ≤ 1,500≤ 1,500 hours of wiring hours of wiring
33XX11 + + 11XX22 + + 22XX33 + + 33XX44 ≤ 2,350≤ 2,350 hours of drilling hours of drilling
22XX11 + + 44XX22 + + 11XX33 + + 22XX44 ≤ 2,600≤ 2,600 hours of assembly hours of assembly
.5.5XX11 + + 11XX22 + + .5.5XX33 + + .5.5XX44 ≤ 1,200≤ 1,200 hours of inspection hours of inspection
XX11 ≥ 150≥ 150 units of XJ201 units of XJ201
XX22 ≥ 100≥ 100 units of XM897 units of XM897
XX33 ≥ 300≥ 300 units of TR29 units of TR29
XX44 ≥ 400≥ 400 units of BR788 units of BR788
C – 21
The Simplex MethodThe Simplex Method
Real world problems are too Real world problems are too complex to be solved using the complex to be solved using the graphical methodgraphical method
The simplex method is an algorithm The simplex method is an algorithm for solving more complex problemsfor solving more complex problems
Developed by George Dantzig in the Developed by George Dantzig in the late 1940slate 1940s
Most computer-based LP packages Most computer-based LP packages use the simplex methoduse the simplex method
C – 22
NLP in Facility LocationNLP in Facility Location
• Consider an existing network with Consider an existing network with m m facilitiesfacilities
• It is desired to add It is desired to add nn new facilities to the new facilities to the networknetwork
• Let’sLet’s– (a(aii, b, bii)) denote the coordinates of existing denote the coordinates of existing
facility facility iithth
– (X(Xii, Y, Yii)) denote the coordinates of the to-be- denote the coordinates of the to-be-found new facility found new facility iithth thatthat minimize the total minimize the total distribution costdistribution cost
C – 23
NLP in Facility Location (cont.)NLP in Facility Location (cont.)
• Let’sLet’s
– ggijij denote the load or flow of activity from a denote the load or flow of activity from a newnew facility facility iith th to anto an existingexisting facilityfacility j jthth
– ffijij denote the load or flow of activity between denote the load or flow of activity between newnew facilities facilities iith th andand j jthth
– ccijij denote the cost per unit travel between denote the cost per unit travel between newnew facilitiesfacilities
– ddij ij denote the cost per unit travel between new denote the cost per unit travel between new facilities facilities iith th to anto an existingexisting facilityfacility j jthth
C – 24
NLP in Facility Location (cont.)NLP in Facility Location (cont.)
• NLP ModelNLP Model
||||
||||
1 1
n
1i 1
jiji
n
i
m
jijij
n
jjijiijij
bYaXgd
YYXXfcMinimize
C – 25
ExampleExample of NLP Applicationof NLP Application
• บริ�ษั�ทหนึ่งมี ศู�นึ่ย์�บริ�การิ บริ�ษั�ทหนึ่งมี ศู�นึ่ย์�บริ�การิ 4 4 แห�ง และ แห�ง และ Warehouse 1 Warehouse 1 แห�ง ตั้��งอย์��ท จุ�ด แห�ง ตั้��งอย์��ท จุ�ด Coordinate (X, Y) Coordinate (X, Y) คื อ คื อ (8,20),(8,20),(8,10),(10,20),(16,30) (8,10),(10,20),(16,30) และ และ (35,20) (35,20) ตั้ามีล!าด�บ ตั้ามีล!าด�บ บริ�ษั�ทตั้"องการิสริ"าง บริ�ษั�ทตั้"องการิสริ"าง Warehouse Warehouse อ ก อ ก 2 2 แห�ง ซึ่งตั้"องแห�ง ซึ่งตั้"องตั้��งห�างก�นึ่ตั้ามีแนึ่วแกนึ่ ตั้��งห�างก�นึ่ตั้ามีแนึ่วแกนึ่ Y Y และ และ X X ไมี�นึ่"อย์กว�า ไมี�นึ่"อย์กว�า 55 หนึ่�วย์ หนึ่�วย์ ปริ�มีาณงานึ่ริะหว�างนึ่�บเป*นึ่ ปริ�มีาณงานึ่ริะหว�างนึ่�บเป*นึ่ Trip Trip ริะหว�าง ริะหว�าง Facilities Facilities มี ด�งตั้าริาง และตั้"นึ่ท�นึ่การิขนึ่ส�งริะหว�าง มี ด�งตั้าริาง และตั้"นึ่ท�นึ่การิขนึ่ส�งริะหว�าง Warehouse Warehouse ท สริ"างใหมี�เท�าก�บ ท สริ"างใหมี�เท�าก�บ 5 5 ตั้�อริะย์ะทาง ตั้�อริะย์ะทาง 1 1 หนึ่�วย์ และ ริะหว�าง หนึ่�วย์ และ ริะหว�าง Warehouse Warehouse ท สริ"างใหมี�ก�บ ท สริ"างใหมี�ก�บ Facilities Facilities เด�มีเท�าก�บเด�มีเท�าก�บ10 10 ตั้�อริะย์ะทาง ตั้�อริะย์ะทาง 1 1 หนึ่�วย์ จุงก!าหนึ่ดตั้!าแหนึ่�งท ตั้��งของ หนึ่�วย์ จุงก!าหนึ่ดตั้!าแหนึ่�งท ตั้��งของ Warehouse Warehouse ใหมี�ท��ง ใหมี�ท��ง 2 2 แห�ง แห�ง
C – 26
ExampleExample of NLP Applicationof NLP Application
Load E1 E2 E3 E4 E5
WH1 7 7 5 4 2
WH2 3 2 4 5 2
WH1 WH2
WH1 2
WH2 1
C – 27
Transportation ModelsTransportation Models
C – 28
Transportation ModelingTransportation Modeling
An interactive procedure that An interactive procedure that finds the least costly means of finds the least costly means of moving products from a series moving products from a series of sources to a series of of sources to a series of destinationsdestinations
Can be used to help resolve Can be used to help resolve distribution and location distribution and location decisionsdecisions
C – 29
Transportation ModelingTransportation Modeling
A special class of linear A special class of linear programmingprogramming
Need to knowNeed to know
1.1. The origin points and the capacity The origin points and the capacity or supply per period at eachor supply per period at each
2.2. The destination points and the The destination points and the demand per period at eachdemand per period at each
3.3. The cost of shipping one unit from The cost of shipping one unit from each origin to each destinationeach origin to each destination
C – 30
Transportation ProblemTransportation Problem
ToTo
FromFrom AlbuquerqueAlbuquerque BostonBoston ClevelandCleveland
Des MoinesDes Moines $5$5 $4$4 $3$3
EvansvilleEvansville $8$8 $4$4 $3$3
Fort LauderdaleFort Lauderdale $9$9 $7$7 $5$5
C – 31
Transportation ProblemTransportation Problem
Albuquerque(300 unitsrequired)
Des Moines(100 unitscapacity)
Evansville(300 unitscapacity)
Fort Lauderdale(300 unitscapacity)
Cleveland(200 unitsrequired)
Boston(200 unitsrequired)
C – 32
Transportation MatrixTransportation Matrix
From
ToAlbuquerque Boston Cleveland
Des Moines
Evansville
Fort Lauderdale
Factory capacity
Warehouse requirement
300
300
300 200 200
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
Cost of shipping 1 unit from FortCost of shipping 1 unit from FortLauderdale factory to Boston warehouseLauderdale factory to Boston warehouse
Des MoinesDes Moinescapacitycapacityconstraintconstraint
Cell Cell representing representing a possible a possible source-to-source-to-destination destination shipping shipping assignment assignment (Evansville (Evansville to Cleveland)to Cleveland)
Total demandTotal demandand total supplyand total supply
ClevelandClevelandwarehouse demandwarehouse demand
Figure C.2Figure C.2
C – 33
Northwest-Corner RuleNorthwest-Corner Rule
Start in the upper left-hand cell (or Start in the upper left-hand cell (or northwest corner) of the table and allocate northwest corner) of the table and allocate units to shipping routes as follows:units to shipping routes as follows:
1.1. Exhaust the supply (factory capacity) of each Exhaust the supply (factory capacity) of each row before moving down to the next rowrow before moving down to the next row
2.2. Exhaust the (warehouse) requirements of Exhaust the (warehouse) requirements of each column before moving to the next each column before moving to the next columncolumn
3.3. Check to ensure that all supplies and Check to ensure that all supplies and demands are metdemands are met
C – 34
Northwest-Corner RuleNorthwest-Corner Rule
1.1. Assign Assign 100100 tubs from Des Moines to Albuquerque tubs from Des Moines to Albuquerque (exhausting Des Moines’s supply)(exhausting Des Moines’s supply)
2.2. Assign Assign 200200 tubs from Evansville to Albuquerque tubs from Evansville to Albuquerque (exhausting Albuquerque’s demand) (exhausting Albuquerque’s demand)
3.3. Assign Assign 100100 tubs from Evansville to Boston tubs from Evansville to Boston (exhausting Evansville’s supply) (exhausting Evansville’s supply)
4.4. Assign Assign 100100 tubs from Fort Lauderdale to Boston tubs from Fort Lauderdale to Boston (exhausting Boston’s demand) (exhausting Boston’s demand)
5.5. Assign Assign 200200 tubs from Fort Lauderdale to tubs from Fort Lauderdale to Cleveland (exhausting Cleveland’s demand and Cleveland (exhausting Cleveland’s demand and Fort Lauderdale’s supply)Fort Lauderdale’s supply)
C – 35
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
Northwest-Corner RuleNorthwest-Corner Rule
100
100
100
200
200
Means that the firm is shipping Means that the firm is shipping 100100 bathtubs from Fort Lauderdale to Bostonbathtubs from Fort Lauderdale to Boston
C – 36
Northwest-Corner RuleNorthwest-Corner Rule
Computed Shipping CostComputed Shipping Cost
RouteRouteFromFrom ToTo Tubs ShippedTubs Shipped Cost per UnitCost per Unit Total CostTotal Cost
DD AA 100100 $5$5 $ 500$ 500EE AA 200200 88 1,6001,600EE BB 100100 44 400400FF BB 100100 77 700700FF CC 200200 55 $1,000$1,000
Total: $4,200Total: $4,200
This is a feasible solution but not necessarily the lowest cost alternative
C – 37
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
1.1. Identify the cell with the lowest costIdentify the cell with the lowest cost
2.2. Allocate as many units as possible to Allocate as many units as possible to that cell without exceeding supply or that cell without exceeding supply or demand; then cross out the row or demand; then cross out the row or column (or both) that is exhausted by column (or both) that is exhausted by this assignmentthis assignment
3.3. Find the cell with the lowest cost from Find the cell with the lowest cost from the remaining cellsthe remaining cells
4.4. Repeat steps 2 and 3 until all units Repeat steps 2 and 3 until all units have been allocatedhave been allocated
C – 38
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
First, First, $3$3 is the lowest cost cell so ship is the lowest cost cell so ship 100100 units from units from Des Moines to Cleveland and cross off the first row as Des Moines to Cleveland and cross off the first row as Des Moines is satisfiedDes Moines is satisfied
C – 39
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
100
Second, Second, $3$3 is again the lowest cost cell so ship is again the lowest cost cell so ship 100100 units units from Evansville to Cleveland and cross off column C as from Evansville to Cleveland and cross off column C as Cleveland is satisfiedCleveland is satisfied
C – 40
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
100
200
Third, Third, $4$4 is the lowest cost cell so ship is the lowest cost cell so ship 200200 units from units from Evansville to Boston and cross off column B and row E Evansville to Boston and cross off column B and row E as Evansville and Boston are satisfiedas Evansville and Boston are satisfied
C – 41
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
100
200
300
Finally, ship 3Finally, ship 30000 units from Albuquerque to Fort units from Albuquerque to Fort Lauderdale as this is the only remaining cell to complete Lauderdale as this is the only remaining cell to complete the allocationsthe allocations
C – 42
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
100
200
300
Total CostTotal Cost = $3(100) + $3(100) + $4(200) + $9(300)= $3(100) + $3(100) + $4(200) + $9(300)= $4,100= $4,100
C – 43
Intuitive Lowest-Cost MethodIntuitive Lowest-Cost Method
To (A)Albuquerque
(B)Boston
(C)Cleveland
(D) Des Moines
(E) Evansville
(F) Fort Lauderdale
Warehouse requirement 300 200 200
Factory capacity
300
300
100
700
$5
$5
$4
$4
$3
$3
$9
$8
$7
From
100
100
200
300
Total CostTotal Cost = $3(100) + $3(100) + $4(200) + $9(300)= $3(100) + $3(100) + $4(200) + $9(300)= $4,100= $4,100
This is a feasible solution, and an improvement over the previous solution, but not necessarily the lowest
cost alternative