New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling...
-
Upload
phoebe-nicholson -
Category
Documents
-
view
215 -
download
2
Transcript of New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling...
![Page 1: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/1.jpg)
New Stage
Course Phases Description of Systems and Issues Prescriptive tools and modeling International Aspects
![Page 2: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/2.jpg)
Prescriptive Tools & ModelsNetwork Flows
Principally Transportation Limited direct applications Good start on modeling Integer answers for free
Added realism Weight and cube -- conveyance capacity Frequency and Schedule Driven systems Inventory and Load Driven systems Trailer fill and customer service Location models Routing
![Page 3: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/3.jpg)
No Text
There is no text for this portion of the course
Be sure to ask questions in classWork on your case! The issues in the case
parallel those covered in classKeep up. Attend help sessions with Manu.The Case is excellent preparation for the
exam.
![Page 4: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/4.jpg)
Transportation/Network Models
Single Commodity Route Selection (Shortest Path) Basic Network Design (Spanning Tree) Basic Transportation (Transportation
Model) Cross Docking (Transshipment Models)
Multiple Commodities
![Page 5: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/5.jpg)
Route Selection
Getting From A to BUnderlying Network
Roads Airports Telecommunication links
Costs of using each linkFind the cheapest (shortest) path
![Page 6: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/6.jpg)
Example
9084 84
126
15048
348
66138
90120
132
126
60
13248
156
A
E
D
C
B
J
H
G
F
I
Directed Edges
![Page 7: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/7.jpg)
Shortest Path Model
An introduction to AMPL and review of modeling
Sets Define entities and index data The Nodes of the Graph
set NODES;
The Edges of the Graphset EDGES within NODES cross NODES;
![Page 8: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/8.jpg)
Shortest Path Model
Parameters Hold data The Cost on each Edge
param Cost{EDGES};
The Origin and Destinationparam Origin symbolic;param Destination symbolic;
![Page 9: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/9.jpg)
Shortest Path Model
The Variables The decisions the model should make Which edges to use
var UseEdge{EDGES} >= 0;/* The number of times we use each edge */
![Page 10: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/10.jpg)
Shortest Path Model
The Objective How we distinguish which solution is
better minimize PathCost:
sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t];
![Page 11: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/11.jpg)
Shortest Path ModelConstraints
Eliminate what is not feasible Flow Conservation at each node s.t. ConserveFlow{node in NODES}:
sum{(f, node) in EDGES} UseEdge[f,node] - sum{(node, t) in EDGES} UseEdge[node, t]= (if node = Origin then -1 else if node = Destination then 1 else 0);
![Page 12: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/12.jpg)
Rules of the Game
To be a linear program variables can only be of the form
var UseEdge{EDGES} >= lower bound, <= upper bound;
Other possibilities (for later) var UseEdge{EDGES} binary (meaning 0
or 1) var UseEdge{EDGES} integer >= 0; Called Integer Programming
![Page 13: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/13.jpg)
More Rules of the Game
The Objective must be of the form: minimize ObjectiveName: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t]; maximize ObjectiveName: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t]; What’s relevant:
minimize or maximizesum of known constant * variable
What’s not allowedvariable*variable , |variable - constant|, variable2...
![Page 14: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/14.jpg)
More Rules of the Game
The Constraints must be of the form: s.t ConstraintName: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] <= Constant s.t. ConstraintName: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] >= Constant s.t. ConstraintName: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] = Constant
![Page 15: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/15.jpg)
More Rules of the GameWhat’s relevant:
Left-hand-side:sum of known constant * variable
Right-hand-sideknown constant
Sense of constraint>=, <=, =
What’s not allowedvariable*variable , |variable - constant|, variable2...
![Page 16: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/16.jpg)
Network Flow Problems
Special Case of Linear ProgramsIf the data are integral, the solutions
will be integralNot generally true of Linear
Programs, just of Network Flow Problems
![Page 17: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/17.jpg)
To Be a Network Flow Problem
Constraints must be of the form sum{(f, node) in EDGES} UseEdge[f,node] - sum{(node, t) in EDGES} UseEdge[node, t]= or <= or >= constant
And Each variable can appear in at most two constraints, once as a flow in, e.g., as part of the sumsum{(f, node) in EDGES} UseEdge[f,node]
once as a flow out, e.g., as part of the sum- sum{(node, t) in EDGES} UseEdge[node, t]
![Page 18: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/18.jpg)
The DataThe NodesA named region called Nodes in the
spreadsheet d:\personal\3101\ShortPathData.xls
table NodesTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "SQL=SELECT Nodes FROM Nodes": NODES <- [Nodes];
read table NodesTable;
NodesABCDEFGHIJ
![Page 19: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/19.jpg)
More Data
The Edges and CostsNamed region called Costs table CostsTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "Costs": EDGES <- [FromNode, ToNode], Cost;
read table CostsTable;
FromNode ToNode CostA B 90A C 138A D 348B C 66B E 84C D 156C F 90D G 48E F 120E I 84F G 132F H 60G H 48G J 150H I 132H J 126I J 126
![Page 20: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/20.jpg)
More Data
The Origin and DestinationA Named Region called OriginDest
table OriginDestTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "SQL=SELECT Origin, Destination FROM OriginDest":
[], Origin, Destination;
read table OriginDestTable;
Origin DestinationA J
![Page 21: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/21.jpg)
Getting Answers Out
table ExportSol OUT "ODBC" "DSN=ShortPathSol" "Solution": {(f,t) in EDGES: UseEdge[f,t] > 0} -> [f~FromNode,t~ToNode],
UseEdge[f,t]~UseEdge, UseEdge[f,t]*Cost[f,t]~TotalCost;
write table ExportSol;
![Page 22: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/22.jpg)
Running the Model
From a DOS prompt in ..\ilogLaunch AMPL by typing amplAt the AMPL: prompt type model d:\….\shortpath.mod;include d:\…\shortpath.run;
![Page 23: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/23.jpg)
What’s in the .RUN file/* ------------------------------------------------------------------- Read the data -------------------------------------------------------------------*/ read table NodesTable; read table CostsTable; read table OriginDestTable;
/* ------------------------------------------------------------------- Solve the problem You may need a command like option solver cplex; -------------------------------------------------------------------*/ solve;
![Page 24: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/24.jpg)
The rest of the .RUN File
/* ------------------------------------------------------------------- Write the solution out: May encounter write access error -------------------------------------------------------------------*/ table UseEdgeOutTable OUT "ODBC" "d:\personal\3101\ShortPathData.xls": {(f,t) in EDGES} -> [FromNode, ToNode], UseEdge[f, t]~UseEdge,
UseEdge[f,t]*Cost[f,t]~TotalCost;
write table UseEdgeOutTable;
![Page 25: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/25.jpg)
Applicability
Single OriginSingle DestinationNo requirement to visit intermediate nodesNo “negative cycles”Answer will always be either
a simple path infeasible unbounded
![Page 26: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/26.jpg)
Tree of Shortest Paths
Find shortest paths from Origin to each node
Send n-1 units from origin Get 1 unit to each destination
![Page 27: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/27.jpg)
Shortest Path Problem
Just change the Conservation Constraints...
s.t. ConserveFlow{thenode in NODES}: sum{(f, thenode) in EDGES} UseEdge[f, thenode] - sum{(thenode, t) in EDGES} UseEdge[thenode, t] = (if thenode = Origin then -(card(NODES)-1) else 1);
![Page 28: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/28.jpg)
Use Some Care
The Answer is how many paths the edge is in. Not whether or not it is in a path.
![Page 29: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/29.jpg)
Minimum Spanning Tree
Find the cheapest total cost of edges required to tie all the nodes together
9084 84
126
15048
348
66138
90120
132
126
60
13248
156
A
E
D
C
B
J
H
G
F
I
![Page 30: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/30.jpg)
Greedy Algorithm
Consider links from cheapest to most expensive
Add a link if it does not create a cycle with already chosen links
Reject the link if it creates a cycle.
![Page 31: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/31.jpg)
What’s the difference
Shortest Path Problem Rider’s version Consider the number of riders who will
use itSpanning Tree Problem
Builder’s version Consider only the cost of construction NOT A NETWORK FLOW PROBLEM
![Page 32: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/32.jpg)
Transportation Problem
Sources with limited supplyDestinations with requirementsCost proportional to volumeMultiple sourcing allowed
![Page 33: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/33.jpg)
PROTRAC Engine Distribution
500
800 700
500
400
900
200
*
*
*
*
*
*
*
Belgium
Germany
Netherlands
The Hague
Amsterdam
Antwerp
Nancy
Liege
Tilburg
Leipzig
Miles
100500
500
800
700
500
200
400
900
![Page 34: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/34.jpg)
Transportation CostsTo Destination
From Origin Leipzig Nancy Liege TilburgAmsterdam 120 130 41 62Antwerp 61 40 100 110The Hague 102.5 90 122 42
Unit transportation costs from harbors to plants
Minimize the transportation costs involved in
moving the engines from the harbors to the
plants
![Page 35: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/35.jpg)
A Transportation ModelThe Sets
The set of Portsset PORTS; The set of Plantsset PLANTS; The set of Edges is assumed
to be all port-plant pairs. If it is not, we should define the set of edges.
![Page 36: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/36.jpg)
A Transportation ModelThe Parameters
Supply at the Portsparam Supply{PORTS}; Demand at the Plantsparam Demand{PLANTS}; Cost per unit to shipparam Cost{PORTS,PLANTS};
![Page 37: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/37.jpg)
Transportation Model
The Variables How much to ship from each port to each plantvar Ship{PORTS, PLANTS} >= 0;
The Objective Minimize the total cost of shippingminimize TotalCost: sum {port in PORTS, plant in PLANTS} Cost[port, plant]*Ship[port, plant];
![Page 38: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/38.jpg)
Transportation Model
The Constraints Do not exceed supply at any ports.t. RespectSupply {port in PORTS}: sum{plant in PLANTS} Ship[port, plant]<= Supply[port]; Meet Demand at each plants.t. MeetDemand {plant in PLANTS}: sum{port in PORTS} Ship[port, plant]>= Demand[plant];
![Page 39: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/39.jpg)
Observations
If Supply and Demand are integral then the answer Ship will be integral as well.
Single Commodity -- doesn’t matter where it came from.
Proportional Costs.
![Page 40: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/40.jpg)
Crossdocking
3 plants2 distribution centers2 customersMinimize shipping costs
Direct from plant to customer
Via DC
![Page 41: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/41.jpg)
A Transshipment Model
The Sets The Plants set PLANTS; The Distribution Centers set DCS; The Customers set CUSTS;
![Page 42: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/42.jpg)
Transshipment Model
The Set of EdgesWe assume all Plant-DC, Plant-Customer,
DC-Customer edges are possible. Convenient to define a set of Edgesset EDGES := (PLANTS cross DCS) union (PLANTS cross CUSTS) union (DCS cross CUSTS);
![Page 43: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/43.jpg)
A Transshipment Model
The Parameters The Supply at each plant
param Supply{PLANTS};
The Demand at each Customerparam Demand{CUSTS};
The Cost on each edge. param Cost{EDGES};See the convenience of defining EDGES?
![Page 44: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/44.jpg)
A Transshipment Model
The Variables The volume shipped on each edge var Ship{EDGES} >= 0;
The ConstraintsCombine ideas of Shortest paths (flow
conservation) with Transportation (meet supply and demand)
![Page 45: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/45.jpg)
A Transshipment ModelFor each Plants.t. RespectSupply {plant in PLANTS}: sum{(plant, t) in EDGES} Ship[plant,t]<= Supply[plant];For each Customers.t. MeetDemand {cust in CUSTS}: sum{(f, cust) in EDGES} Ship[f, cust]>= Demand[cust];
![Page 46: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/46.jpg)
A Transshipment Model
For each DC: Conserve flows.t. ConserveFlow {dc in DCS}: sum{(f, dc) in EDGES} Ship[f,dc]
= sum{(dc, t) in EDGES} Ship[dc,t];
Flow into the DC = Flow out of the DC
![Page 47: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/47.jpg)
Good News
Lots of applicationsSimple ModelOptimal Solutions QuicklyIntegral Data, Integral Answers
![Page 48: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/48.jpg)
Bad News
What’s Missing? Single Homogenous Product Linear Costs No conversions or losses ...
![Page 49: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/49.jpg)
Homogenous Product
![Page 50: New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects.](https://reader036.fdocuments.us/reader036/viewer/2022062720/56649f045503460f94c1844f/html5/thumbnails/50.jpg)
Linear Costs
No Fixed ChargesNo Volume DiscountsNo Economies of Scale