lessons from project phase-i zgood modeling practices yextensive model documentation ygenerality of...

Post on 17-Jan-2016

221 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lessons from Project Phase-I

Good modeling practices Extensive model documentation Generality of the model Writing constraints

Good reporting practices To a manager, not a professor ! Executive Summary - about the business Clarity, brevity, …………

Model documentation

Includes defining meaningful variable namesDoesn’t hurt in any wayWhat if somebody has to continue the work

you started ?What if you have to take over somebody

else’s work ?

Ever debugged somebody’s code ? That should be a good lesson !

Model generality

EXTREMELY IMPORTANT

What do you do when (not “IF” !) the world changes ? Addition/deletion of ports, DCs, etc. Prices, duties, etc. change frequently …………

Model generality

Integrating model and data is a very, very bad idea.

We won’t deduct too many points for that this time, but from Phase-II onwards, if you have data in your model………

A word of caution on writing constraints

5x1 + x2 10

x1 + 5x2 10

against

6x1 + 6x2 20

Which is better ?

Reporting

Whenever, you make or solve a model in the real world, you will present it to higher management (senior managers, VPs, etc.)

They’re NOT interested in methodology, or your math, unless…………

You show them the impacton business !!

Reporting

Make sure your solution makes sense Logically follows from the data (at least

some major decisions) Includes all relevant components, e.g.

PurchasingTransportationInventoryCapitalDuties and taxes…………………

Executive summary

Solution overview (“Best” strategy)“Take the solution back through your

calculations”…………Where is the money going ?

Cost breakdowns by logical categories Types, Segments, Regions, etc.

What are other key issues to consider ?Any alternatives ? With what

tradeoffs ?At most 1-2 pages with charts, tables, etc.

Main report and appendices

Detailed solution and discussion, along with methodology, assumptions, etc. +

Your VALUE ADDITION !!! Can you suggest something beyond the

solution of the problem given to you ?

Appendices - for the “nerds” !

Project Phase-I Model: Sets

set SOURCES;set PORTS;set DCS;

set EDGES := (SOURCES cross PORTS) union (PORTS cross

DCS);

Project Phase-I Model: Variables

/*-------------------------------------------------- The Variables in the model are the no. of containers shipped each year on each edge

---------------------------------------------------*/var Shipments{EDGES} integer >= 0;

This is a network flow problem, so integral data implies integral solutions.

Project Phase-I Model: Constraints

Do not exceed supply at any source s.t. ObserveCapacity {source in SOURCES}:

sum{(source, t) in EDGES} Shipments[source, t] <= SourceCap[source];

Conserve Flow at Portss.t. ConserveFlow {port in PORTS}:

sum{(f, port) in EDGES} Shipments[f, port]= sum{(port, t) in EDGES} Shipments[port, t];

Meet Demand at DCSs.t. MeetDemand {dc in DCS}:

sum{(t, dc) in EDGES} Shipments[t,dc] >= Demand[dc];

Project Phase-I Model: Objective function

minimize TotalCost:Purchase Price + DutiesFreight CostsMoving Inventory Costs (pipeline)Waiting Inventory Costs (Note: these

should include the waiting time at the sources, but we forgot to tell you how often ships are scheduled to sail)

A not so good way for variables, but it works too

If you don’t want to work with EDGES, you may define variables by segment, like :

ShipSourcePort {SOURCES, PORTS};ShipPortDC {PORTS, DCS};

Not the best way, but it’s acceptable too.Using EDGES is much more elegant.

A caution on number of variables and constraints

Student versions of Xpress and AMPL support 300 variables and 300 constraints.

To see how many you’ve used, use the AMPL command :

option show_stats 1;

Project Phase-I Answer

18000 containers/year - Brazil to Norfolk2000 containers/year - Brazil to Long

Beach10000 containers/year - China to Long

Beach18000 containers/year - Norfolk to NY12000 containers/year - Long Beach to LA

Obvious solution ! Why ?

Project Phase-I Answer

Total cost : $1.3-1.4 billion, depending on your assumptions $1.2 billion purchase cost $72 million duties …………………

In this phase, purchase cost (excluding duties) doesn’t affect the decision, so we can remove it from the objective function

However, still need to report it !

Project Phase-II

Something close to the real thingMuch more detailed model than Phase-I,

so get on it ASAP ! Multiple products Multiple modes of transport Weight and cube constraints …………………

Use “option solver cplex;” before “solve;”

Project Phase-II

Recall this ?

/* ------------------------------------------------------------------- set………… param……… var………… s.t…………… Solve the problem You may need a command like option solver cplex; -------------------------------------------------------------------*/ solve;

Why ?

Project Phase-II

Not a network flow problem anymore, so…

Integral data does not imply integral solutions !

AMPL solvers MINOS - default, doesn’t solve IPs CPLEX

top related