Вы находитесь на странице: 1из 39

The Locomotive Problem

Consultants: Maxime Descoteaux Carlos Phillips Managers: Sherif & Jeff

Overview
Basic Problem What is expected Data provided Solution and Animation

Model and details Issues and problems

Locomotive Problem
Input: -Railway map -Tasks to perform within a certain time -Locomotives available - Restrictions (maintenance, storage) Output: -Scheduling of the locomotive actions with lowest operation cost

Possible Actions
A locomotive can perform 4 types of activities -transport cargo => active -move without cargo => deadheading -enter storage => waiting -begin maintenance => maintenaing

Railway Map

Tasks Specification
Starting and terminal stations Duration Start time and deadline of a task Minimum attributes required for completion of task
Tonnage Horse Power Number of locomotives

Map of Tasks

Task Table
Task a b c d e f g h i j start time 1 5 5 22 22 1 1 18 23 1 deadline 20 15 25 42 60 55 40 43 27 60 duration tonnage horse power # locomotives 3 40000 3500 1 1 none 4000 1 3 10000 none none 2 18000 3750 none 7 none none 1 3 1000 1800 5 3 9000 2000 1 4 none 3500 1 1 2500 1000 2 12 none none 1

Locomotive Types
Each locomotive belongs to a certain type

Each type has particular attributes maximum tonnage maximum horse power

Locomotive Type Table


Type: SD-70 Tonnage: 20000 tons Horse Power: 3800 hp Type: SD-90 Tonnage: 12000 tons Horse Power: 2000 hp

Important Observations
Task a b f start time 1 5 1 deadline 20 15 55 duration tonnage horse power # locomotives 3 40000 3500 1 1 none 4000 1 3 1000 1800 5

At least 2 locomotives need to participate in task a to meet the tonnage requirement At least 2 locomotives for task b to meet horse power requirement At least 5 locomotives needed for task f

Locomotive Properties
For each locomotive, 1) Type SD-90 or SD-70 2)Starting station 3)Terminal station 4) Countdown for critical locomotives
Time before which a locomotive needs repair A locomotive cannot travel if it is critical Needs to be stored until maintained

Locomotive Table
Locomotive Type Number 1 SD-70 1 2 SD-90 1 3 SD-90 1 4 SD-70 1 5 SD-90 1 Source Target Countdown Quebec Winnipeg 45 Montreal Toronto 12 Hamilton Toronto 30 Winnipeg Winnipeg 23 Calgary Toronto 2

Train Station Properties


Maintenance capacity
Station Max Capacity Vancouver 4 Calgary 2 Saskatoon 0 Winnipeg 5 Thunder Bay 1 Windsor 3 London 1 Hamilton 0 Toronto 5 Kingston 1 Ottawa 2 Montreal 4 Quebec 3

Storage Capacity
Station Max Capacity Vancouver 4 Calgary 0 Saskatoon 0 Winnipeg 2 Thunder Bay 0 Windsor 0 London 0 Hamilton 0 Toronto 5 Kingston 0 Ottawa 0 Montreal 3 Quebec 0

Observations
Locomotives cannot be maintained in Saskatoon and Hamilton
Locomotives can only be stored in Vancouver, Winnipeg, Toronto and Montreal

Participation Cost
Each locomotive type has a cost associated to participating in a given task Not all locomotive types can do all tasks
Each locomotive type has a cost associated to deadheading on a particular track

Task a b c e g h i
Task a c d e f g h i j

Cost ($) 9000 3000 3000 21000 9000 12000 3000


Cost ($) 9000 9000 6000 21000 9000 9000 12000 3000 39000

Observations
SD-70 cannot do task d, f, j

SD-90 cannot do task b

Deadheading Cost for SD-70 and SD-90

Track Vancouver - Calgary Calgary - Saskatoon Saskatoon - Winnipeg Winnipeg - Thunder Bay Thunder Bay - Windsor Windsor - London London - Hamilton Hamilton - Toronto Toronto - Kingston Kingston - Ottawa Ottawa - Montreal

Cost ($) 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000

Main Assumptions
Every trip between two train stations takes unit time to complete SD-70 and SD-90 travel at the same speed A locomotive being repaired is inactive for a day There are 12 time units per day and the scheduling is for a week of 5 days => 60 time clicks

Solution
Good news : Feasible!
Minimum Cost
213 000 $ to accomplish the required tasks

Animation

Integer Program Model


No network topology assumptions are made. We Need a variable for each action at every time click 1) Active variables => A 2) Deadheading variables => D 3) Storage variables => S 4) Maintenance variables => M

But do we need such a variable for each locomotive? NO!


We abstract away the concept of a locomotive and introduce locomotive groups -All locomotives with same properties are part of the same group 1)Type 2)Source station 3)Target station -A group is either critical if it needs maintenance or not critical otherwise

Locomotives Type 1 SD-70 2 SD-90 3 SD-90 4 SD-70 5 SD-90

Number 1 1 1 1 1

Source Quebec Montreal Hamilton Winnipeg Calgary

Target Winnipeg Toronto Toronto Winnipeg Toronto

Countdown 45 12 30 23 2

Groups Type g1 "critical" SD-70 g2 "critical" SD-90 g3 "critical" SD-90 g4 "critical" SD-70 g5 "critical" SD-90 g6 "not-critical" SD-70 g7 "not-critical" SD-90

Number 1 1 1 1 1 0 0

Source Quebec Montreal Hamilton Winnipeg Calgary none none

Target none none none none none Winnipeg Toronto

Countdown 45 12 30 23 2 none none

All Integer Variables


At k,g := number of locomotives of group g contributing to task k at time t Dt ij,g := number of deadheading locomotives of group g on track between stations i and j at time t

Mtj,g := number of locomotives of group g going into maintenance in station j at time t


Stj,g := number of locomotives of group g going into storage in station j at time t -Many variables but most of them are zero! -CPLEX does a great job at ellimating most of them in preprocessing

Network flow formulation


Why a network flow?
At every step in time, we must take a decision for every locomotive group So, we have an enormous Decision Tree for every locomotive group A scheduling is a path through that tree

We simplify the decision tree by merging along time!

Flow Conservation
We must make sure that flow is conserved at every time click
Tricky with maintenance and storage

We must be careful with locomotive intergroup behavior


A locomotive changes group after it is fixed A locomotive becomes part of its corresponding non-critical group

Flow Conservation equations


Everything coming IN a station must equal what is coming OUT. So, we have
locomotives out of storage + locomotives out of maintenance + locomotives arriving at station - locomotives going into storage - locomotives going into maintenance - locomotives going out station = 0

Constraints
Non-trivial constraints: 1) Flow Conservation equations
Straigth forward constraints: 2) Task Requirements inequalities 3) Storage and Maintenance capacity bounds 4) Initial and terminal conditions

Task Requirements
1) Minimum horse power inequality for every task
2) Minimum tonnage inequality for every task

3) Minimum number of locomotives inequality for every task

Storage and Maintenance


1) Storage capacity upper bound for every station on the map

2) Maintenance capacity upper bound for every stattion on the map

Objective Function
Minimize

StSg [Sk Costk,gAtk,g + Strack ijCostij,gDtij,g]


Minimum cost over all time in a week and over all locomotive group to perform all tasks k. Costk,g and Costij,g are the cost associated with the tasks and deadheading on certaint tracks for different groups.

CPLEX Solution
MIP presolve eliminated 1753 rows and 3591 columns Approximately 9 000 variables
8929 are zero

Solution time = 23.42 seconds

Branch and Bound approach


82 nodes in the BB Tree and 11120 iterations best integer feasible bound = 222 000$ A few iterations and obtained 213 000$

Implementation Procedure
1) Script to parse given data and generate the CPLEX .lp input file.
2) Parse CPLEX output to produce locomotive schedules 3) Animation in MATLAB

Issues and Problems


Thinking and debugging regarding intergroup behavior and flow conservation
Remove variables over their critical maintenance time to force locomotives to be fixed in right time

Time issues
maintenance (1 day inactive) duration of a task (groups disappear for that time)

Extremely heavy .lp file => disk quota exceeded


Optimize the script and .lp generation file Variable elimation of those we know are 0 Initial preprocessing step (in problem domain)

Divide all costs by 1000


numbers are smaller when CPLEX is solving faster solution

Extensions and Further Testing


Different deadheading cost dependent on track and locomotive type More locomotives and more types Play with the task requirements Longer time schedules Remove the unit time assumption and introduce a travel duration on each track Bigger map

Вам также может понравиться