1 / 50

New Stage

New Stage. Course Phases Description of Systems and Issues Prescriptive tools and modeling International Aspects. Prescriptive Tools & Models. Network Flows Principally Transportation Limited direct applications Good start on modeling Integer answers for free Added realism

ekristi
Télécharger la présentation

New Stage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. New Stage • Course Phases • Description of Systems and Issues • Prescriptive tools and modeling • International Aspects

  2. Prescriptive Tools & Models • Network 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

  3. No Text • There is no text for this portion of the course • Be sure to ask questions in class • Work on your case! The issues in the case parallel those covered in class • Keep up. Attend help sessions with Manu. • The Case is excellent preparation for the exam.

  4. Transportation/Network Models • Single Commodity • Route Selection (Shortest Path) • Basic Network Design (Spanning Tree) • Basic Transportation (Transportation Model) • Cross Docking (Transshipment Models) • Multiple Commodities

  5. Route Selection • Getting From A to B • Underlying Network • Roads • Airports • Telecommunication links • Costs of using each link • Find the cheapest (shortest) path

  6. Example I B E 84 84 90 A 132 138 66 120 C 90 126 H F 60 348 156 126 132 48 J 150 D 48 G Directed Edges

  7. 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 Graph • set EDGES within NODES cross NODES;

  8. Shortest Path Model • Parameters • Hold data • The Cost on each Edge • param Cost{EDGES}; • The Origin and Destination • param Origin symbolic; • param Destination symbolic;

  9. 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 */

  10. 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];

  11. Shortest Path Model • Constraints • 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);

  12. 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

  13. 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 maximize • sum of known constant * variable • What’s not allowed • variable*variable , |variable - constant|, variable2...

  14. 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

  15. More Rules of the Game • What’s relevant: • Left-hand-side: • sum of known constant * variable • Right-hand-side • known constant • Sense of constraint • >=, <=, = • What’s not allowed • variable*variable , |variable - constant|, variable2...

  16. Network Flow Problems • Special Case of Linear Programs • If the data are integral, the solutions will be integral • Not generally true of Linear Programs, just of Network Flow Problems

  17. 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 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 • The Nodes • A 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 • The Edges and Costs • Named region called Costs table CostsTable IN "ODBC" "d:\personal\3101\ShortPathData.xls" "Costs": EDGES <- [FromNode, ToNode], Cost; read table CostsTable;

  20. More Data • The Origin and Destination • A 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 • From a DOS prompt in ..\ilog • Launch AMPL by typing ampl • At 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 • Single Origin • Single Destination • No requirement to visit intermediate nodes • No “negative cycles” • Answer will always be either • a simple path • infeasible • unbounded

  26. Tree of Shortest Paths • Find shortest paths from Origin to each node • Send n-1 units from origin • Get 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 • The Answer is how many paths the edge is in. Not whether or not it is in a path.

  29. Minimum Spanning Tree • Find the cheapest total cost of edges required to tie all the nodes together I B E 84 84 90 A 132 138 66 120 C 90 126 H F 60 348 156 126 132 48 J 150 D 48 G

  30. 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.

  31. What’s the difference • Shortest Path Problem • Rider’s version • Consider the number of riders who will use it • Spanning Tree Problem • Builder’s version • Consider only the cost of construction • NOT A NETWORK FLOW PROBLEM

  32. Transportation Problem • Sources with limited supply • Destinations with requirements • Cost proportional to volume • Multiple sourcing allowed

  33. Netherlands Amsterdam 500 * 800 The Hague * Germany 500 Tilburg * 700 * Antwerp Leipzig * Belgium 400 * Liege 200 Nancy * 900 Miles 0 50 100 PROTRAC Engine Distribution 500 800 500 400 700 200 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 • The Sets • The set of Ports set PORTS; • The set of Plants set PLANTS; • The 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 • The Parameters • Supply at the Ports param Supply{PORTS}; • Demand at the Plants param Demand{PLANTS}; • Cost per unit to ship param Cost{PORTS,PLANTS};

  37. Transportation Model • The Variables • How much to ship from each port to each plant var Ship{PORTS, PLANTS} >= 0; • The Objective • Minimize the total cost of shipping minimize TotalCost: sum {port in PORTS, plant in PLANTS} Cost[port, plant]*Ship[port, plant];

  38. Transportation Model • The Constraints • Do not exceed supply at any port s.t. RespectSupply {port in PORTS}: sum{plant in PLANTS} Ship[port, plant] <= Supply[port]; • Meet Demand at each plant s.t. MeetDemand {plant in PLANTS}: sum{port in PORTS} Ship[port, plant] >= Demand[plant];

  39. 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.

  40. Crossdocking • 3 plants • 2 distribution centers • 2 customers • Minimize shipping costs • Direct from plant to customer • Via DC

  41. A Transshipment Model • The Sets • The Plants • set PLANTS; • The Distribution Centers • set DCS; • The Customers • set CUSTS;

  42. Transshipment Model • The Set of Edges • We assume all Plant-DC, Plant-Customer, DC-Customer edges are possible. • Convenient to define a set of Edges • set EDGES := (PLANTS cross DCS) union • (PLANTS cross CUSTS) union • (DCS cross CUSTS);

  43. A Transshipment Model • The Parameters • The Supply at each plant • param Supply{PLANTS}; • The Demand at each Customer • param Demand{CUSTS}; • The Cost on each edge. • param Cost{EDGES}; • See the convenience of defining EDGES?

  44. A Transshipment Model • The Variables • The volume shipped on each edge • var Ship{EDGES} >= 0; • The Constraints • Combine ideas of Shortest paths (flow conservation) with Transportation (meet supply and demand)

  45. A Transshipment Model • For each Plant s.t. RespectSupply {plant in PLANTS}: sum{(plant, t) in EDGES} Ship[plant,t] <= Supply[plant]; • For each Customer s.t. MeetDemand {cust in CUSTS}: sum{(f, cust) in EDGES} Ship[f, cust] >= Demand[cust];

  46. A Transshipment Model • For 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]; • Flow into the DC = Flow out of the DC

  47. Good News • Lots of applications • Simple Model • Optimal Solutions Quickly • Integral Data, Integral Answers

  48. Bad News • What’s Missing? • Single Homogenous Product • Linear Costs • No conversions or losses • ...

  49. Homogenous Product

  50. Linear Costs • No Fixed Charges • No Volume Discounts • No Economies of Scale

More Related