decision aid methodologies in transportationย ยท lab vi: case study โfreight trains management ....
TRANSCRIPT
CIVIL-557
Decision Aid Methodologies
In Transportation
Transport and Mobility Laboratory (TRANSP-OR)
รcole Polytechnique Fรฉdรฉrale de Lausanne EPFL
Virginie Lurkin
Lab VI:
Case study โ Freight Trains Management
Solution of the previous lab
F1
Customer (service costs ๐๐๐) Fixed cost (๐๐)
Facility 1 2 3
1 1000 20 30 200
2 1000 30 40 200
3 1000 160 150 200
4 50 140 120 200
Which formulation is better?
F2
UFLP problem - solution
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โ 0,1 , โ๐ = 1,โฆ5.
IP(1)
Knapsack problem โ example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
0 1 1 0 0 31 12s
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(1)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
1.2759 0 0 0 0 38.28 8s
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(1)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
1.2759 0 0 0 0 38.28 8s
๐๐ โค ๐ is the Gomory cut you obtained
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(2)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
1 0 0 0.667 0 37.33 7s
๐๐ โค ๐
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(2)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
1 0 0 0.667 0 37.33 7s
๐๐ + ๐๐ โค ๐ is a cover cut
๐๐ โค ๐
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(3)
Knapsack problem - solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
1 0 0 0 0.8 37.2 7s
๐๐ + ๐๐ โค ๐
๐๐ โค ๐
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(4)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
0.724 0.276 0.276 0.276 0.276 35.79 7s
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(4)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
0.724 0.276 0.276 0.276 0.276 35.79 7s
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
Gomory cut on the optimal tableau of LP(4) gives me:1.24137931*x1 + 1.068965517*x2 + 0.413793103*x3 + 0.413793103*x4 <=1;
max 30๐ฅ1 + 17๐ฅ2 + 14๐ฅ3 + 11๐ฅ4 + 9๐ฅ5
๐ . ๐ก. 29๐ฅ1 + 20๐ฅ2 + 16๐ฅ3 + 12๐ฅ4 + 10๐ฅ5 โค 37
๐ฅ๐ โฅ 0, โ๐ = 1,โฆ5.
LP(5)
Knapsack problem - example of solution
๐๐โ ๐๐
โ ๐๐โ ๐๐
โ ๐๐โ ๐โ CT
0.252 0.063 0.747 0.747 0.747 34.07 7s
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ โค ๐
๐๐ + ๐๐ โค ๐
๐๐ + ๐๐ โค ๐
1.24137931*x1 + 1.068965517*x2 + 0.413793103*x3 + 0.413793103*x4 <=1;
Lab 6
The Locomotive Fleet Fueling Problem
Overview
The locomotive fleet fueling problem
Problem description
MILP formulation
Simple example (2010 RAS Competition)
Assignment #6
Larger instance
Valid inequalities
Evalution of three models
2010 RAS Competition
Problem description
Problem description
Yards
o Tanker truck contracting cost
o Amount of dispensable fuel per tanker truck
o Fuel cost per gallon
Locomotives
o Schedule โ sequence of stops
o Delay cost per stop
Problem description
Sets
o ๐ผ: set of locomotives (1 locomotive = 1 train)
o ๐ฝ: set of stops
o ๐พ: set of yards
o ๐: set of days
Parameters
o ๐ท๐ถ๐๐: delay cost ($) for locomotive ๐ and stop ๐
o ๐ถ๐ถ: contracting cost ($/truck) for a truck for the entire planning horizon,
same for all yards
o ๐๐: fuel cost ($/gallon) at yard ๐
Problem description
Parameters
o ๐๐: Tanker truck capacity (in gallons) per day, same for all trucks
o ๐ฟ๐: Capacity (in gallons) of fuel tank of a locomotive, same for all
locomotives
o ๐น๐ถ๐๐: fuel consumption (in gallons) for a locomotive ๐ to go for stop ๐ to
stop ๐ + 1
o ๐๐: set of stops for locomotive ๐ in the planning horizon
o ๐๐๐๐๐๐: Yard used if locomotive ๐ refuels at stop ๐
o ๐ท๐๐ฆ๐๐: Day in which locomotive ๐ is at stop ๐
Problem description
Decision variables
o ๐ฅ๐๐ = แ1 ๐๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐๐๐๐ข๐๐๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐0 ๐๐กโ๐๐๐ค๐๐ ๐
o ๐ฆ๐ = ๐๐ข๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐ก๐๐๐๐ ๐ก๐ ๐๐ ๐๐๐๐ก๐๐๐๐ก๐๐ ๐๐ก ๐ฆ๐๐๐ ๐
o ๐๐๐ = ๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐๐ข๐๐๐๐ ๐๐ฆ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐
o ๐ฃ๐๐ = ๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐ ๐กโ๐ ๐ก๐๐๐ ๐๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐ข๐๐๐ ๐๐๐๐๐ฃ๐๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐
MILP formulation
๐๐๐ delay costs + contracting costs + fueling costs
๐ . ๐ก.
๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐ ๐กโ๐ ๐ก๐๐๐ ๐๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐ข๐๐๐ ๐๐๐๐๐ฃ๐๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐
๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐ ๐กโ๐ ๐ก๐๐๐ ๐๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐ข๐๐๐ ๐๐๐๐๐ฃ๐๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐ โ 1
๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐๐ข๐๐๐๐ ๐๐ฆ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐ โ 1
๐๐ข๐๐ ๐๐๐๐ ๐ข๐๐๐ก๐๐๐ ๐๐ ๐๐๐๐๐๐๐ ๐๐๐ ๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐ก๐ ๐๐ ๐๐๐ ๐ ๐ก๐๐ ๐ โ 1 ๐ก๐ ๐ ๐ก๐๐ ๐
=
+
-
1 ๐๐ข๐๐ ๐๐๐๐ ๐ข๐๐๐ก๐๐๐
๐ . ๐ก.
๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐ ๐กโ๐ ๐ก๐๐๐ ๐๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐๐ก ๐๐๐ฆ ๐ก๐๐๐
โค Capacity (in gallons) of fuel tank of a locomotive
2 ๐๐๐๐๐๐๐ก๐ฆ ๐๐ ๐๐ข๐๐ ๐ก๐๐๐
MILP formulation
๐๐๐ delay costs + contracting costs + fueling costs
๐ . ๐ก.
๐โ๐ ๐๐๐๐๐๐๐ ๐๐ ๐๐ข๐๐ ๐๐๐ข๐๐๐๐ ๐๐ฆ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐๐ก ๐๐ก๐ ๐ ๐ก๐๐ ๐ ๐๐๐๐๐๐๐ ๐๐
๐คโ๐๐กโ๐๐ ๐กโ๐ ๐๐๐๐๐๐๐ก๐๐ฃ๐ ๐ ๐ ๐ก๐๐๐ ๐๐ก ๐
3 ๐๐๐๐ข๐๐๐๐๐
MILP formulation
๐๐๐ delay costs + contracting costs + fueling costs
Simple example (2010 RAS Competition)
4 yards:Y1, Y2, Y3, Y4
2 trains:T1,T2
T1: [Y1,Y2,Y3,Y4]
T2: [Y4,Y2,Y1]
Distances between yards (miles):
d(Y1,Y2) = 106
d(Y2,Y3) = 146
d(Y2,Y4) = 162
d(Y3,Y4) = 16
Y1 Y2 Y3 Y4
Simple example (2010 RAS Competition)
Simple example (2010 RAS Competition)
2 locomotives: L1, L2
Each train needs to be powered by exactly one locomotive
L1 and L2 take staggered turns everyday at pulling the trains
Simple example (2010 RAS Competition)
Locomotive
Consumption: 3.5 gallons of fuel per mile
Tank capacity: 4500 gallons of fuel
Distance that can run on full tank: 1285.71 miles
Fueling truck
Capacity: 25000 gallons
Weekly operating cost: $4000
Fixed refueling cost: $250
Fuel price ($/gallon):
Y1: 3.25
Y2: 3.05
Y3: 3.15
Y4: 3.15
MILP formulation: data
Sets
๐ผ = 2 (number of locomotives)
๐ = 35 (number of potential stops, same for both
locomotives ๐๐ = ๐)
7 times T1 x 3 potential stops = 21 potential stops
7 times T2 x 2 potential stops = 14 potential stops
๐พ = 4 (number of yards)
๐ = 14 (number of days)
MILP formulation: data
Parameters
๐ท๐๐ = $250 (delay cost of locomotive ๐ at stop ๐)
๐ฟ๐ = 4500 ๐๐๐๐๐๐ (capacity of fuel tank of a locomotive)
๐๐ = 25000 ๐๐๐๐๐๐ (tanker truck capacity of yard)
๐ถ๐ถ = $8000 (contracting cost of a truck for 2 weeks)
๐น๐ถ๐๐ : fuel consumption of locomotive ๐ on its journey from
stop ๐ to ๐ + 1 L1:T2 T1 T2 T1 โฆ
L1:Y1 Y2 Y3 Y4 Y2 Y1 โฆ
CO
NST
AN
T
T1 T2
Y1 Y2 Y3 Y4
371 gal 511 gal 56 gal
567 gal371gal
MILP formulation: data
Parameters
Y๐๐๐ ๐, ๐ : yard of stop ๐ of
locomotive ๐ D๐๐ฆ ๐, ๐ : day in which stop
๐ of locomotive ๐ occurs
๐๐ =
3.25, 3.05, 3.15, 3.15$/gal (fuel price at yard ๐)
Provided data: fuel_prices_small.dat: fuel prices at yards (size
๐พ) number_of_stops_small.dat: number of stops for
each locomotive (size ๐ผ) list_of_events_small.csv: table with all the
possible events
Read from CSV files
1 1 1 1 371 250
1 2 2 1 511 250
1 3 3 1 56 250
1 4 4 2 567 250
1 5 2 2 371 250
Locomotive
Stop
Yard
DayConsumption to next stop Delay costs
Read from CSV files
SheetConnectionsheet1("fuel_prices_small.csv");SheetConnectionsheet2("number_of_stops_small.csv");SheetConnectionsheet3("list_of_events_small.csv");
P fromSheetRead(sheet1,"'fuel_prices_small'!A1:A4"); // fuel price at yard k (in dolars/gallon)N fromSheetRead(sheet2,"'number_of_stops_small'!A1:A2"); // number of stops for each locomotive iData fromSheetRead(sheet3,"'list_of_events_small'!A1:F70"); // LocoNumber,LocoStopNumber,YardNumber,Day,ConsumptionStops,StopDelayCost
Model formulation and small instance
Write a mathematical model (MILP) designed to find the most
cost effective plan to fuel the locomotives.
Implement your model in OPL and solve it for the small
instance.
Provide an interpretation of the solution.
MILP formulation
minimize
๐
๐ถ๐ถ๐ โ ๐ฆ๐ +
๐,๐
๐ท๐,๐ โ ๐ฅ๐,๐ + ๐๐ฆ๐๐๐ ๐,๐ โ ๐๐,๐
๐ฃ๐,๐ = ๐ฃ๐,๐โ1 + ๐๐,๐โ1 โ ๐น๐ถ๐,๐โ1 โ๐, ๐ = 2,โฆ , ๐๐
๐ฃ๐,๐ + ๐๐,๐ โค ๐ฟ๐๐ โ๐, ๐
๐๐,๐ โค ๐ฟ๐๐๐ฅ๐,๐ โ๐, ๐
(๐,๐)โถ ๐ฆ๐๐๐(๐,๐) = ๐,๐๐๐ฆ(๐,๐)=๐
๐๐,๐ โค ๐๐๐ โ ๐ฆ๐ โ๐, ๐
๐ฆ๐ integer, ๐ฅ๐,๐ binary, ๐๐,๐ , ๐ฃ๐,๐ โฅ 0
MILP formulation
minimize
๐
๐ถ๐ถ๐ โ ๐ฆ๐ +
๐,๐
๐ท๐,๐ โ ๐ฅ๐,๐ + ๐๐ฆ๐๐๐ ๐,๐ โ ๐๐,๐
๐ฃ๐,๐ = ๐ฃ๐,๐โ1 + ๐๐,๐โ1 โ ๐น๐ถ๐,๐โ1 โ๐, ๐ = 2,โฆ , ๐๐
๐ฃ๐,๐ + ๐๐,๐ โค ๐ฟ๐๐ โ๐, ๐
๐๐,๐ โค ๐ฟ๐๐๐ฅ๐,๐ โ๐, ๐
(๐,๐)โถ ๐ฆ๐๐๐(๐,๐) = ๐,๐๐๐ฆ(๐,๐)=๐
๐๐,๐ โค ๐๐๐ โ ๐ฆ๐ โ๐, ๐
๐ฆ๐ integer, ๐ฅ๐,๐ binary, ๐๐,๐ , ๐ฃ๐,๐ โฅ 0
Results of the basic instance
Loc Yard StopNumber Day Gallons
2 4 1 1 0
2 2 2 1 0
2 1 3 2 0
2 2 4 2 0
2 3 5 2 0
2 4 6 3 0
2 2 7 3 0
2 1 8 4 0
2 2 9 4 0
2 3 10 4 0
2 4 11 5 0
2 2 12 5 4313
2 1 13 6 0
2 2 14 6 0
2 3 15 6 0
2 4 16 7 0
2 2 17 7 0
2 1 18 8 0
2 2 19 8 0
2 3 20 8 0
2 4 21 9 0
2 2 22 9 0
2 1 23 10 0
2 2 24 10 4263
2 3 25 10 0
2 4 26 11 0
2 2 27 11 0
2 1 28 12 0
2 2 29 12 0
2 3 30 12 0
2 4 31 13 0
2 2 32 13 0
2 1 33 14 0
2 2 34 14 0
2 3 35 14 0
Loc Yard StopNumber Day Gallons
1 1 1 1 0
1 2 2 1 0
1 3 3 1 0
1 4 4 2 0
1 2 5 2 0
1 1 6 3 0
1 2 7 3 0
1 3 8 3 0
1 4 9 4 0
1 2 10 4 0
1 1 11 5 0
1 2 12 5 2633
1 3 13 5 0
1 4 14 6 0
1 2 15 6 0
1 1 16 7 0
1 2 17 7 0
1 3 18 7 0
1 4 19 8 0
1 2 20 8 4500
1 1 21 9 0
1 2 22 9 0
1 3 23 9 0
1 4 24 10 0
1 2 25 10 0
1 1 26 11 0
1 2 27 11 0
1 3 28 11 0
1 4 29 12 0
1 2 30 12 0
1 1 31 13 0
1 2 32 13 1128
1 3 33 13 0
1 4 34 14 0
1 2 35 14 0
Results of the basic instance
Interpretation of the results:
Fueling trucks are contracted only inYard 2
Locomotive 1 stops three times:
Day 5, stop 12: 2633 gallons
Day 8, stop 20: 4500 gallons
Day 13, stop 32: 1128 gallons
Locomotive 2 stops two times:
Day 5, stop 12: 4313 gallons
Day 10, stop 24: 4263 gallons
Objective value: 60602.85
Assignment #6
The following inequalities are valid for our problem:
V1: ๐ฅ๐,๐ โค ๐ฆ๐ฆ๐๐๐ ๐,๐ โ๐, ๐
V2:
Using the large instance, run three versions of the model
separately:
M1: Standard model
M2: Standard model + V1
M3: Standard model + V2
๐=1
๐๐
๐ฅ๐,๐ โฅ ๐๐๐๐น๐ข๐๐๐ ๐ โ๐
๐๐๐๐น๐ข๐๐๐ ๐ =ฯ๐=1๐๐ ๐น๐ถ๐,๐
๐ฟ๐๐
Assignment #6
Stop the running after 15 minutes (900 seconds): cplex.tilim = 900;
Report the following information in a table: getobjectivevalue(m)
getobjbound(m)
getobjgap(m)
getsolvetime(m)
M1 M2 M3
Best known solution
Lower bound
Optimality gap
Solution time (s) Analyze the solutions and provide conclusions
Assignment #6
Send a single file containing all the answers including your
code (format is up to you) AND mathematical formulations of
the different models.
Group/Individual work
Send your reports to virginie.lurkin(at)epfl.ch
Send your reports by 8:00 P.M. next Monday