Upload
khangminh22
View
0
Download
0
Embed Size (px)
Citation preview
� 1
�
�
s
��2011�RAS�Problem�Solving�Competition�Train�Design�Optimization���DISCLAIMER:�The�problem�presented�here�exemplifies�one�of�several�opportunities�for�Operations�Research�application�in�the�Railway�industry.�We�have�simplified�a�realͲlife�problem�for�this�competition.�More�general�problems�and�related�literature�is�available�on�the�competition�webͲsite�under�the�section�Related�Literature.�Best�of�luck�for�the�competition.�����������������
���
�
�
� 2
Definitions���
Block:�A�set�of�railcars�that�are�being�moved�as�a�single�group�or� lot�from�one�rail�yard�to�another,�where�the�individual�cars�within�the�block�can�have�a�disparate�set�of�origins�and�destinations.�Rail�yards�assemble�these�blocks�based�on�the�final�destinations�of�the�railcars�and�other�compatible�attributes.�
Blocking:�Similar� to�airline�and� lessͲthanͲtruck� load� industries,�a� set�of� cars� can�be�aggregated� to�create�a�block�at�a�yard,�then�separated�into�individual�cars�at�a�subsequent�yard�and�again�aggregated�with�different�cars�into�a�different�block.�This�process�of�aggregation�and�separation�of�cars�is�variously�referred� to� as�Blocking,� Classification,� or�Marshalling.� Classification� improves� the� efficiency� of� railcar�transportation�by�providing�a�way�to�aggregate�individual�railcar�movements�into�larger�groupings,�what�can�then�be�formed�into�trains.��For�an�individual�railcar,�the�classification�process�can�happen�multiple�times�at�a�sequence�of�intermediate�yards�before�a�car�reaches�its�destination.��
Block�swap:�A�Block�swap�is�defined�as�transferring�a�block�between�trains�without�reͲclassification�of�cars�at�yards.� � In�effect,� the�entire�block�or� lot�of�cars� remains�coupled� together�and� is�moved�en�masse�to�another�train.� �This�allows�a�block�to�use�more�then�one�train�to�reach� its�destination,�while�requiring�less�classification�work�when�the�railcars�are�moved�from�one�train�to�another.�
Crew�segment:�Railroad�crews�typically�drive�trains�between�a�fixed�pair�of�locations,�called�a�“crew�district”�or�“crew�segment.”�A�North�American�freight�train�will�generally�cross�multiple�crew�segments,�and� thus�use�multiple�crews�as� it� traverses� its� route.� �Thus,�a�crew� segment� is�a� link�on� the�network�between�two�nodes�on�which�a�crew�can�operate�a�train.�
SingleͲended�territory:�Crews�are�typically�domiciled�at�a�specified� location�at�one�end�of�the�crew�segment.� �The�crew�segments�are�designed�such� that� it� is�a� full�day�work� to�get� from�one�end� to� the�other.� �Thus�crews�typically�work�from�the�“home”�terminal�(where�they�are�domiciled)�to�the�“away”�terminal�one�day,�and�then�return�the�next�day.�A�singleͲended�territory�has�crews�domiciled�at�only�one�end�of�the�crew�segment,�and�thus�has�one�home�and�one�away� location.� �As�noted�above,�crews�can�take� a� train� either� from� home� to� away� location� or� away� to� home� location� on� a� preͲdefined� crew�segment.���
Railcar:�In�the�railroad� industry,�a�railcar� is�also�referred�as�railroad�car,�railway�car,�car,�or�wagon.�On� a� freight� railroad,� railcars� are� loaded� with� freight,� coupled� with� other� railcars� to� form� a� train.�Subsequently,� locomotive(s)� are� used� to� transport� the� train� between� required� rail� yards.� For� this�competition,�we�assume�only�one�type�of�railcar�even�though�numerous�types�are�used�in�practice.����
Railroad�Network:�A� railroad�network� can�be� abstractly� represented�by� a� set�of�nodes� and� links.�Nodes�represent�physical� locations�on� the�network�such�as�rail�yards�and�reference�points�called�mile�posts,�where�as�links�correspond�to�the�rail�track�connecting�the�nodes.��
Trip� Plan:� A� trip� plan� is� the� itinerary� that� a� railcar�will� follow� as� it�moves� from� its� origin� to� its�destination.� �This� includes� information�on�the�sequence�of�blocks�the�railcar�will�use�to�move�from� its�origin� to� its� destination,� the� trains� that� are� used� to� transport� these� blocks,� and� the� timing� of� these�movements.��A�railcar�trip�plan�is�analogous�to�a�passenger�itinerary�in�the�airline�industry.��
� 3
Problem�Description�
�
While� the� freight� railroad� industry� has� been� in� existence� for� over� two� centuries,� the�fundamental�concept�of�aggregating� freight�railcars�based�on�different�attributes� to�create�blocks�and�subsequently�combining�blocks�to�create�trains�has�not�changed.�Freight�railroads�receive�requests�from�customers�to�transport�cars.�Upon�receiving�the�request,�based�on�each�car’s�attributes�(such�as�physical�dimensions,�freight�type,�etc.),�the�railway�generates�a�trip�plan�detailing�the�movement�of�the�car�from�the�customer’s�origin�location�to�the�requisite�final�destination.��
Trip� plans� are� generated� based� on� the� operating� plan.� � Two� of� the�main� components� of� an�operating�plan�are:�
a) What�blocks�are�to�be�made�at�each�rail�yard,�and�which�railcars�are�to�be�placed�into�each�block�(Block�Design)?��
Please�refer�to�[1]�for�more�information�about�the�Block�Design�Optimization.�
b) What�trains�are�to�be�operated,� including�which�blocks�are�to�be�transported�by�each�train�(BlockͲToͲTrain�Assignment,�BTA)�and�what� routes�are� to�be� followed�by�each� train� (Train�Routing)?�
Please�refer�to�[9]�for�additional�information�about�BTA�problem.��
Train� routing� includes� identifying� the�origin,�destination�and� route� for�each� individual�train,� such� that� these� routings� are� consistent�with� the� rail�network� and� the�blocks� to�be�transported.�Along�its�route,�a�train�can�visit�different�yards�to�either�(a)�pickup�block(s),�(b)�setͲoff�block(s),�or�(c)�both�setͲoff�and�pickup�blocks.�
Both�of� these�elements�of� the�operating�plan�are�generally�designed�at�a� tactical� level,�which�means�that�the�plan� is�created�a�few�weeks�to�a�few�months� in�advance�of� it�being�operated,�and�the�plan�is�then�followed�and�adjusted�as�necessary�during�actual�operation.�
In�this�competition,� it� is�assumed�that�the�blocks�made�at�each�of�the�yards�have�already�been�determined�and�cannot�be�changed.�Hence,�the�block�attributes�such�as�origin,�destination,�number�of�cars,�length�and�tonnage�is�given�information.�
The�research�problem� to�be�addressed� in�this�competition� is�related�to�addressing�the�second�component�of�operating�plan�design,�which�includes�BlockͲToͲTrain�Assignment�(BTA)�and�Train�Routing.�This�component�is�also�referred�to�as�“Train�Design”.��
�
Train�design�is�one�of�the�most�fundamental�and�difficult�problems�encountered�in�the�railroad�industry.� A� Class� I� railroad� can� daily� operate� around� 200� merchandise� trains,� which� follow� a� preͲdetermined�schedule.�These�trains�transport�close�to�1,000�blocks�by�picking�up�or�setting�off�blocks�at�
� 4
180�to�200� locations.�Approximately,�400�to�500�crews�are� involved� in�moving�the�merchandise�trains�from� corresponding� origin� to� destination� locations.� This� complex� problem� has� huge� potential� for�benefiting�from�the�application�of�Operations�Research.�Identifying�the�optimal�routes�for�the�trains,�and�associated� BlockͲToͲTrain� assignments,� subject� to� different� capacity� and� operational� constraints,� is�called�Train�Design�Optimization.�Operational�and�capacity�constraints�involved�in�this�problem�include:��
a) Blocks� per� train:� A� train� is� constrained� by� the�maximum� number� of� blocks� it� can� carry.�Assigning�too�many�blocks�to�a�train�may�result�in�an�excessive�number�of�train�stops,�which�is�discouraged�for�operational�efficiency.�
b) Block�swaps�per�block:�Each�block�is�constrained�by�the�maximum�number�of�times�it�can�be�block� swapped.� Even� though� theoretically� block� swaps� are� efficient,� from� a� practical�perspective,�it�requires�additional�time�and�resources.�
c) Work� events� per� train:� Each� time� a� train� is� stopped� enͲroute� to� either� pickup� or� setͲoff�blocks,� it� is� called� a� work� event.� If� a� train� performs� both� pickups� and� setͲoffs� at� an�intermediate� yard,� then� it� is� considered�one�work� event.�Work� events� are� costly�both� in�terms�of�carrying�out�the�tasks�of�adding�and�removing�the�blocks,�but�also�in�terms�of�train�delay�(to�the�cars,� locomotives,�and�crew�that�are�on�the�train)�and�potential�consumption�of�network�capacity�while� the� train� is� stopped.�Work�events�as�defined�here�are�only� the�intermediate�stops,�and�do�not�include�the�origination�or�termination�events�for�the�train.�
d) Train�length�and�tonnage�restriction�by�link:�Depending�on�geographical�and�track�attributes,�certain�sections�of�the�railroad�have�limitations�on�the�maximum�train�length�and�tonnage.�Train�tonnage�refers�to�the�weight�of�the�train.�
e) Number�of�trains�passing�through�a�link:�In�order�to�avoid�congestion�on�certain�links�of�the�rail�network,�links�are�constrained�by�the�maximum�number�of�trains�passing�through�either�by�direction�or�for�both�directions�on�a�combined�basis.�
f) Crew� originating� and� terminating� yards:� Crews� can� only� travel� on� preͲdetermined� crew�segments�and�every�train�has�to�be�assigned�to�a�crew�on�each�crew�segment.��As�a�result,�all�trains�must�originate�at�the�start�of�a�crew�segment,�and�terminate�at�the�end�of�a�crew�segment,�even�if�this�means�that�they�have�to�move�part�of�the�way�along�a�crew�segment�without�carrying�any�blocks�or�railcars.�
�
� Different�crew�segments�are�governed�by�different�union�agreements�in�the�railroad�industry.�At�times,� these� union� agreements� get� very� complicated.� For� this� competition,�we� assume� a� simplified�version� of� the� crew� segments� (which� are� called� singleͲended� territories)� across� the�whole� network.�Trains�can� travel�across�multiple�crew�segments.�Crew� Imbalance�on�a�crew�segment� is�considered�as�the�absolute�difference�between�number�of�trains�going�from�A�to�B�and�number�of�trains�going�from�B�to�A.�Crew� imbalance�results� in�additional�expense� for�repositioning� the�crews�using�an�overͲtheͲroad�taxi�service.��
�
� 5
The�objective�of�Train�Design�Optimization�problem�is�to�minimize�the�sum�of:��
a) Train�start�cost:�Product�of�total�number�of�trains�created�and�each�train�start�cost.��
b) Train�travel�cost:��Product�of�train�travel�miles�and�train�travel�cost�per�mile�
c) Car�travel�cost:�Product�of�car�travel�miles�and�car�travel�cost�per�mile�(cars�to�be�based�on�the�number�of�cars�specified�to�be�in�each�block)�
d) Work�events�cost:�When�a� train�stops�at�an� intermediate� location� to�either�pickup�and/or�setͲoff�a�block,�it�is�considered�as�a�work�event.�Sum�of�all�the�individual�work�events�across�all�the�trains�multiplied�by�the�cost�per�work�event�is�considered�as�the�work�events�cost.��
e) Blocks�swap�cost:�Sum�of�block�swap�costs�across�all�the�blocks�
f) Crew�imbalance�cost:�Product�of�number�of�imbalance�crews�and�crew�imbalance�penalty�
g) Trains�imbalance�cost:�Product�of�trains�imbalance�and�train�imbalance�penalty�
h) Missed�cars�cost:�A�block�is�considered�to�be�missed�if�the�block�is�not�transported�from�its�origin�to�destination.�Total�number�of�missed�cars� is�the�sum�of�cars� in�each�of�the�missed�block.�Missed�cars�cost� is�the�product�of�total�number�of�missed�cars�and�missed�cost�per�railcar.��
�
Train� design� problem� is� highly� combinatorial� in� nature� and� a� very� complex� optimization�problem.�Several�attempts�have�been�made�in�the�past�to�solve�special�cases�of�the�problem�(Assad�[2],�Keaton� [10,� 11],� Crainic� and� Rosseau� [4],� Haghani� [7,� 8],� Gorman� [6],� Newman� and� Yano� [12,� 13],�Carpara�et.�al.�[3,�and�Dorfman�and�Medanic�[5]).�These�approaches�vary�in�terms�of�cost�and�business�constraints� considered� and� the� size� of� the� underlying� problem� instances.
� 6
Example�
This�example�considers�a�railroad�network�with�four�nodes�as�depicted�in�Figure�1.�Block�pickup�and�setͲoff�cost�information�is�provided�for�each�of�the�nodes�in�Table�1.�
�
�
�
�
�
�
Figure�1.�Railroad�Network�
�
Node� Block�Swap�Cost�
A� 30�
B� 50�
C� 50�
D� 70�
Table�1.�Pickup�and�setͲoff�cost�($)�at�different�nodes�in�the�network�
In�this�example,�five�blocks�are�made�and�their�corresponding�information�is�presented�in�Table�2.�
BlockID� Origin� Destination� #�of�Cars� Total�Length�(Feet)�Total�Tonnage�
(Tons)�Shortest�Distance�
(Miles)�
Block1� A� C� 50� 3000� 2500� 105�
Block2� A� D� 25� 1500� 1250� 45�
Block3� B� D� 40� 2400� 2000� 90�
Block4� D� A� 28� 1680� 1400� 45�
Block5� D� B� 16� 960� 800� 90�
Table�2.�Blocks�information�
�
50�
55�
65�
9045�
A� B�
C�D�
� 7
Origin� Destination� Distance�(Miles)� Max�Train�Length(Feet)� Max�Tonnage�(tons)� Max�#�of�Trains�
A� B� 50� 8000� 10000� 3�
A� D� 45� 5000� 11000� 4�
B� C� 55� 9000� 9000� 5�
B� D� 90� 8500� 10000� 4�
C� D� 75� 9200� 11000� 4�
Table�3.�Network�and�Capacity�information�
�
Network�and� link�capacity�restrictions�are�provided� in�Table�3.�All�the�distances�are�assumed�to�be�symmetrical� and� all� links� biͲdirectional.� For� example,� link� B� to�A� is� 50�miles� and� subject� to� capacity�constraints�the�same�as�link�A�to�B.�
Crew� segments� information� is�presented� in�Table�4.� If�a� train’s� route� is�AͲ>BͲ>C,� then�a� crew�from�crew�segment�(B�–�A)�is�assigned�to�the�train�from�A�Ͳ>�B�at�A�and�subsequently�a�crew�from�crew�segment� (B�–�C)� is�assigned� to� the� train� from�B� Ͳ>�C�at�B.�While�a� train� crosses�over� from�one� crew�segment�to�the�other,�the�onboard�crew�gets�off�the�train�and�a�new�crew�gets�onboard.�Further,�crew�segments�are�biͲdirectional.�Hence,�crews�in�crew�segment�A�–�D�can�take�a�train�from�either�A�to�D�or�D�to�A.�Furthermore,�crew�can�only�travel�on�the�shortest�path�between�Node1�and�Node2.���
�
Node1� Node2�
A� D�
B� A�
B� D�
B� C�
D� C�
Table�4.�Crew�segments�information�
�
�
�
�
� 8
Other�input�parameters�for�this�optimization�problem�are�provided�in�Table�5.�
Parameters� Values�
Crew�Imbalance�Penalty�per�imbalance� $600�
Train�Imbalance�Penalty�per�imbalance� $1000�
Train�travel�cost�per�mile� $10�
Car�travel�cost�per�mile� $0.75�
Cost�per�work�event� $350�
Maximum�Blocks�per�train� 8�
Maximum�Block�swaps�per�block� 3�
Maximum�intermediate�work�events�per�train� 4�
Train�start�Cost� $400�
Missed�cost�per�railcar� $5000�
Table�5.�Other�Optimization�Parameters�
� 9
Feasible�solution�
In�this�feasible�solution,�three�trains�are�created�to�transport�the�blocks�as�displayed�in�Table�6.�Train1�travels�from�yard�A�to�yard�D�after�picking�up�75�cars�at�yard�A.�Later,�Train1�arrives�at�yard�D,�drops�off�75�cars�and�picks�up�28�cars.�Subsequently,�Train1�travels�from�yard�D�to�yard�A�with�the�28�cars.�Similarly,�Train2�and�Train3�travel�between�the�rail�yards�to�transport�the�cars.�The�total�train�miles�in� this�example�are�335�miles.�Also,�Train1�and�Train�2� stop�at� the�common� intermediate�node�D.�At�node�D,�both� the� trains�either�pickup�and/or� setͲoff�blocks�and� is�collectively�called�as�a�work�event.�Hence,�the�total�number�of�workͲevents�done�by�all�the�trains�is�2.��
�
Train�Name� Sequence� Node�Cumulative�
Miles�SetͲoff�cars�
PickͲup�cars�
Outbound�cars�
Crew�Change�Flag�
Train1� 1� A� 0� 0� 75� 75� No�
Train1� 2� D� 45� 75� 28� 28� No�
Train1� 3� A� 90� 28� 0� 0� No�
Train2� 1� B� 0� 0� 40� 40� No�
Train2� 2� D� 90� 40� 50� 50� Yes�
Train2� 3� C� 155� 50� 0� 0� No�
Train3� 1� D� 0� 0� 16� 16� No�
Train3� 2� B� 90� 16� 0� 0� No�
Total�Train�Miles� 335� �
Table�6.�Train�Routes�Solution�
�
BlockͲToͲTrain�Assignment� information� is�provided� in�Table�7.� For�example,�Block1� travels�on�Train1�from�yard�A�to�yard�D.�Car�miles�(2,250)�for�A�to�D�segment�for�Block1� is�the�product�of�A�to�D�segment�miles� (45)�and�the�number�of�cars� (50)� in�Block1.� In�other�words,�car�miles� for�a�block� is�the�product�of� the�block� travel�distance�and� the�number�of�cars� in� the�block.�Subsequently,� the� total�car�miles�is�the�sum�of�individual�car�miles�of�the�blocks.�In�addition,�this�BlockͲToͲTrain�Assignment�solution�satisfies�the�maximum�number�of�block�swaps�constraint�as�presented� in�Table�5.�For�example,�Block1�travels� on� two� different� trains� resulting� in� one� block� swap.� This� feasible� solution� also� satisfies� the�constraint�that�a�train�can�carry�atmost�10�blocks.�Block�swap�costs�at�the�intermediate�nodes�for�a�block�are�presented�in�Table�7.�For�example,�Train1�setsͲoff�Block1,�which�is�subsequently�picked�up�by�Train2�at�node�D.�Hence�a�block�swap�cost�at�node�D� is�assigned�to�Block1.�Note�that�block�swap�cost� is�not�assigned�at�the�origin�or�destination�of�block.��
� 10
Block� Sequence� Train� Start�Node� End�Node� Block�Swap�Cost� Segment�Miles� #�of�Cars� Car�Miles�
Block1� 1� Train1� A� D� 70� 45� 50� 2,250�
Block1� 2� Train2� D� C� 0� 65� 50� 3,250�
Block2� 1� Train1� A� D� 0� 45� 25� 1,125�
Block3� 1� Train2� B� D� 0� 90� 40� 3,600�
Block4� 1� Train1� D� A� 0� 45� 28� 1,260�
Block5� 1� Train3� D� B� 0� 90� 16� 1,440�
Total�costs� 70� � 12,925�
Table�7.�BlockͲToͲTrain�Assignment�Solution�
�
Table�8.�presents�crew�to�train�assignment�information.�For�Train1,�a�crew�is�assigned�from�AͲD�and�the�same�crew�takes�Train1�from�DͲA.�Hence,�the�forward�and�reverse�directions�values�for�Train1�are�both�1.�Similarly,�for�Train2,�a�crew�is�assigned�from�BͲD�and�another�crew�is�assigned�from�DͲC.��
Crew�Dist� TrainID� Forward� Reverse�
A�Ͳ�D� Train1� 1� 1�
B�Ͳ�D� Train2� 1� 0�
D�Ͳ�B� Train3� 1� 0�
D�Ͳ�C� Train2� 1� 0�
Table�8.�Crew�to�Train�Assignment�
Table�9.�presents�the�crew�imbalance�information,�which�is�created�using�the�information�from�Table�4.�For�example,�Train1�travels�from�yard�A�to�yard�D,�which�is�also�a�crew�segment.�Hence,�A�Ͳ>�D�can�be�considered�as�Direction�I�in�Table�9.�Subsequently,�D�Ͳ>�A�is�considered�as�Direction�II.�Direction�I�#�of� trains� represents� the� count�of�all� the� trains� traveling� from�A� Ͳ>�D� in�Table�6� that� require�a�crew�change� at� yard�A� and� yard�D.� Similarly,�Direction� II� #�of� trains� represents� the� count�of� all� the� trains�traveling�from�D�Ͳ>�A�that�require�a�crew�change�at�yard�D�and�yard�A.�In�Table�9,�Crew�Imbalance�for�the�segment�A�Ͳ>�D�and�D�Ͳ>�A�is�the�absolute�difference�between�Direction�I�and�Direction�II�#�number�of�trains.�As�we�consider�the�absolute�difference�between�the�forward�and�reverse�number�of�trains,�it�does�not�matter�which�direction�is�considered�as�the�forward�direction.��
�
�
� 11
Direction�I� Direction�II�Direction�I�#�of�Trains�
Direction�II�#�of�Trains�
Crew�Imbalance�
A�Ͳ>�D� D�Ͳ>�A� 1� 1� 0�
B�Ͳ>�D� D�Ͳ>�B� 1� 1� 0�
D�Ͳ>�C� C�Ͳ>�D� 1� 0� 1�
� Total�Crew�Imbalance� 1�
Table�9.�Crew�Imbalance�Information�
�
Table�10.�presents�the�train� imbalance� information,�which� is�extracted� from�Table�6.� In�Table�6.� it�can�be�observed�that�one�train�originates�at�each�of�the�yards�A,�B�and�D.�The�intermediate�stops�of�the�trains�are�not�considered�in�this�calculation.�Similarly,�one�train�terminates�at�each�of�the�yards�A,�B�and�C.� As� one� train� terminates� at� yard� C� but� no� train� originates� there,� yard� C� has� a� train� surplus� or�imbalance.�Similarly,�yard�D�has�a�train�deficit�or�imbalance.����
�
Yard�Originating�
Trains�Terminating�Trains�
Train�Imbalance�
A� 1� 1� 0�
B� 1� 1� 0�
C� 0� 1� 1�
D� 1� 0� 1�
Total�Train�Imbalance� 2�
Table�10.�Train�Imbalance�Information�
�
The�objective�function�is�composed�of�four�different�components�
a) Train�start�cost�is�3�(Number�of�train)�*�400�(Table�5)�=�$1,200�
b) Train�travel�cost�is�335�(Table�6)�*�10�(Table�5)�=�$3,350�
c) Car�travel�cost�is�12,925�(Table�7)�*�0.75�(Table�5)�=�$9,693.75�
d) Work�event�cost�is�2�(Number�of�train�work�events)�*�350�(Table�5)�=�$700�
e) Block�Swap�cost�is�70�(Table�7)�=�$70�
� 12
f) Crew�imbalance�cost�is�1�(Table�9)�*�600�(Table�5)�=�$600�
g) Train�imbalance�cost�is�2�(Table�10)�*�1000�(Table�5)�=�$2,000�
h) Missed�cars�cost�is�0�(Total�number�of�missed�cars)�*�5000(Table�5)�=�$0�
The�final�objective�function�value�is�$17,613.75.�
� 13
References [1]�R.K.�Ahuja,�K.C.�Jha,�and�J.�Liu.�Solving�realͲlife�railroad�blocking�problems.�Interfaces�37�(2007),�
404Ͳ419.�
[2]�A.A.�Assad.�Models�for�rail�transportation.�Transportation�Research�14A�(1980),�205Ͳ220.�
[3]� A.� Carpara,�M.� Fischetti,� and� P.� Toth.�Modeling� and� solving� the� train� timetabling� problem,�Operations�Research�50�(2002),�851Ͳ861.�
[4]�T.G.�Crainic,�and� J.M.�Rousseau.�Multicommodity,�miultimode� freight�transportation:�A�general�modeling�and�algorithmic�framework�for�the�service�network�design�problem.�Transportation�Research�208�(1986),�225Ͳ242.�
[5]�M.J.�Dorfman,� and� J.�Medanic.� Scheduling� trains�on� a� railway�network�using� a�discrete� event�model�of�railway�traffic,�Transportation�Research�B,�38�(2004),�81Ͳ98.�
[6]�M.F.�Gorman.�The� freight� railroad�operating�plan�problem.�Annals�of�Operations�Research�78�(1998),�51Ͳ69.�
[7]�A.E.�Haghani.�Rail�freight�transportation:�A�review�of�recent�optimization�models�for�train�routing�and�empty�car�distribution.�Journal�of�Advanced�Transportation�21(1987),�147Ͳ172.��
[9]�K.C.� Jha,�R.K.�Ahuja,�and�G.� Sahin.�New�Approaches� for�Solving� the�BlockͲtoͲTrain�Assignment�Problem,�Networks�51�(2008),�48Ͳ62.�
[8]�A.E.�Haghani.�Formulation�and�solution�of�a�combined�train�routing�and�makeup,�and�empty�car�distribution�model.�Transportation�Research�23B�(1989),�433Ͳ452.�
[10]�M.H.�Keaton.�Designing�optimal� railroad�operating�plans:� Lagrangian� relaxation�and�heuristic�approaches.�Transportation�Research�23B�(1989),�415Ͳ431.�
[11]� M.H.� Keaton.� Designing� optimal� railroad� operating� plans:� A� dual� adjustment� method� for�implementing�Lagrangian�relaxation.�Transportation�Science�26�(1992),�262Ͳ279.�
[12]�A.M.�Newman,�and�C.A.�Yano.�Direct�and�indirect�trains�and�containers�in�an�intermodal�setting,�Transportation�Science�34�(2000),�256Ͳ270.�
[13]�A.M.�Newman,�and�C.A.�Yano.�Scheduling� trains�and� containers�with�due�dates�and�dynamic�arrivals,�Transportation�Science�35�(2001),�181Ͳ191.�
A Network-Oriented Formulation and Decomposition
Approach to Solve the 2011 RAS Problem
Team: Koppa { (short bios)
Leonardo Lozano, Jaime E. Gonzalez
Advisor: Andres L. Medaglia
Centro para la Optimizacion y Probabilidad Aplicada. (http://copa.uniandes.edu.co/)
Departamento de Ingenierıa Industrial, Universidad de Los Andes, Bogota, Colombia
{leo-loza,je.gonzalez30} @uniandes.edu.co
1 Introduction
Our solution strategy decomposes the original problem into two subproblems: the first one, called the
Train Design Problem, defines the set of train routes; and the second one, called the Block-To-Train
Assignment, assigns blocks to the train routes. Following this solution strategy (see Figure 1) we were
able to achieve provably high quality solutions under one minute for data set 1, and under four minutes
for data set 2.
Train Design Problem
Block-To-Train Assignment
Figure 1: High-level solution strategy
2 Train Design Problem
The Train Design problem comprises three steps: Crew Demand Estimation, Train Route Generation,
and Train Route Selection (see Figure 2).
Crew Demand
Estimation
Train Route Generation
Train Route Selection
Train Design Problem
Figure 2: The three-step solution procedure for the Train Design Problem
1
2.1 Crew Demand Estimation
After analyzing the data, we noticed that the cost of missed cars and block routes are considerably
higher than all other costs. For instance, the cost of not carrying a single block is equivalent to the
cost of hundreds of train miles. Similarly, the cost of a block route following its shortest path is even
higher than the total cost of several train routes. Based on this cost analysis, we focus on selecting a
set of routes that provide shortest paths for the most valuable blocks.
To select this set of routes, we first decide whether or not to move a given block to its destination.
If we decide to move the block, we find the best route such that all (route) arcs belong to a crew
segment and it meets some upper bound (arc) capacities. In order to define the crew segments we used
an implementation of Dijkstra’s shortest path algorithm to find the minimum distance for each crew.
Then, we used a recursive algorithm to enumerate all possible alternative crew paths and assigned
one unique path to each crew. Using the block shortest paths and the crews that cover those arcs, we
calculate a demand for the crew segments needed to ideally route all (transportable) blocks through
their shortest paths. Note that a given block might not be transported to its destination either if it is
impossible to move it through the existent crew segments or if the penalty for not carrying the block
is less expensive than the block’s shortest path.
Let G = (N ,A) be a directed graph, where N represents the set of nodes (ni
2 N ) and A =
{(i, j)|ni
2 N , n
j
2 N , i 6= j} the set of arcs. Let B = {1, . . . , |B|} be the set of blocks and C =
{1, . . . , |C|} the set of numbered crews. As it is customary in network flows, parameter o
b
i
takes the
value of +1,�1, or 0, depending on whether node n
i
serves as origin, destination, or transshipment
for block b, respectively. Let c
b
, tb
, and l
b
be the number of cars, tonnage, and length for block b,
respectively. Let dij
, tij
, lij
, and r
ij
, denote the traversal distance, maximum train tonnage, maximum
train length, and maximum number of train routes over any given arc (i, j) 2 A. Let aqij
be a binary
parameter that takes the value of 1 if arc (i, j) 2 A belongs to the shortest path (precomputed at
initialization) for crew q; it takes the value of 0, otherwise. Let ↵ and � be the missed car cost and
the car travel cost per mile, respectively. Let xb
ij
be a binary (decision) variable that takes the value
of 1 if block b traverses arc (i, j) 2 A; it takes the value of 0, otherwise. Let vb
be a binary (decision)
variable that takes the values of 1 if block b is transported to its destination; it takes the value of 0,
otherwise. The Crew Demand Estimation problem follows:
minimizeX
b2B(c
b
· ↵(1� v
b
)) +X
(i,j)2A
X
b2B� · c
b
· dij
· xb
ij
(1)
2
subject to
X
{j:(i,j)2A}
x
b
ij
�X
{j:(j,i)2A}
x
b
ji
= o
b
i
· vb
n
i
2 N , b 2 B (2)
x
b
ij
X
q2Ca
q
ij
(i, j) 2 A, b 2 B (3)
X
b2Bx
b
ij
· lb
l
ij
· rij
(i, j) 2 A (4)
X
b2Bx
b
ij
· tb
t
ij
· rij
(i, j) 2 A (5)
x
b
ij
· lb
l
ij
(i, j) 2 A, b 2 B (6)
x
b
ij
· tb
t
ij
(i, j) 2 A, b 2 B (7)
x
b
ij
2 {0, 1} (i, j) 2 A, b 2 B (8)
v
b
2 {0, 1} b 2 B (9)
The objective (1) minimizes the total missed car cost plus the total car travel cost. The network
balance constraints (2) assure that blocks that travel, depart from their origin and arrive to their
destination. The set of constraints (3) guarantees that arcs with flow must be covered by a crew
segment. Constraints (4) and (5) limit the flow of blocks over a given arc so that it does not exceed
aggregated weight and length capacities (e.g., multiple trains). Constraints (6) and (7) assure that a
single block does not exceed the weight and length arc capacities. Finally, the set of constraints (8)
and (9) define the binary nature of the decision variables.
To estimate the crew demand, we solve the model defined by (1)-(9) to obtain the shortest paths
for the transported blocks. Because each arc in a block (shortest) path belongs to one or more crews,
it can be seen as if each arc in the path demands a subset of crews. After traversing all the block
(shortest) paths, we obtain an estimate of the crew demand. Furthermore, we can also use the output
of the model to define a proxy on the number of trains required to cover a given arc (denoted by p
ij
)
as follows:
p
ij
= max
&Pb2B x
b
ij
· tb
t
ij
+�
',
&Pb2B x
b
ij
· lb
l
ij
+�
'!(10)
where the two terms in the max operator account for the number of trains required to cover the arc
considering only weight and length, respectively. Note that the correction parameter � compensates
3
the fact that the block’s weight and length are not divisible and the blocks should be packed as a whole
among the trains that cover the arc. To illustrate how � works, let us consider an example with 3
blocks of 40 tons and 1 block of 20 tons that need to flow through an arc constrained by trains of up
to 50 tons. Without �, pij
takes the value of 3, but given the (indivisible) nature of the blocks, it is
not impossible to pack all blocks using 3 (= d 140
50
e) trains, but 4 (one train per block).
2.2 Train Route Generation
We created a large pool of random train routes that use the demanded crews (both forward and reverse
crews) found by the Crew Demand Estimation problem. The random train route generator works as
follows: select a random starting crew; select a second random crew with the start node matching the
end node of the first crew; repeat the matching process until a given number of Cmax
crews form the
train route (loops are allowed), but discard those routes with more than N
max
nodes. The random
train route generator stops after generating R
max
routes.
2.3 Train Route Selection
The third step comprises a set covering problem that selects from the pool of train routes those that
minimize the block-independent costs (i.e., train start, crew imbalance, train imbalance, and train
travel cost), subject to the crew demand satisfaction. Aside from sets N , A, C, and parameter a
q
ij
defined in the Crew Demand Estimation problem, let R = {r1
, . . . , r
k
, . . . , r
R
max
} be the set of train
routes (pool) and C(rk
) the set of crews that belong to route r
k
. The parameter dk
denotes the train
miles traveled by route r
k
; the binary parameter oki
(eki
) takes the value of 1 if node n
i
is the origin
(destination) for route r
k
(takes the value of 0, otherwise); and the binary parameter f
k
q
takes the
value of 1 if forward crew q belongs to route r
k
(takes the value of 0, otherwise). Let fk
q
0 be the same
as f
k
q
but for the reverse crews (where q
0 is the associated reverse crew for q). The parameters �, �,
✓, and µ denote the train travel cost, train start cost, train imbalance cost, and crew imbalance cost,
respectively. Let u
k
be a binary (decision) variable that takes the value of 1 if route r
k
is selected;
it takes the value of 0, otherwise. Let z
+
i
, z�i
, c+q
, and c
�q
be upper (labeled +) and lower (labeled
�) deviations (variables) that account for the train and crew imbalance. The Train Route Selection
problem follows:
minimizeX
r
k
2R(d
k
· � + �)uk
+X
n
i
2N✓(z+
i
+ z
�i
) +X
q2Cµ(c+
q
+ c
�q
) (11)
4
subject to
X
r
k
2R
X
q2C(rk
)
a
q
ij
· uk
� p
ij
(i, j) 2 A (12)
X
r
k
2R
X
q2C(rk
)
a
q
ij
· uk
r
ij
(i, j) 2 A (13)
X
r
k
2Ro
ki
· uk
�X
r
k
2Re
ki
· uk
� z
+
i
+ z
�i
= 0 n
i
2 N (14)
X
r
k
2Rf
k
q
· uk
�X
r
k
2Rf
k
q
0 · uk
� c
+
q
+ c
�q
= 0 q 2 C (15)
u
k
2 {0, 1} r
k
2 R (16)
z
+
i
, z
�i
� 0 n
i
2 N (17)
c
+
q
, c
�q
� 0 q 2 C (18)
The objective (11) minimizes the sum of three cost terms, namely, the train travel (includes the
train start), the train imbalance, and the crew imbalance costs. The set of constraints (12) guarantees
the coverage of any given arc by a minimum number of trains p
ij
(output of the Crew Demand
Estimation problem in Section 2.1); while the set of constraints (13) limits the maximum number
of train routes per arc. Constraints (14) and (15) define the train and crew imbalance, respectively.
Finally, constraints (16)-(18) define the nature of the decision variables.
3 Block-To-Train Assignment (BTA) Problem
After deciding upon which train routes to operate, the next step is to allocate the blocks to the selected
train routes. To tackle the Block-To-Train Assignment (BTA) problem, we propose a graph-oriented
formulation, where some of the harder constraints are embedded in the network structure.
Let S be the set of yards; R be the set of trains; and G = (N ,A) be a directed graph, where N
and A represent the set of nodes and arcs, respectively. There is a node in N for every yard n
s
2 S,
namely, yard nodes. Let N (rk
) be the set of route nodes for train r
k
, where each node is represented
by a triple (ns
, r
k
, t), if train r
k
stops at yard n
s
at its sequence t. Hence, N = (S
r
k
2R N (rk
)) [ S.
The set of yard arcs is denoted by A(ns
) and comprise the arcs between a route node and the yard
n
s
. A traversal through these arcs represent that a train picks up or sets o↵ a block in that yard.
For every train r
k
, there is a set of route arcs A(rk
) connecting the route nodes in N (rk
). These arcs
model the physical movement of train r
k
between yards based on the sequence defined by the route.
5
Thus, A = (S
r
k
2R A(rk
)) [ (S
n
s
2S A(ns
)). For modeling purposes, we further define sets A1
(rk
),
A2
(rk
), and A3
(rk
). Let A1
(rk
) be the subset of arcs (connecting yards with route nodes) that involve
a work event for train r
k
due to a block pick up. Note that an arc that connects the origin yard with
the first route node of that train is not considered a work event since work events are only defined at
intermediate stops. Hence, A1
(rk
) ✓S
n
s
2S A(ns
). Similarly to A1
(rk
), let A2
(rk
) be the subset of
arcs that involve a work event for train r
k
due to a block set-o↵. Note that this subset does not include
arcs that involve setting o↵ blocks in the final route node of train r
k
. Thus, A2
(rk
) ✓S
n
s
2S A(ns
).
Lastly, let A3
(rk
) be the subset of arcs where train r
k
picks up a block. This subset is di↵erent from
A1
(rk
) because it includes arcs that connect the origin yard with the first route node of train r
k
.
Hence, A1
(rk
) ✓ A3
(rk
).
To illustrate our network representation, let us consider the example given in the 2011 RAS problem
statement. The solution comprises train route r1
following the sequence A-D-A, train route r2
visiting
yards B-D-C, and train route r3
visiting yards D-B. Thus, we define the set of trainsR = {r1
, r
2
, r
3
} and
the set of yard nodes S = {nA
, n
B
, n
C
, n
D
}. Figure 3 shows the BTA network representation. For this
instance, the sets linked to route r1
are defined as follows: N (r1
) = {(nA
, r
1
, 1), (nD
, r
1
, 2), (nA
, r
1
, 3)};
A(r1
) = {((nA
, r
1
, 1), (nD
, r
1
, 2)), ((nD
, r
1
, 2), (nA
, r
1
, 3))}; A1
(r1
) = {(nD
, (nD
, r
1
, 2))}; A2
(r1
) =
{((nD
, r
1
, 2), nD
)}; and A3
(r1
) = {(nA
, (nA
, r
1
, 1)), (nD
, (nD
, r
1
, 2))}. Additionally, the set of yard
arcs for yard B is A(nB
) = {(nB
, (nB
, r
2
, 1)), ((nB
, r
3
, 2), nB
)}.
Yard A Yard B Yard C Yard D
(1,3,3)n
A (1,3,3)n
B (1,3,3)n
C (1,3,3)n
D
(1,3,3)n
A
, r1, 1(1,3,3)n
A
, r1, 3 (1,3,3)n
B
, r2, 1 (1,3,3)n
B
, r3, 2 (1,3,3)n
C
, r2, 3 (1,3,3)n
D
, r1, 2 (1,3,3)n
D
, r2, 2 (1,3,3)n
D
, r3, 1
1
Figure 3: BTA network representation for the 2011 RAS problem statement example
To show how blocks traverse the network, let us suppose that a block needs to go from yard n
A
to yard n
C
. A possible solution is that train r
1
picks up the block at yard n
A
, flowing through arc
(nA
, (nA
, r
1
, 1)); then the block flows through arc ((nA
, r
1
, 1), (nD
, r
1
, 2)), moving physically from
yard n
A
to yard n
D
on train r
1
; then train r
1
sets o↵ the block at yard n
D
, flowing through
arc ((nD
, r
1
, 2), nD
); next, train r
2
picks up the block at yard n
D
and the block flow through arc
(nD
, (nD
, r
2
, 2)); then the block travels from yard n
D
to yard n
C
on train r
2
, flowing through arc
((nD
, r
2
, 2), (nC
, r
2
, 3)); finally, it arrives at its destination in yard n
C
flowing through arc ((nC
, r
2
, 3), nC
).
6
Note that trains r1
and r
2
have a work event at yard n
D
, and the block has a swap at yard n
D
.
Aside from the parameters previously defined, the BTA model defines sb
as the maximum number
of swaps allowed for block b; w denotes the maximum number of work events per train; and b denotes
the maximum number of blocks transported per train. The BTA model also defines additional cost
parameters related with the block routing plan as ⇢
i
, the swap cost at yard node n
i
2 S, and �, the
work-event cost.
Similarly to the Crew Demand Estimation problem, the BTA model considers xb
ij
, a binary-decision
variable that takes the value of 1 if block b flows through arc (i, j) (it takes the value of 0, otherwise);
and v
b
a binary decision variable that takes the value of 1 if block b is shipped (it takes the value of 0,
otherwise). In addition, let sbi
be a decision variable that takes the value of 1 if block b swaps at yard
node n
i
2 S (it takes the value of 0, otherwise); and let wk
i
be a decision variable that takes the value
of 1 if train r
k
has a work event at yard node n
i
2 S (it takes the value of 0, otherwise). The BTA
model follows:
min z =X
b2B(c
b
· ↵ · (1� v
b
)) +X
(i,j)2A
X
b2Bd
ij
· xb
ij
· cb
· � +X
n
i
2S
X
b2B⇢
i
· sbi
+X
n
i
2S
X
r
k
2R� · wk
i
(19)
subject to
X
{j:(i,j)2A}
x
b
ij
�X
{j:(j,i)2A}
x
b
ji
= o
b
i
· vb
n
i
2 N , b 2 B (20)
s
b
i
�
0
@X
{j:(i,j)2A}
x
b
ij
+X
{j:(j,i)2A}
x
b
ji
1
A� 1 n
i
2 S, b 2 B (21)
X
n
i
2Ss
b
i
s
b
b 2 B (22)
w
k
i
�X
{j:(i,j)2A1(rk)}
x
b
ij
r
k
2 R, n
i
2 S, b 2 B (23)
w
k
i
�X
{j:(j,i)2A2(rk)}
x
b
ji
r
k
2 R, n
i
2 S, b 2 B (24)
X
n
i
2Sw
k
i
w r
k
2 R (25)
X
{j:(i,j)2A3(rk)}
X
b2Bx
b
ij
b r
k
2 R (26)
X
b2Bl
b
· xb
ij
l
ij
(i, j) 2 A (27)
7
X
b2Bt
b
· xb
ij
t
ij
(i, j) 2 A (28)
x
b
ij
2 {0, 1} (i, j) 2 A, b 2 B (29)
s
b
i
2 {0, 1} n
i
2 S, b 2 B (30)
v
b
2 {0, 1} b 2 B (31)
w
k
i
2 {0, 1} n
i
2 S, rk
2 R (32)
The objective function (19) minimizes the sum of the car travel cost, swap cost, work-event cost and
missed car cost. Balance constraints (20) guarantee that if a block b is shipped it reaches its destination.
Note that o
b
i
= 0 for every route node because these nodes act as transshipment nodes. Constraints
(21) allow us to count a swap when any given block enters and leaves a yard node. Constraints (22)
ensure the maximum number of swaps per block. Constraints (23) and (24) count the work events
for each train at every yard node n
i
2 S; while constraints (25) ensure that a train does not exceed
the maximum number of work events. Constraints (26) limit the maximum number of blocks moved
by a train. Constraints (27) assure the maximum train length through arc (i, j) and constraints (28)
guarantee the maximum train tonnage through arc (i, j). Finally, constraints (29)-(32) define the
nature of the decision variables.
4 Computational Results
The proposed mixed-integer programming models were solved with Xpress-MP (version 1.20.01),
Gurobi (version 4.5.1), and ILOG-CPLEX (version 12.3.0). The Train Route Generation algorithm
was implemented in Java, compiled on Eclipse SDK version 3.4.2, and the shortest paths computed
with the Java Universal Network/Graph Framework. After fine tuning the model parameters we set
C
max
=3, Nmax
=8, Rmax
=20,000, and �=0.17. The experiments with the two data sets were run on
a Dell precision T7400 with 2 Intel Xeon X5450 CPUs running at 3.0 GHz and 8 GB of RAM under
Windows Vista Ultimate x64.
Table 1 summarizes the best solutions found for both data sets. To assess the quality of the
solutions, we used the block travel cost defined by the missed car cost plus the car travel cost, given
that it accounts for over 75% of the total cost. We also derived a block travel bound on the block travel
cost by ideally routing all (transportable) blocks through their shortest paths. Based on this (lower)
bound, we computed the block travel gap as Block travel gap = (Block travel cost�Block travel bound)
(Block travel cost)
.
Table 1 reports the most balanced solutions, that is, those with an acceptable tradeo↵ between quality
8
and time; for data sets 1 and 2, the reported solutions were found with Xpress-MP and Gurobi,
respectively. It is worth highlighting that our decomposition strategy achieves solutions with a block
travel gap of 0.58% under one minute for data set 1; and a gap of 0.54% under four minutes for data
set 2.
Table 1: Summary of the best solutions foundData Train Car Missed Block Work Block Total Block Block Total
set route travel cars travel event swap cost travel travel CPU
cost cost cost cost cost cost bound gap (%) time (s)
1 417,031 1,565,730 0 1,565,730 55,650 5,060 2,043,471 1,556,660 0.58 45
2 485,277 2,191,692 420,000 2,611,692 82,950 8,080 3,187,999 2,597,720 0.54 225.7
A detailed analysis of the computing time shows that the Train Design Problem consistently ac-
counts for less than 1 minute (regardless of the data set), while the time used by the BTA highly
depends on the target optimality gap, defined as gap = (Best Solution�Best Bound)
(Best Solution)
. Table 2 shows the
e↵ect on the computing time while ranging the target optimality gap from 1% to 0.1% using the three
leading commercial optimizers. For data set 1, with our proposed decomposition strategy all optimiz-
ers achieve a gap of 1% in less than 2 minutes and a gap of 0.1% in less than 6 minutes. Xpress-MP
is the best performer for this set, achieving a gap under 0.1% in just 84 seconds. Gurobi reaches a
1% gap in half the time of CPLEX, but it needs roughly one more minute than CPLEX to reach the
0.1% gap. For data set 2, both Xpress-MP and Gurobi achieve a gap of 1% in about 4 minutes, while
CPLEX needs roughly 55 minutes. To reach a 0.1% gap, CPLEX needs 2.5 hours, while Xpress-MP
and Gurobi reach the imposed time limit of 4 hours. It is noteworthy that the di↵erence in the total
cost between solutions with 1% and 0.1% gaps is less than 1000 dollars, so it is completely reasonable
to stop at a gap of 1%.
Table 2: Total CPU time (in s) to meet the target optimality gap with three commercial optimizersTarget optimality gap
1% 0.25% 0.15% 0.10%
Data Set 1 Xpress-MP 45 45 45.8 83.9
Gurobi 55.4 55.4 306.5 352.5
CPLEX 120.3 120.3 120.3 296.1
Data Set 2 Xpress-MP 220.6 221.9 221.9 >14,400
Gurobi 225.7 225.7 458.1 >14,400
CPLEX 3344.9 3344.9 3344.9 8770.7
We explored further the time di↵erence of the optimizers by analyzing the evolution of the quality
of the solutions (incumbents) and the dual bounds in the branch and bound procedure for data set
2 in the BTA, namely, the hardest subproblem in our decomposition strategy. Fig. 4(a) shows the
progress of the best solution (incumbent) against the elapsed time; while Fig. 4(b) shows the progress
of the dual (lower) bound against the elapsed time.
9
2,702,600
2,702,700
2,702,800
2,702,900
2,703,000
2,703,100
2,703,200
2,703,300
2,703,400
2,703,500
2,703,600
0 2000 4000 6000 8000 10000 12000 14000
Incu
mbe
nt v
alue
Time (s)
Gurobi
Xpress-MP
CPLEX
(a) Evolution of the best solution (incumbent) vs. elapsed
time
2,686,000
2,688,000
2,690,000
2,692,000
2,694,000
2,696,000
2,698,000
2,700,000
2,702,000
0 2000 4000 6000 8000 10000 12000 14000
Bes
t b
ou
nd
val
ue
Time (s)
Gurobi
Xpress-MP
CPLEX
(b) Evolution of the dual (lower) bound vs. elapsed time
Figure 4: Comparison of the branch and bound search of the three optimizers on data set 2 for theBTA
Gurobi finds a better solution faster than the other optimizers, but it takes more time improving
its lower bound. Xpress-MP finds better lower bounds but the (feasible) solutions are not as good as
the ones found with Gurobi. CPLEX, on the other hand, seems to stagnate for a while (3,200s), but
at the end it finds the best (lower) bound and it is the only one able to prove a 0.1% optimality gap
before the time limit. However, Gurobi found the best solution among the optimizers. This behavior
explains the results obtained in Table 2 while comparing the three optimizers. Xpress-MP has a good
balance between finding good (feasible) solutions and improving the lower bounds. Gurobi finds better
solutions earlier, but the lower bounds are not strong enough to prove optimality within smaller target
gaps. CPLEX has a slow start, stagnates for a while, but at the end it finds a balanced solution and
the best (lower) bound. After analyzing the behavior of the optimizers, for this particular data set, if
the goal is to find good-quality solutions fast, the best option would be Gurobi; if the goal is to achieve
small gaps quickly, the best option would be Xpress-MP or CPLEX.
5 Concluding remarks
With our decomposition strategy, we solved the proposed problem achieving provably high quality
solutions in less than 1 minute for data set 1 and less than 4 minutes for data set 2. Given the
operational nature of the problem, likely to be solved on a daily or weekly basis, it is very important to
rely on a fast and robust approach to solve the problem. We took advantage of a network representation
of the problem to embed some of the harder constraints in the underlying (network) structure. This
network approach is very flexible and can be extended to include additional system conditions.
10
A Column-Row generation heuristic
for the Train Design Optimization Problem
OR@UNIMI team
Fabio Colombo Roberto Cordone Marco Trubian
Dipartimento di Scienze dell’Informazione (DSI)
Universita degli Studi di Milano
Via Comelico 39/41, I-20135 Milano MI, Italia
1
1 Introduction
The approach proposed is a row and column generation heuristic [3]. In the master problem the main
columns represent either trains or paths followed by a block. Each train t is defined as a sequence of crew
segments, while a path p is a sequence of arcs in an auxiliary graph. We generate the train columns with a
two level tabu search heuristic [1] and we generate the block-path columns by solving a MIP net-flow model.
At the end of the column generation process we impose integrality to the variables of the master problem,
we solve the corresponding IP model and return the best obtained feasible solution. In the next section we
describe the IP model of the master problem and the notation used, in the third section we describe the
overall approach, the MIP net-flow model and the tabu search heuristic. In the last section we report the
computational results.
2 The Train Design Optimization Models
In this section we assume the concepts of block, crew segment, train, work event, and so on, as well as the
objective function and the constraints, as defined in the problem description of the RAS competition. We
adopt the following notation.
• B: is the set of the blocks. For each b ! B, o(b) and d(b) are the origin and destination rail yards, N(b)
is the number of cars in b, L(b) (resp. W (b)) is the total length (resp. total weight) of b.
• G = (V,A): is a directed graph that describes the rail network. V is the rail yards set and A is the set
of the railroad tracks connecting the rail yards. For each v in V , c(v) is the block swap cost associated
with the yard v. For each a ! A, l(a) is the length of a, ML(a) (resp. MW (a)) is the maximum length
(resp. weight) of a train passing through a and MN (a) is the maximum number of trains that can pass
through a.
• S: is the set of the crews segments. For each s ! S, v1(s) and v2(s) are the terminal nodes.
• Cost parameters: IS is the crew imbalance penalty; IT is the train imbalance penalty; CT is the fixed
cost to build a train; cT is the cost for each mile traveled by a train; cR is the cost for each mile
traveled by a railcar and mR is the cost for each railcar that is not transported from its origin to its
destination. Hence, N(b)mR is the cost for not serving a block b.
2
• Constraint parameters: MB is the maximum number of unique blocks that a train can transport; ME
is the maximum number of work events that a train can make, MS is the maximum number of block
swaps for each block.
• T : is the set of all the feasible trains; in our model each train t ! T is a sequence of crew segments,
with a corresponding path in G, and a sequence of work events. The function cT : T " R+ defines
the cost of the train consisting of the train start cost, plus the train travel cost, plus the cost of the
scheduled work events. T induces a multigraph MG on V : we replace each arc a ! A with as many
copies of it as the number of passages through a of trains in T (each passage of the same train through
a corresponds to a di!erent copy of the arc). At is the set of all the arcs induced on MG by train t.
• Pb: is the set of all the feasible paths associated with the block b on the multigraph MG (i.e, paths
from o(b) to d(b)). Hereafter we denote them as block-paths. Vice versa, b(p) is the block associated
with the block-path p. The set Ptb # Pb contains all the paths in Pb that use the train t. The function
cP : P " R+ defines the cost of the block-path consisting of the block travel cost plus the block
swaps cost, where P = $b!BPb. Pa is the set of block-paths which use the arc a of MG (hence, the
corresponding train).
In the following we report a MIP formulation of the problem (on the left) and the dual of its continuous
relaxation (on the right).
min!
t!TcT (t)!t +
!
p!PcP(p)xp + IS
!
s!S"s + IT
!
v!V
"v (1)
!
p!Pb
xp % 1 b ! B, ("b % 0) (2)
!
p!Ptb
xp & !t t ! T , b ! B, (#tb % 0) (3)
!
p!Pt
xp & MB t ! T , ($t % 0) (4)
!
p!Pa
W (b(p))xp & MW (a) t ! T , a ! At, (rat % 0) (5)
!
p!Pa
L(b(p))xp & ML(a) t ! T , a ! At, (hat % 0) (6)
!
t!Ta
N(t, a)!t & N(a) a ! A, (ka % 0) (7)
!
t!T"v(t)!t & "v v ! V, (%+v % 0) (8)
!
t!T'"v(t)!t & "v v ! V, (%"v % 0) (9)
!
t!T"s(t)!t & "s s ! S, (%+s % 0) (10)
!
t!T'"s(t)!t & "s s ! S, (%"s % 0) (11)
xp,!t ! {0, 1} t ! T , p ! P (12)
max!
b!B"b '
!
t!T
"M$t +
!
a!At
(W (a)rat + L(a)sat)
#(13)
'!
t!Tp
$
%$t + #tb(p) +!
a!Apt
(W (b(p))rat + L(b(p))hat)
&
'+
+"b(p) & cP(p) p ! P (14)
!
b!B#tb '
!
a!At
N(t, a)ka +!
v!V
"v(t)(%"v ' %+v )+
+!
s!S"s(t)(%
"s ' %+s ) & ct t ! T (15)
%+v + %"v & IT v ! V (16)
%+s + %"s & IS s ! S (17)
"b % 0 b ! B (18)
$t % 0 t ! T (19)
#tb % 0 t ! T b ! B (20)
rat, ha,t % 0 a ! A, t ! T (21)
ka % 0 a ! A (22)
3
In the MIP model each binary variable !t (xp) states if train t (block-path p) is used or not. For each s ! S,
!s is the di"erence between the number of crews that transit on s in the direction v1(s) " v2(s) and the
number of crews that transit on s in the direction v2(s) " v1(s). For each v ! V , !v is the di"erence between
the number of trains that start from v and the number of trains that end in v. Objective function (1) sums
up the cost of the selected trains, the cost of the selected block-paths and the train and crew imbalance
penalties. A dummy block-path of one arc from o(b) to d(b) of cost N(b)mR manages the case in which the
block b is not served. Constraint family (2) imposes the existence of a (eventually dummy) block-path for
each block. Constraint family (3) imposes that if a selected block-path uses the train t then the train is
selected. Constraint family (4) imposes the maximum number of blocks that a train can transport, constraint
families (5-7) impose for each arc a the maximum weight and length of a train passing through a and the
maximum number of trains that can pass through a. Constraint families (8,9) define the train imbalance
for each yard (coe#cient !v(t) counts the di"erence between the number of times train t enters in v and
exits from v). Constraint families (10,11) define the crew imbalance for each crew segment s (coe#cient
!s(t) counts the di"erence between the number of crews used by train t in the two directions of segment
s). For each constraint family in the MIP model we report in brackets the dual variables of its continuous
relaxation.
3 A Column-Row generation approach
To solve the MIP model we start by relaxing the integrality conditions on the binary variables, generating
the so called master problem (MP). Since MP has an exponential number of variables, we apply a column
generation approach [2]. In particular we define the reduced master problem (RMP) that, at the beginning,
considers all the imbalance variables (!s,!v) but only a small subset of feasible trains, T , and block-paths,
P. We start by generating for each block a train which carries the block from its origin to its destination
at minimum cost. This is obtained by solving a minimum cost path problem on a suitable graph for each
block. Then we solve RMP and we use the optimal dual values to generate non basic variables with negative
reduced costs or to prove that the current basic solution is optimal also for the full master problem. In
our formulation the addition of a new variable (either block-path or train) implies also the addition of new
constraints and of the corresponding dual variables. To generate new variables we solve the so called pricing
problem. We define two pricing problems, one for the block-path variables (the BPP problem) and one
for the train variables (the TP problem). We start by solving the BPP problem and only when no new
4
block-path variable with negative reduced cost can be identified we switch to the TP problem. Since the two
pricing problems are intertwined the overall pricing phase has a few feedback loops which we describe in the
next subsections. At the end, when no more variables can be identified by our pricing solvers we solve the
MIP model obtained by imposing the original integrality constraints to the final RMP model. The resulting
solution is the output of the overall process. Please note that since we do not solve to optimality the pricing
phase the final optimal objective function value of the RMP is not a lower bound for the overall problem.
3.1 Initialization
We start by generating for each block b a train which carries b from its origin to its destination at minimum
cost. To solve this problem we build for each block b an auxiliary node weighted graph G!b = (V !
b , A!b). We
recall that in the RAS problem to each crew segment s corresponds a minimum length path !(s) from v1(s)
to v2(s). We denote with l(n1, n2) the length of a minimum length path from n1 to n2. The node set V !b
contains a node for each crew segment plus a source node ns and a sink node nd. The arc set A!b contains
an arc from the source node ns to each crew segment s which contains o(b) in its minimum path !(s), an
arc from each crew segment s which contains d(b) in its minimum path !(s) to the sink node nd, and an
arc between any two crew segments s1 and s2 such that v2(s1) = v1(s2). We initialize the cost c(s) of each
node s with cT +N(b)cRl(!(s)). If o(b) belongs to !s we subtract from c(s) the cost N(b)cRl(v1(s), o(b)), if
o(b) != v1(s) we add also the cost of a work event. If d(b) belongs to !s we subtract from c(s) also the cost
N(b)cRl(d(b), v2(s)) and if d(b) != v2(s) we add the cost of a work event. The cost of the source and of the
sink node is null. The minimum cost path from ns to nd in G!b identifies both a block-path column for b and
a dedicated train column.
3.2 Block-paths generation
Given a pool of trains T " T and the dual variables values associated with the last RMP solved, we developed
an IP formulation for the problem of obtaining a path p of negative reduced cost that uses only trains in T .
3.2.1 An IP formulation for the Block-paths Generation
From the constraint (14) of the dual of the RMP model we derive the reduced cost of p # P:
cP(p)$ !b(p) +!
t"Tp
"
#"t + #tb(p) +!
a"Apt
(W (b(p))rat + L(b(p))hat)
$
% (23)
5
For each block b ! B, we derive a directed graph Gb = (Vb, Ab) from the multigraph MG associated with
T . Gb is obtained by expanding each node v of MG in a bipartite graph (U!v , U+
v , Avb ). The shore U!
v
(U+v ) contains an arrival (departure) node for each arc in MG entering in (leaving from) v, i.e. an arrival
(resp. departure) node for each t ! T that enters (resp. exits from) v. We refer to these nodes as v!t and
v+t . For each arc (v, w) associated to a train t in MG we introduce an arc a = (v+t , w!t ) in Gb with cost
c(a) = N(b)cRl((v, w))+W (b)MW ((v, w))+L(b)ML((v, w)). The set Avb contains a zero cost arc (v!t , v
+t ) if
t both enters and exits from v in MG, it contains the block swap arcs (v!t1, v+t2) with cost c(v) if t1 enters in
v, t2 exits from v and both the trains can load/unload blocks in v (i.e. v is their origin/destination yard or
they make a work event in v). Finally, we add to the obtained graph a source node ns and a sink node nd
and the zero cost arcs (ns, v) such that v ! U+o(b) and the zero cost arcs (v, nd) such that v ! U!
d(b). Given
Gb we obtain the minimum reduced cost path for the block b by solving the following problem:
min cb =!
a"Ab
c(a)xa +!
t"T
(!tb + "t)yt (24)
!
a"!+(i)
xa "!
a"!!(i)
xa = 0 i ! Vb \ {ns, nd} (25)
!
a"!+(ns)
xa "!
a"!!(ns)
xa = 1 (26)
!
a"!+(nd)
xa "!
a"!!(nd)
xa = "1 (27)
xa # yt t ! T a ! Abt (28)
!
t"T
yt # Ms + 1 (29)
xa ! {0, 1} a ! Ab, yt ! {0, 1} t ! T (30)
The set Abt $ Ab contains all the arcs associated with the train t, the variable xa is equal to 1 if the path
uses the arc a ! Ab (0 otherwise), the variable yt is equal to 1 if the path uses the train t ! T (0 otherwise),
the constraints (25 - 27) require to send one flow unit from ns to nd, the constraints (28) activate a train if
the path uses an arc associated with it and the constraint (29) ensures that the block swaps limit is satisfied.
By solving the above formulation with an IP solver we obtain the minimum reduced cost path p. If cb < 0 the
constraint (14) corresponding to p is violated by the solution of the dual of the current RMP, consequently
we can add p to the reduced master problem.
6
3.2.2 Implementation details
We sort the blocks in B in increasing index order. Given a block b we generate and solve the corresponding
pricing problem. If the optimal reduced cost cb is negative we add the generated block-path to the RMP
and we reoptimize it. Then we move to the next block in the given order. For computational time reasons
we do not use all the trains in T in defining the graph Gb. We consider all the trains which are involved in
carrying b in the current solution of the RMP, and the Nt trains closest to the origin and destination of b.
When all the generated problems are solved without finding a block with a negative reduced cost we switch
to the train generation phase. Indeed, we found computationally more e!ective to generate complete new
trains than to generate block-paths by enlarging the pool of available known trains. However, if also the
train generation phase fails to identify new columns we go back to the block-path generation phase after
increasing Nt of a "Nt quantity. As soon as new columns are identified Nt assumes its starting value. In
our experiment we fixed both the starting value of Nt and the value of "Nt to 6.
3.3 Train generation
Given a train t ! T \ T and a set of block-paths {p1, . . . , pk} (at most one for each block) that use t and
possibly some other trains in T , to decide if we need to insert the new train and the new block-paths in the
RMP, we have to verify if some of the associated dual constraints (14, 15) are violated. However, since the
train t is not currently contained in the RMP (i.e. we are generating also the constraints associated with t,
not only its column), we do not know the values of the dual variables !t, rat, hat, for all a ! At and "tb, for
all b ! B. To face this problem, when building a new train t ! T \ T we use it for serving blocks in such a
way that the constraints (4-6) are not tight (non saturation condition). In this way, for the complementary
slackness conditions, we can set !t = rat = hat = 0. To estimate a value for "tb we use the "tb values of
the trains used in the current RMP solution. We interpret the "tb values as the prize that train t gains for
carrying the block b. Hence, a new train t can assume to gain the same amount "tb by serving the block
b instead of train t, provided that t replaces t in all the parts of the block-path of b served by t. We call
this condition replacing condition. If the new train t replaces more than one old train t in serving a block
b, we estimate the dual variable "tb value with the sum of the "tb of all the replaced trains. The pricing
problem TP consists in finding a new train t and the corresponding new block-paths {p1, . . . , pk} such that
the new train constraint (15) and possibly some of the new path constraints (14) are violated. If we generate
a new train t and the corresponding new block-paths {p1, . . . , pk} by respecting the replacing and the non
saturation conditions and the previous estimation of "tb, then the paths on G of all the blocks served by t do
7
not change and the new dual paths constraints (14) are satisfied, with the following exception: when the cost
cP(p) decreases. This happens when two or more consecutive subpaths previously assigned to two or more
di!erent trains are assigned to t so saving the cost of one or more block swaps. If we succeed in identifying
a new train t whose constraint (15) is violated we can insert it and the corresponding new block-paths into
the RMP and reoptimize it. We solve the TP problem using a tabu search heuristic [1]. We limit the search
space to those trains and to the corresponding block-paths which satisfy the non saturation and the replacing
conditions while using the above described !tb estimation.
3.3.1 A two-level Tabu Search for the Train Generation
From the constraint (15) of the dual of the RMP model we derive the objective function of the TP problem,
which is the minimization of the reduced cost of t ! T \ T :
ct "!
b!B!tb +
!
a!At
N(t, a)ka "!
v!V
"v(t)(""v " "+v )"
!
s!S"s(t)("
"s " "+s ) (31)
We use a two level tabu search heuristic. The first level of the algorithm represents trains as sequences of
crew segments and the local search moves modify the current train solution by adding or removing crew
segments. Given the current train solution t the second level of the algorithm computes its objective function
value by identifying which blocks to serve with t and in which yards to load and unload them at (possibly)
minimum cost.
First level We initialize the solution by selecting the crew segment s with the minimum objective function
value. Given the current solution t we denote with start(t) (end(t)) the first (last) yard of t. We use the
following moves: (1) to add to t a crew segment s such that either v1(s) = end(t) or v2(s) = start(t); (2) to
remove from t either the first or the last crew segment. Add-moves are forbidden when the train reaches a
given maximum number maxs of crew segments. Parameter maxs is computed as twice the number of crew
segments in the longest train generated so far. At each iteration the algorithm selects the best non tabu move
(with respect to the objective function value). We use as attribute of a move the name of the crew segment
involved. We use two tabu lists, one for the add-moves and one for the remove-moves. We consider tabu a
move if the attribute of the involved crew segment is present in the corresponding tabu list. The tabu tenures
(i.e. the length of the two tabu lists) are not fixed but can vary in two given intervals. Since the number of
available add-moves is greater than that of the remove-moves the tabu tenure for the remove-moves is half
the value currently assigned to the tabu tenure of the add-moves. The algorithm terminates either when
8
it finds a solution with a negative objective function value or when a fixed number of iterations have been
executed.
Second level We receive in input a sequence t of crew segments. We consider all the block-paths p such
that xp > 0 in the current solution of the RMP. We partition each considered block-path p into arc-disjoint
subpaths p! , corresponding to the di!erent trains ! used for carrying b(p) from its origin to its destination.
With a slight abuse of notation, when a train ! loads and unloads the same block b more than once we still
denote as subpath p! the corresponding set of disjoint parts of block-path p. In the algorithm, among all
the subpaths p! , we consider only those which are covered by the sequence of crew segments t, i.e. only
those such that the train t can replace ! . We call them feasible subpaths. In this way we are satisfying
the replacing condition. We initialize the solution by selecting the feasible subpath p! with the minimum
di!erence between the possible work event cost and the "!b(p) value, i.e. the minimum contribution to the
objective function value. We use the following moves: (1) to add to t a feasible subpath while preserving
the non saturation condition; (2) to remove from t a subpath. If train t makes one or more loops in G,
covering in di!erent times the same subpath, each di!erent passage corresponds to a di!erent candidate
add-move. At each iteration, the algorithm selects the best non tabu move (with respect to the objective
function value). We use as attribute of a move the name of the subpath involved. We use two tabu lists, one
for the add-moves and one for the remove-moves. We consider tabu a move if the attribute of the involved
subpath is present in the corresponding tabu list. The tabu tenures for both the lists are equal to half the
number of feasible subpaths. The algorithm terminates after a number of iterations equal to the number of
feasible subpaths.
3.3.2 Implementation details
All the proposed parameter values have been chosen based on the results of our computational campaign on
the assigned instances. The tabu-tenure for the add (remove) moves in the first level ranges between 3 and
half the number of crew segments in the current solution. The maximum number of iteration in the first
level is 2500.
4 Computational results and final remarks
We developed all the algorithms previously described using the C++ programming language and we used
ILOG CPLEX 12.2 with the ILOG CONCERT libraries to solve the generated LP/MIP problems. We executed
9
the computational experiments on a computer running Linux Ubuntu 6.10 equipped with an intel pentium
core 2 duo 2.6ghz and 3GB of RAM. The table reports the best objective function values obtained by our
instance sol. value CGTime MIPTimedata set 1 2212163.425 32000 4000data set 2 3538924.275 12600 1800
Table 1: Results obtained by the algorithm when tested on the two competition data sets
approach when applied to the two assigned data sets. We limited the computational time of the column
generation phase and of the final MIP solution phase to the number of seconds reported in the third and
fourth column. In both cases the column generation approach was in the so called long tail phase.
In our opinion we can speed-up the proposed approaches both by improving the implementation of the
heuristic algorithms and by solving with a dedicated algorithm the block-paths pricing problem.
References
[1] Fred Glover and Manuel Laguna. Tabu Search. Kluwer Academic Publishers, Norwell, MA, USA, 1997.
[2] M. E. Lubbecke and J. Desrosiers. Selected topics in column generation. Operations Research, 53(6):1007–
1023, 2005.
[3] Eugene J. Zak. Row and column generation technique for a multistage cutting stock problem. Computers
& Operations Research, 29(9):1143 – 1156, 2002.
10
2011 Problem Solving Competition by INFORMS RAS
1
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
Train Design Optimization
I-Lin Wang, Hung-Yi Lee, and Yu-Ting Liang Department of Industrial & Information Management, National Cheng Kung University, Taiwan
1. Introduction
Train design contains two main components: Block-To-Train assignment (BTA), and Train Routing, assuming the blocks made at
each yard have already been determined and cannot be changed. In particular, Train Design Optimization (TDO) seeks the optimal
routes for the trains, and associated Block‐To‐Train assignments, subject to different capacity and operational constraints. TDO is
extremely difficult since one requires the knowledge of train routes beforehand to solve BTA, yet there exist huge number of
possible block routes and train routes that may be simple paths, cycles, or some walks. There is very few literature addressing
TDO. To the best of our knowledge, one of the most related literature, written by Jha, Ahuja, and Sahin (2008), deals with a
simplified BTA assuming train routes are already given and restricting each block to be shipped by a single train along a simple
path without block swapping. On the hand, the TDO in this competition seeks optimal train routes that are not necessarily simple
paths and optimal BTA that takes block swaps into consideration.
To solve this TDO, we propose a solution method that is theoretically sound for solving this TDO to exact optimality, while
maintaining the flexibility to generate a good solution within short time. After giving a concise description on the TDO, we
summarize some mathematical properties for an optimal TDO solution in Section 2, and derive an IP formulation TD( , )BP T in
Section 3 for given sets of block routes BP and train routes T based on the mathematical properties. In order to effectively
solve for a good TDO solution, Section 4 gives a heuristic algorithm IRTD that iteratively solves a reduced TD( , )BP T for a
selected set of candidate train routes 'T . We then give several speed-up techniques for IRTD. Computational experiments and
results are listed and analyzed in Section 5. Finally Section 6 concludes the report and gives suggestions for future research.
2. Preliminaries
Given a rail network ( , )G N A , each node n N represents a station (or yard) and arc a A represent a directed arc
associated with an undirected edge (or link) e E that directly connects its end stations by rail. Each block b B of length bL
and weight bW contains bK cars which have to be either missed (i.e. ( ) 1b ) with penalty charge MCbC K , or shipped
together along some rail route bp P of length Trpd (i.e. ( , ) 1b p ) by at most 1BS
bU trains with travel cost Tr Trb pC K d .
A train, pulled by a locomotive and driven by a crew, has to travel along crew segments on G , where a crew segment r
(whose associated bi-directional versions are r and r ) is a shortest path connecting its crew home/away stations rO and
rD on G . If the origin or destination of some block does not lie on a crew segment, that block will always be missed since no
train can carry it. In this competition, crews are assumed freely available at end nodes of crew segments.
If we treat each crew segment r as an edge with end nodes rO and rD , we can construct a crew segment network
I-Lin Wang has received his M.S. degree from the OR Center at MIT in 1996 under the supervision of Prof. James B. Orlin. He received his Ph.D. degree from the ISyE at Georgia Tech in 2003 under the supervision of Prof. Ellis L. Johnson. Recently he has published a paper “A multiple pairs shortest path algorithm” in Transportation Science, 39(4), pp. 465-476. His research interests covers theoretical and practical topics of optimization including network optimization, SCM, Bioinformatics, reliability, scheduling, and pavement management.
2011 Problem Solving Competition by INFORMS RAS
2
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
ˆ ˆ( , )G N , where ˆr rr
N O D
and respectively denote the node and edge set of G . A train route corresponds to
some walk on G , and so does a block route. In fact, the route for an unmissed block must lie on the subgraph of train routes. It is
easier to construct a train route from crew segments in G than from original rail arcs in G . Let T represent a given candidate
train route set, where a candidate train t T may appear (i.e. ( ) 1t ) in a solution or not (i.e. ( ) 0t ). If a train t T of
length Trtd appears in a solution, it incurs a train start cost SU
tC and travel cost Tr Trt tC d .
Let T represents the set of crew segments passed by all trains in T . A crew usually has a home station to depart from and
return after work, which implies equal number of trains passing through r and r are preferred for each crew segment
Tr . If there are more (or fewer) trains passing through r than through r , the difference in the number of trains (and thus
crews), denoted by ( )L r (or ( )L r ), is called crew imbalance. Each crew imbalance incurs a penalty CIrC on crew segment r .
Similar to crew imbalance, a train imbalance at node n , denoted by ( )W n (or ( )W n ) means any surplus (or deficit) of trains
on that node and incurs a train imbalance penalty TInC . A block b may be swapped to different trains for at most BS
bU times at
intermediate stations during its journey. Swapping a block at node n incurs a block swap cost BSnC . Swapping a block from train
1t to 2t is considered as a work event which incurs a work event cost WEC for both 1t and 2t .
Figure 1. A small crew segment network G with two branches
Although there is no restriction on the routes for both blocks and trains, we can have some observations (as listed below)
from an optimal TDO solution which then can be used for designing better block and train routes.
Lemma 1. (a) No train passes through an arc that does not lie on any crew segment.
(b) For any branch (see Figure. 1 for an example) in the crew segment network, if none of its nodes is a block O/D and
min ( ) 0r r
Tr Tr CI TI TIr t r r D OC d C C C , no optimal trains pass crew segment on that branch.
Proof: (a) Trivial by definition, since a train can only be driven by crews, and crew can only move on crew segments.
(b) Suppose otherwise, an optimal train t passes some crew segment on a branch, it must traverse at least one crew
segment ,r rr O D on the branch and incur a train travel cost Tr Trt rC d , a crew imbalance cost CI
rC associated with r ,
and a train imbalance cost r
TIDC associated with rD . It may save at most a train imbalance cost
r
TIOC associated with rO ,
which makes the minimum net cost to be min ( )r r
Tr Tr CI TI TIr t r r D OC d C C C that is known to be positive by the assumption.
This contradicts the optimality of train t , since traveling over crew segment r incurs more costs. □
Lemma 2. (a) In an optimal TDO solution, no empty train t would pass through a crew segment r longer than
( ) /SU IB Trt r tC C C miles, where ,
IBt rC represents the difference (not necessarily positive) of the crew and train imbalance
penalties incurred by removing r from t .
(b) Similarly, in an optimal TDO solution, no empty non-circular train t (i.e. whose O/D are different stations) would pass
through a first (or last) crew segment r longer than , /IB Trt r tC C miles.
2011 Problem Solving Competition by INFORMS RAS
3
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
Proof: (a) Suppose there exists a train t with O/D stations tO and tD in an optimal TDO solution that passes through crew
segment ,r rr O D without carrying blocks. If we replace this train by 2 trains 1t and 2t , where 1t travels from tO
to rO while 2t travels from rD to tD . Comparing with the cost associated with train t , such a train splitting incurs at
least one train start cost $400SUtC in addition to IB
rC , the difference in the crew and train imbalance penalties (which
may not necessarily be positive), while saves one train travel cost Tr Trt rC d . This implies to better split an empty train that
travels along a crew segment r longer than ( ) /SU IB Trt r tC C C miles.
(b) Based on the argument in (a), since removing the first (or last) crew segment will not incur a new train, so we only need
to consider the tradeoff between , /IB Trt r tC C and Tr Tr
t rC d . □
Lemma 1 is quite useful for generating good initial train routes, or improving an existent solution. In particular, Lemma 1(a)
implies we can reduce the problem size by removing (1) those rails not lying on any crew segments, and (2) those blocks whose
O/Ds do not lie on any crew segments. Lemma 1(b) also helps to reduce the size of crew segment G , since we can remove all
such branches from G which in turn helps to generate good block and train routes faster.
Based on Lemma 2(b), for a given block route (which will definitely not circular), we prefer not to generate a train that
travels without carrying blocks in its first (or last) crew segment. Also, for a given train route that passes through some crew
segment without carrying blocks, we can check whether it is profitable to split the train based on Lemma 2(a). Moreover, for some
train route that passes through consecutive crew segments without carrying blocks, Lemma 2(a) and 2(b) can be extended by
replacing IBrC and Tr
rd with IBrr
C and Tr
rrd
.
3. A Mixed Integer Programming Model TD( , )BP T
In this competition, there is no specific restriction on shapes of the block or train routes. This makes the design of a good solution
method very difficult. Since train routes are designed for shipping blocks, it makes sense to design block paths first, and then
design train routes for shipping the blocks along their routes. From the block point of view, shipping most blocks along short
routes saves block travel costs, which makes shortest path algorithm an intuitive systematic means for generating good block
routes. On the other hand, if we just generate train routes without any knowledge of block routes, not only would missed blocks
may take place easily, it is also very difficult to generate better train routes in a systematic way.
Furthermore, to take block swaps into consideration, it is necessary to know the block and train routes beforehand so that one
can set decision variables on where to swap which block between which trains. Although theoretically it may be possible that
some blocks routes contain cycles, to further simplify the problem, we assume each block route to be a simple path in our
proposed solution methods since in practice shipping a block along a cycle incurs more travel cost with respect to that block
(although it may save some other costs caused by block swapping or train/crew imbalances). Note that such a simple-path
assumption for block route can be further relaxed for an extended mathematical formulation, as will be described in Section 6.
Suppose all possible block routes BP and train routes T are given beforehand. For each candidate train route t T , the
binary variable ( )t represent whether t appears in an optimal solution (i.e. ( ) 1t ) or not (i.e. ( ) 0t ). Similarly,
( , )b p represent whether a block b B is shipped along route bp P in an optimal solution (i.e. ( , ) 1b p ) or not (i.e.
2011 Problem Solving Competition by INFORMS RAS
4
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
( , ) 0b p ). Let binary variable ( , , , )x b p t a denote whether b is carried by train t along an arc a in bp P (i.e.
( , , , ) 1x b p t a ) or not (i.e. ( , , , ) 0x b p t a ). By traversing along bp P , one can determine ( , , )y b p n that decides whether to
swap b at node n on p (i.e. ( , , ) 1y b p n ) or not (i.e. ( , , ) 0y b p n ). Similarly, by traversing along a train route t , for
each node n on t one can determine ( , , )y t n that defines whether a work event takes place at node n the th time (i.e.
( , , ) 1y t n ) or not (i.e. ( , , ) 0y t n ).
The following Integer Linear Programming formulation TD( , )BP T calculates an optimal BTA for given BP and T :
,
1
min ( ) ( ) ( , ) (TD( , ))
( , , ) ( , , ) b
t n
t b p
SU Tr Tr Tr Trt t t b p Bt T b B p P
WE BSnt T n N b B p P n N
C C d t C K d b p P T
C y t n C y b p n
+ ( ( ) ( )) ( ( ) ( )) ( ) T T
CI TI MCr n br n N b B
C L r L r C W n W n C K b
Subject to ,( , )( , , , ) , (1)
a
Lb t a tb p BPL x b p t a U t T a A
,( , )( , , , ) , (2)
a
Wb t a tb p BP
W x b p t a U t T a A
,( , )
( , , , ) , (3)a
NBt a tb p BP
x b p t a U t T a A
( ) (4)e Tt e Tt T
t U e E
( , , ) , (5)
p
BSb bn N
y b p n U b B p P
,
1( , , ) (6)t n
t
WEtn N
y t n U t T
( , , , ) ( , ) , , (7)a
b pt TAx b p t a b p b B p P a A
( , ) ( ) 1 (8)bp P
b p b b B
( , ) ( , , , ) , , , (9)b p ab p x b p t a b B p P a A t TA
( ) ( , , , ) , , ( , ) (10)t at x b p t a t T a A b p BP
11( , , ) ( ( , , , ) ( , , , )) , , 1,2,.... 1, (11)s s
p p
s s sp p p b p A A
y b p N x b p t A x b p t A b B p P s A t TA TA
1,1
1
1 11
1,
( , , ) ( ( , , , ) ( , , , )) , 1,..., 1; ( , )
records the number of times that train passes through node from arc to
st Nts st t
st
s s st t t t A A
s st tt N
y t N x b p t A x b p t A t T s A b p BP BP
t N A
1 (12)s
tA
( ) ( ) ( ) ( ) and its bi-directed crew segment , (13)r r
r rt t T r rt TR t TR
L r L r t t r
, , , ,( ) ( ) ( ) ( ) , and their associated degrees , (14)
n n
out in out int n t n T n t n t nt TN t TN
W n W n t t n N t TN
( , , , ) 0 , , , (15)
, , , , , {0,1}; , , , bx b p t a b B p P t T a p t
x y y L L W W
(16)
The objective function is composed by seven parts: train start and travel costs, block travel costs, train work event costs, block
swap costs, crew imbalance costs, train imbalance costs, and missed car costs. The design of train routes and block routes are
subject to the following constraints:
(a) Capacity constraints: Let tA represent the set of arcs that train t passes through, and aBP be the set of all block
routes ( , )b p passing through arc a . Equations (1)~(3) represent the constraints on the length, tonnage, and number of
blocks to be carried by a train t passing through arc a , where ,Lt aU , ,
Wt aU , and ,
NBt aU , respectively denote its maximum
length, tonnage, and number of blocks. For each edge e , equation (4) restricts the number of trains passing through it,
denoted by ( )ett T
t , to be no more than T
eU , where et records the number of times that train t passes through
edge e . Note that we allow a train to pass an edge more than once, from either direction.
2011 Problem Solving Competition by INFORMS RAS
5
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
(b) Block swap & work event upper bound constraints: Let pN and tN represent set of nodes lying on a block route p
and train route t , respectively. Equation (5) defines each block to be swapped for at most BSbU times; similarly, equation
(6) restricts each train to have at most WEtU work events.
(c) Block route continuity constraints: Let pA represent the set of arcs that block path p passes through, and aTA
denote the set of trains passing through arc a . Equation (7) defines the following facts: as long as we select route p to
ship block b (i.e. ( , ) 1b p ), for each arc a p we must select a train to ship the cars (i.e. ( , , , ) 1at TAx b p t a
) ,
otherwise (i.e. ( , ) 0b p ) none of the trains would be selected to ship b (i.e. ( , , , ) 0at TAx b p t a
).
Equation (8) restricts a block to be either shipped ( ( , ) 1 bp P
b p
) or missed ( ( ) 1 b ). In addition, we find that
adding the following stronger version of equation (8) does help to speed up the CPLEX solution procedures, possibly
because it generates better cuts: ,
( , , , ) ( , ) ( ) 1 , , ijba bb
i j ib b b b pt TA j i p P
x b p t a b p b b B p P a A
(d) Block route & train route selection constraints: Equation (9) has similar effects as equation (7) which forces block b
to be shipped along route bp P , as long as one decides to use train t to ship b on some arc a lying on p . On the
other hand, if block b is not to be shipped along route bp P , then none of the arcs on p can be used to ship b .
Similarly, equation (10) defines whether to run train t or not.
(e) Block swap & work event definition constraints: Equation (11) models a block swap operation. In particular, for any
two consecutive arcs, say, the s th and 1s th arc, denoted by spA and 1s
pA , lying on the block route bp P , there are
four possible combinations on 1( , , , ), ( , , , )s sp px b p t A x b p t A (i.e. 1,1 , 1,0 , 0,1 , and 0,0 .) that indicate
whether these arcs carry b or not by some train t that passes either spA or 1s
pA . Among these four combinations, we
can see that b is dropped off at the s th node on p , denoted as spN in the 2nd combination, and is picked up at the same
node in the 3rd combination. Either the 2nd or 3rd combination would force ( , , ) 1spy b p N , which means a block swap
takes place at node spN .
Similarly, but from the train route point of view, equation (12) models whether a work event takes place at the 1s th
node, denoted as 1stN , on a train route t , suppose that node has been passed through by t for ,t n times. With similar
arguments in analyzing possible combinations on 1( , , , ), ( , , , )s st tx b p t A x b p t A , a work event takes place for the 1,0
or 0,1 combination, which will forces 1, 11
( , , ) 1st Nt sty t N
. Note that we allow a train route to pass through a node
for several times, it may be possible that more block swaps may take place at the same node but all such block swaps are
considered as only one work event. By adding y up with all s and putting it into the objective function,
1, 11
( , , )st Nt sty t N
will not exceed 1 and can be used to represent the existence of work event at node 1stN .
(f) Crew & train imbalance definition constraints: Let rTR represent the set of trains passing through crew segment r .
Equation (13) defines the crew imbalance as follows: for a given train route t and one of its crew segments r , we can
calculate the number of times it passes through r and r , denoted as rt and r
t , respectively. Thus,
( )r
rtt TR
t represents the number of times that r has been passed through, and ( ) ( )r r
r rt tt TR t TR
t t
calculates the crew imbalance or its negative value. If ( ) ( )r r
r rt tt TR t TR
t t
,
( ) ( ) ( )r r
r rt tt TR t TR
L r t t
, ( ) 0L r ; otherwise, ( ) ( ) ( )r r
r rt tt TR t TR
L r t t
, ( ) 0L r . In any
2011 Problem Solving Competition by INFORMS RAS
6
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
case, the crew imbalance associated with crew segment r can be calculated by ( ) ( )L r L r .
Let nTN represent the set of trains passing through node n . Similarly, but from the node degree point of view, equation
(14) defines the train imbalance as follows: for a given train route t and one of its nodes n , we can calculate the number
of times t leaves and enters n , denoted as ,outt n and ,
int n , respectively. Thus, , ( )
n
outt nt TN
t and , ( )
n
int nt TN
t
respectively represent the number of times that all trains have departed from and entered n . Thus
, ,( ) ( )n n
out int n t nt TN t TN
t t
calculates the train imbalance or its negative value. If , ,( ) ( )n n
out int n t nt TN t TN
t t
,
then , ,( ) ( ) ( )n n
out int n t nt TN t TN
W n t t
and ( ) 0W n ; otherwise, , ,( ) ( ) ( )n n
out int n t nt TN t TN
W n t t
and ( ) 0W n . In any case, the train imbalance associated with node n can be calculated by ( ) ( )W n W n .
(g) Variable range constraints: If there is an arc not lying on any block or train routes, it is impossible to be used and its
associated variables will be forced to zero by equation (15). Equation (16) defines , , , , ,x y y as binary variables, and
, , ,L L W W as nonnegative integral variables.
TD( , )BP T is a specialized minimum cost integral origin destination multicommodity network flow problem, since each block can
be viewed as an OD commodity. It is very difficult since it involves at least two subproblems: (1) a difficult vehicle routing
problem (to ship blocks) that allows commodities to be swapped during the transportation, and (2) a fleet assignment and routing
problem that design the size and route of trains. Theoretically, TD( , )BP T calculates optimal TDO solutions, if one can provide all
of the possible block routes and train routes, yet it is not practical to input huge sets of block or train routes. Note that it can deal
with any kind of train routes (i.e. simple paths, cycles, circuits, or any walks). In practice, one can generate good block routes first,
then use heuristics to generate good train routes as inputs to TD( , )BP T . Moreover, one can even repeat these steps by iteratively
feeding suitable amount of good block and train routes into TD( , )BP T , solve the reduced problem to exact or approximate
optimality, replace bad routes by some new routes, until the solution converges to a certain satisfactory level. In next section, we
will illustrate how we exploit similar ideas to solve the TDO. 4. Proposed Solution Methods for Solving the TDO
As described in Section 3, feeding huge sets of block and train routes into TD( , )BP T will not work in practice since it consumes
too much computational storage and time. In order to exploit our IP model, we have to generate good block and train routes in a
smart and efficient way, then feed suitable amount of good routes into TD( , )BP T , so that it can calculate a good solution within
shorter time. To this end, we give an algorithm, named “IRTD”, where “I” and “R” respectively stands for iterative and reduced:
Algorithm IRTD Phase I. Preprocessing:
Step I.1: Read data of rail network, blocks and crew segments. Reduce problem size by Lemma 1. Step I.2: Generate good block routes BP , and then generate good train routes T based on BP . Step I.3: Select and remove a subset of T , denoted as 'T , from T , construct TD( , ')BP T as a reduced TD( , )BP T .
Phase II. Solving TD( , ')BP T : Step II.1: Solve TD( , ')BP T by CPLEX to an approximate optimality (may terminate it by a time limit or relative gap). If current feasible solution is sufficiently good (e.g. within a satisfactory optimality gap), then GOTO Phase III. Step II.2: Retain current feasible solution and associated train routes *T as a warm start, move all other train routes in ' *T T back into T , update parameters associated with each discarded train route, select and remove a few good train routes "T from T , and update 'T by merging "T with *T (i.e. *' "T T T ). GOTO Step II.1.
Phase III. Updating new &BP T :
2011 Problem Solving Competition by INFORMS RAS
7
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
Step III.1: If the total running time for IRTD exceeds a time limit, or the current solution is sufficiently good (), then STOP, improve current solution by Lemma 2, and output the final solution. Step III.2: Update BP and T by generating new block or train routes (e.g. merging old trains). GOTO Step I.3.
In particular, after simplifying the given problem, Step I.2 first generates paths that are sufficiently short (e.g. by K-shortest path
algorithms) for each block based on greedy instincts, then generate associated train routes for each generated block route p by
the following algorithm called TB(p), where “TB” stands for “trains generated for a given block route”:
Algorithm TB(p) Step 1: Construct an augmented crew segment assignment graph ( , )p p pG N A as shown in Figure 2.
Step 2: Solve a shortest path from the dummy origin to the dummy destination node in G . Use crew segments lying on that shortest path as a candidate train route associated with p .
To construct ( , )p p pG N A , for each arc a lying on the given block route p in G , we list all the crew segments passing
through it, and construct a crew segment node for each such crew segment. Let sa and 1sa respectively denote the s th and
the 1s th arc on p . For 1,..., 1s p , we connect each crew segment node associated with sa to each node associated with
1sa by an arc. If the end nodes of such an arc correspond to different crew segment, we set its length as 1, and 0, otherwise.
Finally we add a dummy origin with zero-length arcs to all nodes associated with 1a , and a dummy destination with zero-length
arcs from all nodes associated with 1pa . Then solving a shortest path from the dummy origin to the dummy destination will give
a combination of crew segments that involves the fewest number of crew changes. The example in Figure 2 contains a 4-arc block
route, where 4, 2, 3, and 2 crew segments can carry this block in its 1st, 2nd, 3rd, and 4th arc. Note that any path from O to D gives a
train route. For example, R(1,1), R(2,3), and R(5,1) give a feasible train route to carry this block, but it may involves up to 3 trains.
On the other hand, a single crew segment R(1,1) can do the same job with 1 train. Thus a good train route should involve fewer
crew segments, and this explains the instincts of our heuristics. In fact, Step 2 of algorithm TB(p) can be extended to generate
good candidate train routes. For example, generating all the shortest paths or K-shortest paths in pG gives good train routes.
Figure 2. An illustrative example for generating good train routes for a given block route in the rail network G
In phase II of algorithm IRTD, we solve TD( , ')BP T instead of TD( , )BP T mainly because TD( , )BP T is unsolvable for
problem of modern size such as dataset1 (ds1) and dataset 2 (ds2) given in this competition, even using the state-of-the-art IP
solver like CPLEX 12 on a fast computer. On the other hand, it is feasible to solve a problem of reasonably reduced size
approximately. To make it work, we have to design good iterative mechanisms to converge the solution. To this end, in Step I.3 &
Step II.2, we have to decide a suitable problem size (number of routes in 'T ) for CPLEX, adjust the termination criteria for
CPLEX in Step II.1 to calculate a good feasible integer solution within shorter time, and then design a heuristic train route
2011 Problem Solving Competition by INFORMS RAS
8
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
selection mechanism that tends to select good train routes "T . Our heuristic of selecting good train routes "T works as follows:
we associate each train route t a counter tq that records number of times t has been discarded by CPLEX. Then based on the
concept of roulette wheel selection algorithm, each t T may be selected with probability 1 11 1t tt Tq q
. This
makes those routes with fewer times of being discarded have better chance to be selected in "T .
Since we maintain the best feasible integral solution and associated train routes *T of current iteration to start the next
iteration as a warm start, the quality of the solution is guaranteed to retain, and may improve with good chance. After a few
iterations, if we observe the optimal objective value stalls (i.e. improving very slowly), this implies some “new blood” may be
necessary to stimulate the solution procedures. Thus we go to phase III to renew or add new block & train routes, which may be
done by merging good old train routes, generating new good train routes by algorithm TB(p), or even generating alternative new
block paths. The train route bank will grow when we add new routes. Of course some heuristics can also be applied to discard
some bad train routes from the bank. This shows the flexibility of our solution mechanisms.
In order to speed up algorithm IRTD, we have also design a speeding-up heuristic that divides 'T into two disjoint sets: a
reserved train route set T and a candidate train route set T , where a reserved train t T is a “must-run” train (even
without carrying blocks), while a candidate train t T may appear (i.e. ( ) 1t ) in a solution or not (i.e. ( ) 0t ). This
heuristic is based on the instinct that some train route t may often appear in a good solution of many iterations, which makes
setting ( )t redundant. Reserving such a route will reduce the problem size which helps to speed up the convergence. After all a
reserved train still may not carry blocks, although it has already occupied some capacity of train arcs and been involved in some
imbalance costs. From our computational testing results, this heuristic does effectively speed up the convergence. 5. Computational Experiments and Analysis
This competition gives two test cases (S1 and S2) simplified from some real-world train data. The preprocessing removes more
edges in S2, but only removes few edges in S1. There are 5 blocks meant to be missed in S2 since they cannot be shipped at all.
Interestingly, both ds1 and S2 have the same crew segment network, which may imply S1 is simplified from S2. Since a block
missed cost is much larger than its travel cost in general, one may assume all blocks will be shipped (however, we did not use this
observation to reduce the variables of our IP model).
More better block routes will give better TDO solutions, yet it is also more time-consuming. Also, a train route that is a walk
may induce less cost than a simple path since the former is more general than the latter. Considering the “reserved train route”
heuristics stated in the last paragraph of Section 4, we decide to use four different block and train route generating mechanisms:
CP1, CP2, RP2, and RW2 for both S1 and S2, which results in 6 scenarios: S1CP1, S1CP2, S1RP2, S2RP2, S1RW2and S2RW2. In
particular, S1CP1 is a scenario on dataset “1” by IRTD that treats all train routes as “candidate” train routes (i.e. ,T T T ),
generates “1” simple path for each train route and for each block route, and only allows “simple-path” train routes to be generated
when it merges different train routes; S2RW2 is a scenario on dataset “2” by IRTD that divides all train routes into “reserved” train
routes and “candidate” train routes (i.e. ,T T T T ), generates “2” simple paths for each train route and for each block
route, and allows “walk (i.e. nonsimple-path)” train routes to be generated when it merges different train routes.
2011 Problem Solving Competition by INFORMS RAS
9
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
All tests are conducted on a PC with Intel Core2 Q9500 2.83Ghz CPU, 4GB RAM, and Win7 OS. Algorithms IRTD & TB(p)
are implemented by C++, and use CPLEX 12.2 for solving the IPs.
Figure 3 illustrates the trend of convergence with respect to time, where Figure 3(b) (and 3(d)) is an enlarged version of Figure
3(a) (and 3(c)) in the latter iterations. Comparing the curves of S1CP1, S1CP2, we see that giving more route options for both
blocks and trains do give better objective value; curves of S1CP2 and S1RP2 indicate our “reserved train route” heuristics does help
to converge a better solution in shorter time; finally, S1RW2 gives better solutions than S1RP2, since it allows trains to move along
cycles which gives more flexibility to ship blocks with less cost. Similarly, Figure 3(c) and 3(d) also show that S2RW2 produces
better solutions than S2RP2. Thus we recommend solutions of S1RW2 and S2RW2 for the competition.
(a) (b) (c) (d)
Figure 3. Convergence of total costs for S1CP1, S1CP2, S1RP2, S2RP2, S1RW2 and S2RW2
Table 1. Overall and individual cost distributions for the first and last iterations of all six scenarios Iteration Total cost TT BT WE BS CI TI MC
S1CP1 1st 2053104.97 18.64% 75.82% 1.89% 0.13% 1.37% 2.14% 0.00% last 2052854.9742 18.64% 75.83% 1.89% 0.12% 1.37% 2.14% 0.00%
S1CP2 1st 2023036.0000 17.24% 77.65% 2.16% 0.14% 1.13% 1.68% 0.00% last 2019058.2010 16.93% 77.68% 2.72% 0.11% 1.07% 1.49% 0.00%
S1RP2 1st 2024259.0000 17.42% 77.37% 2.14% 0.15% 1.24% 1.68% 0.00% last 2019626.3499 17.11% 77.62% 2.65% 0.12% 1.01% 1.49% 0.00%
S1RW2 1st 2024259.0000 17.42% 77.37% 2.14% 0.15% 1.24% 1.68% 0.00% last 2018646.3499 17.06% 77.66% 2.67% 0.12% 1.01% 1.49% 0.00%
S2RP2 1st 3185946.0000 14.98% 68.39% 2.19% 0.14% 0.43% 0.69% 13.18% last 3152448.5293 13.94% 69.17% 2.53% 0.11% 0.42% 0.51% 13.32%
S2RW2 1st 3185946.0000 14.98% 68.39% 2.19% 0.14% 0.43% 0.69% 13.18% last 3152018.5293 13.98% 69.18% 2.48% 0.11% 0.42% 0.51% 13.32%
In Table 1, TT & BT stand for the train travel & start costs, block travel costs; WE & BS represent the work event costs, block
swap costs; CI & TI represent the crew imbalance costs, train imbalance costs; while MC stands for missed car costs. From Table
1, we can see that the majority of the costs are contributed by the travel costs, of which blocks contributes about 3 times more than
trains. This provides the evidence for our solution methods to work well, since we seek shortest paths for shipping blocks which
should minimize the majority of the costs. Table 1 also shows that the convergence mainly aim to reduce the train costs, which
may increase the work event costs a little bit, while reduces the block swap costs and all the imbalance costs. 6. Conclusions and Suggestions for Future Research
In order to solve a simplified train design optimization problem (TDO), we first observe some mathematical properties useful for
2011 Problem Solving Competition by INFORMS RAS
10
Team of NCKU lead by I-Lin Wang http//ilin.iim.ncku.edu.tw
simplifying the problem, give an integer programming formulation TD( , )BP T that theoretically calculates an optimal TDO
solution, should the “right” sets of block routes and train routes are given. In order to effectively solve the TDO, we then propose
a heuristic algorithm IRTD that first simplify the problem by Lemma 1, generate initial block routes by shortest path algorithms
and train routes by algorithm TB(p), iteratively solve a reduced integer programming model TD( , ')BP T to approximate
optimality with input of selected good block routes BP and train routes 'T from the route bank, then update the route bank by
adding new routes (or removing bad routes at the same time) and repeat these procedures until a time limit is reached or solution
quality is sufficiently satisfactory. The final solution may be further improved by Lemma 2.
Several speed-up techniques are also discussed and tested. In addition to techniques to reduce the problem size, or improve
the final solution by our Lemma 1 & 2, we recommend adding stronger constraints (ref. page 5, item (d)) to cut off bad LP
relaxation branch-and-bound nodes, and propose heuristic that reserves good candidate train routes which reduces the IP size and
help to converge faster. Also, by merging good train routes we can provide more choices to ship blocks that often further reduces
the objective value. Since we solve a reduced problem in each iteration, there is no need achieving the time-consuming exact
optimality. It is easy to adjust relative gaps of CPLEX and use warm start by our solution method.
Given the limited time available for our team members, we only conduct the final tests for a few hours. We know there is still
much room to improve with our current solutions, yet we wish the judges would appreciate more in our contributions of
developing effective solution methods and speed-up heuristics. For future research, we suggest the following topics to investigate:
Generating better block routes: Based from our computational results, travel costs contributes more than 80% of the total
costs which makes shortest path based concept for both block & train routes make sense. Nevertheless, it is still
theoretically possible for an optimal block route to be non-simple path. In fact, our IP model can be modified for this
purpose. In short, with similar technique used for modeling y , one can add another index to the variable
( , , , )x b p t a to become ( , , , , )x b p t a . Nevertheless, how to generate a good block route that is not a simple path is
another challenging research problem itself.
Generating better train routes: Our algorithm TB(p) can take the crew segment length into consideration. In selecting
good routes from route bank, it would be good if we can record a list of train routes used for each block and vice versa,
so that one can generate more suitable train routes specifically for some given block routes (right now our mechanism
uses random search, so it is likely to take a few iterations to generate train routes specifically for some blocks). Also,
such a route mapping mechanism would be very helpful if one wants to manually alter some input block or train routes.
Setting priority on reserved train routes: Our current implementation randomly selects some train routes as reserved. It
should help if one can analyze (e.g. data mining) the train route bank, setting priority to help generating more suitable
train routes faster (e.g. for some long block route or some block of many cars, we may set its best associated train route
as reserved).
INFORMS RAS Problem Solving Competition 2011
Team: RAIL-OPT
Jian Gang Jina, Jun Zhaob
a Department of Civil & Environmental Engineering, National University of Singapore, 117576, Singapore,
b School of Transportation and Logistics, Southwest Jiaotong University, Chengdu 610031, China,
1 Executive Summary
In this report, we present a hierarchical approach to the Train Design Optimization problem, which consists of two
stages. Focusing on the Train Routing problem, the first stage determines the routes for each train and the crew-to-train
assignment. The second stage is dedicated to the Block-to-Train Assignment problem. Column generation technique
is employed to generate promising train routes in the first stage and the Block-to-Train problem in the second stage is
formulated as a mixed integer programming model. This approach outputs a near-optimal solution with total cost of
$2,079,308.925 within 11 minutes for Data Set 1, and a solution with total cost of $3,262,726.100 within 62 minutes
for Data Set 2. Besides, regarding the illustrative example in the problem description report, our approach can find a
better solution with total cost of $14,916.250 within 0.21 seconds.
2 Methodology
The Train Design Optimization problem to be addressed in this competition is very challenging in the sense that
multiple decisions are involved in the problem including Train Routing, Block-to-Train Assignment (BTA) and Crew-
to-Train Assignment (CTA). Given a problem instance of practical size, it is computationally intractable to solve
a single mathematical program involving all the decisions by a commercial solver. Thus, we propose a two-stage
approach to tackle the Train Design Optimization problem. The first stage is designed to find promising train routes
which serve as route candidates afterwards. The crew-to-train assignment is also considered in this stage. After that,
the second stage explicitly finds block-to-train assignment plan based on the generated train routes. The details of the
two-stage approach are illustrated as follows:
1
2.1 Stage 1: Train Routing Problem
In this stage, column generation technique is employed to generate a set of promising train routes, as it is impossible
to explicitly enumerate all possible train routes. The basic idea is that we begin with an empty set of train routes, and
progressively find good train routes based on the current performance of the train routing plan until no lower cost can
be achieved by adding any more train routes. Note that in this stage, we do not take detailed block-to-train assignment
into account, but only guarantee the train service network is adequate for all requests of block movements.
2.1.1 Block path generation
Before the column generation procedure, for each block OD pair we first generate k shortest paths as the path candi-
dates of the block flows in the network. In this report, we set k = 3. The following parameters and decision variables
are defined:
Table 1: Notation 1
Sets: G1(V,E) a graph representation of the railroad network, where V is a set of allthe stations and E is a set of all railway sections linking two stations
B set of all blocksParameters: ob origin node of block b ! B, ob !V
db destination node of block b ! B, od !Vli j length of link (i, j) ! E
Decision variables: xki j binary, 1 if link (i, j) ! E is used in kth shortest path,
0 otherwise
Then, the problem of block path generation can be formulated as follows:
[P1(b,k)] min !(i, j)!E
li jxki j (1)
s.t. !j!V |(ob, j)!E
xkob j = 1 (2)
!j!V |( j,ob)!E
xkjob = 0 (3)
!j!V |(i, j)!E
xki j " !
j!V |( j,i)!Exk
ji = 0 #i !V |i $= ob,db (4)
!i!V |(i,db)!E
xkidb = 1 (5)
!i!V |(db,i)!E
xkdbi = 0 (6)
2
xki j ! {0,1} "(i, j) ! E (7)
Objective function (1) minimizes the total travel distance from the origin node to the destination node for block b.
Constraints (2)-(3) impose the flow requirement at the source node while Constraints (5)-(6) define similar restriction
at the sink node. The flow conservation constraints at other nodes are specified by (4). Finally, Constraint (7) defines
the domain of the decision variables.
The shortest path for each block can be obtained by solving the above integer program. However, in order to find
kth shortest path, the following cuts are further added:
!(i, j)!E
li jxki j # !
(i, j)!Eli jxk$1
i j + " "k = 2,3 (8)
!(i, j)!E|xk$1
i j =1
(1$ xki j)# 1 "k = 2,3 (9)
!(i, j)!E
li jxki j % 3 !
(i, j)!Eli jx1
i j "k = 2,3 (10)
Constraints (8) and (9) ensure that the generated kth shortest path is different from (k$1)th one. xki j indicates the
optimal solution of the kth shortest path, and " is a sufficiently small constant. Constraint (10) restricts the length of
the kth path is not 3 times longer than the shortest path, as too long paths are not favorable in terms of transportation
cost.
2.1.2 Restricted master problem
The objective of the restricted master problem is to minimize the operational costs except the costs related with work
events and block swaps. This is mainly because the aim of this stage is to generate promising train routes and it is not
very necessary to make a comprehensive consideration of all costs. Before presenting the formulation of the restricted
master problem, additional notations are defined in Table 2.
Then, the restricted master problem can be formulated as follows:
[P-Mst] min c1 !p!P
#p + !p!P
cp#p + !b!B
!q!Qb
vb1cb
q$ bq + c6 !
(m,n)!C%mn/2+ c7 !
i!V&i (11)
s.t. !q!Qb
$ bq = 1 "b ! B (12)
!p!P
'pi j#p % M1i j "(i, j) ! E (13)
!b!B
!q!Qb
'qi jvb2$ b
q $M2i j !
p!P'pi j#p % 0 "(i, j) ! E (14)
3
Table 2: Notation 2
Sets: P set of train routes, initially emptyQb set of block routesC set of crew segments
Parameters: c1 start cost per trainc2 train travel cost per milec3 car travel cost per milec4 cost per work eventci
5 swap cost per block at node i !Vc6 crew imbalance penalty per imbalancec7 train imbalance penalty per imbalancec0 missed cost per railcarvb
1 number of cars in block b ! Bvb
2 the length of block b ! Bvb
3 the tonnage of block b ! B!pi j binary, 1 if train route p ! P uses link (i, j); 0 otherwise!qi j binary, 1 if block route q ! Qb uses link (i, j); 0 otherwise"pmn binary, 1 if crew segment (m,n) !C is employed by train route p ! P,
0 otherwise#1
pi binary, 1 if train path p originates at node i; 0 otherwise#2
pi binary, 1 if train path p terminates at node i; 0 otherwisecp train travel cost on path p ! P, cp = c2 $(i, j)!E !pi jli jcb
q car travel cost of block b ! B on its path q ! Qb, cbq = c3 $(i, j)!E !qi jli j
M1i j maximum number of trains that can pass through link (i, j)
M2i j length limit of trains traveling on link (i, j)
M3i j tonnage limit of trains traveling on link(i, j)
Decision variables: %p " 0, decision variable associated with train path p ! P& b
q " 0, flow of block b ! B on its path q ! Qb
'mn " 0, number of crew imbalances on crew segment (m,n) !C(i " 0, number of train imbalances at node i !V
$b!B
$q!Qb
!qi jvb3& b
q #M3i j $
p!P!pi j%p $ 0 %(i, j) ! E (15)
'mn + $p!P
"pmn%p # $p!P
"pnm%p " 0 %(m,n) !C (16)
'mn # $p!P
"pmn%p + $p!P
"pnm%p " 0 %(m,n) !C (17)
(i + $p!P
#1pi%p # $
p!P#2
pi%p " 0 %i !V (18)
(i # $p!P
#1pi%p + $
p!P#2
pi%p " 0 %i !V (19)
%p,& bq ,'mn,(i " 0 (20)
The objective function (11) minimizes the operational costs including a) train start cost, b) train travel cost, c)
4
car travel cost, d) crew imbalance cost, e) train imbalance cost. The block routing constraints (12) assign a route for
each block. Constraints (13) guarantee that for each link the number of passing trains does not exceed its capacity.
Constraints (14)-(15) ensure that for each link the length and tonnage of the passing trains respect the restrictions. The
decision variables on crew imbalance and train imbalance are defined by Constraints (16)-(19). Finally, Constraint
(20) specifies the domain of the decision variables.
Note that in the master problem, the decision variables are relaxed to be continuous. Thus, the blocks are allowed
to split into several sub-blocks and take multiple partial routes. In order to make the master problem always feasible,
we introduce an auxiliary decision variable µb and revise Constraint (12) to be !q!Qb " bq + µb = 1,"b ! B. Corre-
spondingly, the objective function needs to add one term M !b!B µb where M is a sufficiently large constant. As can
be seen, {µb = 1,"b ! B} is always a feasible solution.
2.1.3 Pricing sub-problem
We associate the constraints of the master problem (12)-(19) with dual variables #1b , #2
i j # 0, #3i j # 0, #4
i j # 0, #5mn $ 0,
#6mn $ 0, #7
i $ 0 and #8i $ 0, respectively. Then the reduced cost of a train route p, denoted as cp, is:
cp := c1 + cp % !(i, j)!E
$pi j#2i j + !
(i, j)!EM2
i j$pi j#3i j + !
(i, j)!EM3
i j$pi j#4i j % !
(m,n)!C(%pmn %%pnm)#5
mn
+ !(m,n)!C
(%pmn %%pnm)#6mn % !
i!V(&1
pi % &2pi)#7
i + !i!V
(&1pi % &2
pi)#8i (21)
We define additional notations for the pricing sub-problem in Table 3. Note that regarding the parameter 'mni j, we
need to find a shortest path between the two nodes of each crew segment, as crews are only allowed to travel on the
shortest path. Fortunately, the formulation designed in Section 2.1.1 can be applied to get 'mni j initialized.
Table 3: Notation 3
Sets: V 0 set of all nodes including the dummy node 0, V 0=V &{0}C0 set of crew segments including dummy ones,
C0 =C&{(0, i),(i,0) "i !V}Parameters: 'mni j binary, 1 if crew segment (m,n) !C passes through link (i, j) ! E,
0 otherwiseDecision variables: xmn binary, 1 if crew segment (m,n) !C0 is employed in the train route,
0 otherwise
The subproblem identifies the train route p' with minimum reduced cost:
5
p! = argminp"P
{cp}
= argminp"P
!c1 + cp # !
(i, j)"E
""2
i j #M2i j"3
i j #M3i j"4
i j##pi j
# !(m,n)"C
""5
mn #"6mn#"
$pmn #$pnm## !
i"V
""7
i #"8i#"
%1pi # %2
pi#$
= argminp"P
!c1 + !
(m,n)"C
%!
(i, j)"E
"c2li j&mni j #"2
i j +M2i j"3
i j +M3i j"4
i j##""5
mn #"6mn#+""5
nm #"6nm#&
xmn
#!i"V
""7
i #"8i#x0i + !
i"V
""7
i #"8i#xi0
$(22)
Then, the pricing subproblem can be formulated as follows:
[P-Sub]min!
c1 + !(m,n)"C
%!
(i, j)"E
"c2li j&mni j #"2
i j +M2i j"3
i j +M3i j"4
i j##""5
mn #"6mn#+""5
nm #"6nm#&
xmn
#!i"V
""7
i #"8i#x0i + !
i"V
""7
i #"8i#xi0
$(23)
s.t. !n"V |(0,n)"C0
x0n = 1 (24)
!n"V 0|(m,n)"C0
xmn # !n"V 0|(n,m)"C0
xnm = 0 $m "V 0 (25)
!(m,n)"C
xmn % Lmax (26)
!n|(m,n)"C
xmn % 1 $m "V (27)
xmn " {0,1} $(m,n) "C0 (28)
The objective function (23) minimizes the total cost of a train route. Constraints (24)-(25) are the flow conservation
constraints. We set an upper limit for the employed number of crew segments by Constraint (26), as a longer train
route may have more work events. Constraint (27) is imposed in order to avoid too complex train route.
We remark that the pricing sub-problem is a shortest path problem but the cost of the links can be negative. Thus,
the obtained train route may contain multiple un-connected sub-tours. In order to avoid this, we need to check the
generated train routes after solving the [P-Sub], and add the following cuts to rerun until no sub-tours exist:
!(m,n)"Sk
(1# xk+1mn )& 1 (29)
6
where Sk is set of crew segments comprising the sub-tours in the kth run.
If the objective value of the pricing sub-problem cp! < 0, we add the train route p! into the train route set P and
rerun the master problem, and again solve the pricing sub-problem. Such a process is repeated until no train route with
negative reduced cost can be found or the set of train routes has reached a pre-defined size of |P|.
2.2 Stage 2: Block-to-Train Assignment Problem
In this stage, the train routes generated in the first stage serve as train candidates, and the remaining task is to de-
cide whether to employ them and also to determine the block-to-train assignment. In addition to the previously
defined physical railroad network G1(V,E), we construct another directed graph G2(N,A) called service network. For
each train p " P and each station m " V , we define a train-position node i " N and let !+(i) and !#(i) denote the
corresponding train and station, respectively. There are two types of arcs linking the nodes: train arc set A1 rep-
resenting the train movement, and swap arc set A2 indicating the block swap between different trains at the same
station, as shown in Figure 1. Note that A1 $A2 = !; A1 %A2 = A; !+(i) = !+( j),(!#(i),!#( j)) " E,&(i, j) " A1;
!+(i) '= !+( j),!#(i) = !#( j),&(i, j) " A2. We further define the notations in Table 4.
A B
D C
a) A physical network with 4 nodes b) A service network with 3 trains and 7 nodes
Train 1
Train 2
Train 3
train arc
swap arc
1,A 1,D
2,B 2,D 2,C
3,B 3,D
Station: A B D C
1( , )G V E 2 ( , )G N A
Figure 1: Two graph representations for the physical network and service network
Note that by defining Ab1 and Ab
2, the number of arcs associated with each block can be significantly reduced. As
we have find k shortest paths for each block, it is easy to identify whether the elements in A1, A2 can be used by the
block. Then, the block-to-train assignment problem can be formulated as follow:
[P-BTA] min c1 "p"P
#p + "p"P
cp#p + c3 "b"B
"(i, j)"A1
vb1li jyb
i j + c4 "(i, j)"A1
zi j + "b"B
"(i, j)"A2
c!#(i)5 yb
i j
+c6 "(m,n)"C
$mn/2+ c7 "i"V
%i + c0 "b"B
vb1&b (30)
7
Table 4: Notation 4
Sets: Ab1 set of train arcs which can be used by block b ! B, Ab
1 " A1Ab
2 set of swap arcs which can be used by block b ! B, Ab2 " A2
Ab set of all arcs which can be used by block b ! B, Ab = Ab1 #Ab
2Ap set of all arcs associated with train route p ! P, Ap " A1
Decision variables: !p binary, 1 if train route p ! P is employed, 0 otherwiseyb
i j binary, 1 if arc (i, j) ! Ab is used by block b ! B, 0 otherwisezi j binary, 1 if train route p ! P has a work event after traveling through
arc (i, j) ! Ap, (work event occurs at node j), 0 otherwise"mn Z+, number of crew imbalances on crew segment (m,n) !C#i Z+, number of train imbalances at node i !V$b binary, 1 if block b ! B is not moved, 0 otherwise
s.t. %j!N|(i, j)!Ab
1
ybi j + $b = 1 $b ! B,$i ! N|&%(i) = ob (31)
%j!N|( j,i)!Ab
1
ybji = 0 $b ! B,$i ! N|&%(i) = ob (32)
%j!N|(i, j)!Ab
ybi j % %
j!N|( j,i)!Ab
ybji = 0 $b ! B,$i ! N|&%(i) &= ob,db (33)
%i!N|(i, j)!Ab
1
ybi j + $b = 1 $b ! B,$ j ! N|&%( j) = db (34)
%i!N|( j,i)!Ab
1
ybji = 0 $b ! B,$ j ! N|&%( j) = db (35)
%b!B
ybi j ' 8!p $p ! P,$(i, j) ! Ap (36)
%(i, j)!A2
ybi j ' 3 $b ! B (37)
zi j ( ybi j % yb
jk $b ! B,$p ! P,$(i, j),( j,k) ! Ap,'2p j &= 1 (38)
zi j ( ybjk % yb
i j $b ! B,$p ! P,$(i, j),( j,k) ! Ap,'1p j &= 1 (39)
%(i, j)!Ap
zi j ' 4 $p ! P (40)
%p!P
(pi j!p ' M1i j $(i, j) ! E (41)
%b!B
vb2yb
i j ' M2i j $(i, j) ! A1 (42)
8
!b!B
vb3yb
i j " M3i j #(i, j) ! A1 (43)
"mn + !p!P
#pmn$p $ !p!P
#pnm$p % 0 #(m,n) !C (44)
"mn $ !p!P
#pmn$p + !p!P
#pnm$p % 0 #(m,n) !C (45)
%i + !p!P
&1pi$p $ !
p!P&2
pi$p % 0 #i !V (46)
%i $ !p!P
&1pi$p + !
p!P&2
pi$p % 0 #i !V (47)
$p,ybi j,zi j,'b ! {0,1} (48)
"mn,%i ! Z+ (49)
The objective function (30) minimizes the sum of a) train start cost, b) train travel cost, c) car travel cost, d) work
event cost, e) block swap cost, f) crew imbalance penalty, g) train imbalance penalty and h) railcar missing penalty.
Constraints (31)-(35) are the flow conservation constraints for each block. Constraints (36) define the relationship
between $p and ybi j, and also guarantee that for each train the maximum number of carrying blocks respects the links’
requirement. Constraints (37) ensure the restriction on the maximum block swaps for each block. Constraints (38)-(39)
define the decision variable of intermediate work event for each train by imposing the relationship between zi j with ybi j,
and Constraints (40) make sure that the number of intermediate work events respects the restriction. The requirement
on the number of trains passing through each link is introduced by Constraints (41). Constraints (42)-(43) impose the
train length and tonnage restriction for each link. The decision variables on crew imbalance and train imbalance are
specified by Constraints (44)-(47). Finally, the domain of all decision variables is defined by Constraints (48)-(49).
3 Implementation and Results
The proposed two-stage approach for the Train Design Optimization problem is coded in C++ and uses CPLEX 12.1
as the underlying optimization solver. The computational experiments are conducted on a PC with 3 GHz CPU and 4
GB RAM. The user-defined parameters, number of train routes |P|, the maximum number of crew segments employed
by train routes Lmax, and the optimality gap E pGap for terminating solving the BTA problem by CPLEX, are selected
by trials. The user-defined parameters are set to balance the computational efficiency and solution quality. Table 5
presents the computational results. Note that if given more computational time, better solutions could be found.
As can be seen from the results, most computational efforts are devoted to the BTA problem in Stage 2, and the
9
Table 5: Computational results
Example Data Set 1 Data Set 2Instance Scale # of nodes 4 94 221
# of blocks 5 239 369# of links 5 134 294# of crew segments 5 154 154
Parameters |P| 10 130 170|Lmax| 3 3 3E pGap 0% 1.5% 3%Train start cost $800.000 $31,600.000 $40,400.000Train travel cost $3,000.000 $350,979.000 $471,700.000Car travel cost $9,716.250 $1,568,219.925 $2,183,846.100
Objective Function Work event cost $1,400.000 $56,000.000 $90,300.000Components Block swap cost $0.000 $4,710.000 $6,480.000
Crew imbalance cost $0.000 $31,800.000 $24,000.000Train imbalance cost $0.000 $36,000.000 $26,000.000Missed cars cost $0.000 $0.000 $420,000.000Total Cost $14,916.250 $2,079,308.925 $3,262,726.100
CPU Time Stage 1 0.16sec 2min 3minStage 2 0.05sec 9min 59minTotal Time 0.21sec 11min 62min
[P-BTA] formulation is very sensitive to the instance scale. A possible reason is that the formulation is link-based
which makes the number of decision variables grows exponentially with the instance size. For future works, it is worth
trying a path-based formulation for the BTA problem.
10