Docstoc

The Locomotive Problem

Document Sample
The Locomotive Problem Powered By Docstoc
					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        start time        deadline        duration      tonnage      horse power # locomotives
       a                  1              20               3       40000          3500             1
       b                  5              15               1         none         4000             1
       c                  5              25               3       10000          none         none
       d                 22              42               2       18000          3750         none
       e                 22              60               7         none         none             1
        f                 1              55               3         1000         1800             5
       g                  1              40               3         9000         2000             1
       h                 18              43               4         none         3500             1
        i                23              27               1         2500         1000             2
        j                 1              60              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        start time       deadline        duration     tonnage      horse power # locomotives
         a                 1              20              3       40000          3500           1
         b                 5              15              1         none         4000           1
          f                1              55              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   Source     Target  Countdown
     1        SD-70     1      Quebec Winnipeg      45
     2        SD-90     1      Montreal Toronto     12
     3        SD-90     1     Hamilton Toronto      30
     4        SD-70     1     Winnipeg Winnipeg     23
     5        SD-90     1      Calgary Toronto       2
         Train Station Properties
Maintenance capacity         Storage Capacity
Station     Max Capacity      Station     Max Capacity
Vancouver                4    Vancouver               4
Calgary                  2    Calgary                 0
Saskatoon                0    Saskatoon               0
Winnipeg                 5    Winnipeg                2
Thunder Bay              1    Thunder Bay             0
Windsor                  3    Windsor                 0
London                   1    London                  0
Hamilton                 0    Hamilton                0
Toronto                  5    Toronto                 5
Kingston                 1    Kingston                0
Ottawa                   2    Ottawa                  0
Montreal                 4    Montreal                3
Quebec                   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   Cost ($)
a             9000
b             3000
c             3000
e            21000
g             9000
h            12000
i             3000


Task   Cost ($)
a              9000
c              9000
d              6000
e             21000
f              9000
g              9000
h             12000
i              3000
j             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                    Cost ($)
      Vancouver - Calgary                 1000
      Calgary - Saskatoon                 1000
      Saskatoon - Winnipeg                1000
      Winnipeg - Thunder Bay              1000
      Thunder Bay - Windsor               1000
      Windsor - London                    1000
      London - Hamilton                   1000
      Hamilton - Toronto                  1000
      Toronto - Kingston                  1000
      Kingston - Ottawa                   1000
      Ottawa - Montreal                   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          Number   Source       Target        Countdown
        1         SD-70          1      Quebec       Winnipeg        45
        2         SD-90          1      Montreal      Toronto        12
        3         SD-90          1     Hamilton       Toronto        30
        4         SD-70          1     Winnipeg      Winnipeg        23
        5         SD-90          1      Calgary       Toronto         2




Groups            Type       Number   Source        Target        Countdown
  g1 "critical"      SD-70       1      Quebec          none          45
  g2 "critical"      SD-90       1      Montreal        none          12
  g3 "critical"      SD-90       1     Hamilton         none          30
  g4 "critical"      SD-70       1     Winnipeg         none          23
  g5 "critical"      SD-90       1      Calgary         none           2
g6 "not-critical"    SD-70       0       none         Winnipeg       none
g7 "not-critical"    SD-90       0       none          Toronto       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 inter-
  group 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 inter-
  group 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

				
DOCUMENT INFO