Download presentation
Presentation is loading. Please wait.
Published byPhoebe Nicholson Modified over 9 years ago
1
New Stage zCourse Phases yDescription of Systems and Issues yPrescriptive tools and modeling yInternational Aspects
2
Prescriptive Tools & Models zNetwork Flows yPrincipally Transportation yLimited direct applications yGood start on modeling yInteger answers for free zAdded realism yWeight and cube -- conveyance capacity yFrequency and Schedule Driven systems yInventory and Load Driven systems yTrailer fill and customer service yLocation models yRouting
3
No Text zThere is no text for this portion of the course zBe sure to ask questions in class zWork on your case! The issues in the case parallel those covered in class zKeep up. Attend help sessions with Manu. zThe Case is excellent preparation for the exam.
4
Transportation/Network Models zSingle Commodity yRoute Selection (Shortest Path) yBasic Network Design (Spanning Tree) yBasic Transportation (Transportation Model) yCross Docking (Transshipment Models) zMultiple Commodities
5
Route Selection zGetting From A to B zUnderlying Network yRoads yAirports yTelecommunication links zCosts of using each link zFind the cheapest (shortest) path
6
Example 90 84 126 150 48 348 66138 90 120 132 126 60 132 48 156 A E D C B J H G F I Directed Edges
7
Shortest Path Model zAn introduction to AMPL and review of modeling zSets yDefine entities and index data yThe Nodes of the Graph set NODES; yThe Edges of the Graph set EDGES within NODES cross NODES;
8
Shortest Path Model zParameters yHold data yThe Cost on each Edge param Cost{EDGES}; yThe Origin and Destination param Origin symbolic; param Destination symbolic;
9
Shortest Path Model zThe Variables yThe decisions the model should make yWhich edges to use var UseEdge{EDGES} >= 0; /* The number of times we use each edge */
10
Shortest Path Model zThe Objective yHow we distinguish which solution is better minimize PathCost: sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t];
11
Shortest Path Model zConstraints yEliminate what is not feasible yFlow 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);
12
Rules of the Game zTo be a linear program yvariables can only be of the form xvar UseEdge{EDGES} >= lower bound, <= upper bound; zOther possibilities (for later) yvar UseEdge{EDGES} binary (meaning 0 or 1) yvar UseEdge{EDGES} integer >= 0; yCalled Integer Programming
13
More Rules of the Game zThe Objective must be of the form: yminimize ObjectiveName: y sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t]; ymaximize ObjectiveName: y sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t]; yWhat’s relevant: xminimize or maximize xsum of known constant * variable yWhat’s not allowed xvariable*variable, |variable - constant|, variable 2...
14
More Rules of the Game zThe Constraints must be of the form: ys.t ConstraintName: y sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] y<= Constant ys.t. ConstraintName: y sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] y>= Constant ys.t. ConstraintName: y sum{(f,t) in EDGES} Cost[f,t]*UseEdge[f,t] y= Constant
15
More Rules of the Game zWhat’s relevant: yLeft-hand-side: xsum of known constant * variable yRight-hand-side xknown constant ySense of constraint x>=, <=, = yWhat’s not allowed xvariable*variable, |variable - constant|, variable 2...
16
Network Flow Problems zSpecial Case of Linear Programs zIf the data are integral, the solutions will be integral zNot generally true of Linear Programs, just of Network Flow Problems
17
To Be a Network Flow Problem zConstraints must be of the form sum{(f, node) in EDGES} UseEdge[f,node] - sum{(node, t) in EDGES} UseEdge[node, t] = or = constant zAnd Each variable can appear in at most two constraints, once as a flow in, e.g., as part of the sum sum{(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]
18
The Data zThe Nodes zA 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;
19
More Data zThe Edges and Costs zNamed region called Costs table CostsTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "Costs": EDGES <- [FromNode, ToNode], Cost; read table CostsTable;
20
More Data zThe Origin and Destination zA Named Region called OriginDest table OriginDestTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "SQL=SELECT Origin, Destination FROM OriginDest": [], Origin, Destination; read table OriginDestTable;
21
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;
22
Running the Model zFrom a DOS prompt in..\ilog Launch AMPL by typing ampl zAt the AMPL: prompt type model d:\….\shortpath.mod; include d:\…\shortpath.run;
23
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;
24
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;
25
Applicability zSingle Origin zSingle Destination zNo requirement to visit intermediate nodes zNo “negative cycles” zAnswer will always be either ya simple path yinfeasible yunbounded
26
Tree of Shortest Paths zFind shortest paths from Origin to each node zSend n-1 units from origin zGet 1 unit to each destination
27
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);
28
Use Some Care zThe Answer is how many paths the edge is in. Not whether or not it is in a path.
29
Minimum Spanning Tree zFind the cheapest total cost of edges required to tie all the nodes together 90 84 126 150 48 348 66138 90 120 132 126 60 132 48 156 A E D C B J H G F I
30
Greedy Algorithm zConsider links from cheapest to most expensive zAdd a link if it does not create a cycle with already chosen links zReject the link if it creates a cycle.
31
What’s the difference zShortest Path Problem yRider’s version yConsider the number of riders who will use it zSpanning Tree Problem yBuilder’s version yConsider only the cost of construction yNOT A NETWORK FLOW PROBLEM
32
Transportation Problem zSources with limited supply zDestinations with requirements zCost proportional to volume zMultiple sourcing allowed
33
PROTRAC Engine Distribution 500 800 700 500 400 900 200 * * * * * * * Belgium Germany Netherlands The Hague Amsterdam Antwer p Nancy Liege Tilburg Leipzig Miles 100500 500 800 700 500 200 400 900
34
Transportation Costs Unit transportation costs from harbors to plants Minimize the transportation costs involved in moving the engines from the harbors to the plants
35
A Transportation Model zThe Sets yThe set of Ports set PORTS; yThe set of Plants set PLANTS; yThe set of Edges is assumed to be all port-plant pairs. If it is not, we should define the set of edges.
36
A Transportation Model zThe Parameters ySupply at the Ports param Supply{PORTS}; yDemand at the Plants param Demand{PLANTS}; yCost per unit to ship param Cost{PORTS,PLANTS};
37
Transportation Model zThe Variables yHow much to ship from each port to each plant var Ship{PORTS, PLANTS} >= 0; zThe Objective yMinimize the total cost of shipping minimize TotalCost: sum {port in PORTS, plant in PLANTS} Cost[port, plant]*Ship[port, plant];
38
Transportation Model zThe Constraints yDo not exceed supply at any port s.t. RespectSupply {port in PORTS}: sum{plant in PLANTS} Ship[port, plant] <= Supply[port]; yMeet Demand at each plant s.t. MeetDemand {plant in PLANTS}: sum{port in PORTS} Ship[port, plant] >= Demand[plant];
39
Observations zIf Supply and Demand are integral then the answer Ship will be integral as well. zSingle Commodity -- doesn’t matter where it came from. zProportional Costs.
40
Crossdocking z3 plants z2 distribution centers z2 customers zMinimize shipping costs yDirect from plant to customer yVia DC
41
A Transshipment Model zThe Sets yThe Plants set PLANTS; yThe Distribution Centers set DCS; yThe Customers set CUSTS;
42
Transshipment Model zThe Set of Edges zWe assume all Plant-DC, Plant-Customer, DC-Customer edges are possible. zConvenient to define a set of Edges set EDGES := (PLANTS cross DCS) union (PLANTS cross CUSTS) union (DCS cross CUSTS); z
43
A Transshipment Model zThe Parameters yThe Supply at each plant param Supply{PLANTS}; yThe Demand at each Customer param Demand{CUSTS}; yThe Cost on each edge. param Cost{EDGES}; xSee the convenience of defining EDGES?
44
A Transshipment Model zThe Variables yThe volume shipped on each edge var Ship{EDGES} >= 0; zThe Constraints zCombine ideas of Shortest paths (flow conservation) with Transportation (meet supply and demand)
45
A Transshipment Model zFor each Plant s.t. RespectSupply {plant in PLANTS}: sum{(plant, t) in EDGES} Ship[plant,t] <= Supply[plant]; zFor each Customer s.t. MeetDemand {cust in CUSTS}: sum{(f, cust) in EDGES} Ship[f, cust] >= Demand[cust];
46
A Transshipment Model zFor each DC: Conserve flow s.t. ConserveFlow {dc in DCS}: sum{(f, dc) in EDGES} Ship[f,dc] = sum{(dc, t) in EDGES} Ship[dc,t]; zFlow into the DC = Flow out of the DC
47
Good News zLots of applications zSimple Model zOptimal Solutions Quickly zIntegral Data, Integral Answers
48
Bad News zWhat’s Missing? ySingle Homogenous Product yLinear Costs yNo conversions or losses y...
49
Homogenous Product
50
Linear Costs zNo Fixed Charges zNo Volume Discounts zNo Economies of Scale
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.