A Co-evolutionary Algorithm for Train Timetabling

19 downloads 164 Views 129KB Size Report
franchised independent train operating companies. (TOCs). ... optimization of train timetables has been limited. ..... Search, Optimization and Machine Learning,”.
University of Leeds

SCHOOL OF COMPUTING RESEARCH REPORT SERIES Report 2003.13

A Co-evolutionary Algorithm for Train Timetabling by Raymond S K Kwan & Paavan Mistry

July 2003

Abstract- With many train operating companies sharing limited capacity on the UK rail network, the train timetabling problem is complex and difficult to solve. This paper reports on a co-operative co-evolutionary approach for the automatic generation of planning train timetables at the early stages of the timetabling process, when the main objective is to try to accommodate the bids as much as possible and to identify the major conflicts that need resolving by negotiations with the train operating companies. Some test experiments based on artificial problem instances as well as a real network are discussed.

in expensing great effort in trying to produce fully operable timetables at that stage. Many finedetailed operational constraints would be ignored initially. The timetables produced at this stage, which will be called ‘planning timetables’, are used as the basis for planning and negotiations. After many iterations of refinements and detailed conflict resolution, the planning timetables would eventually be evolved into the final ‘operational timetables’. This paper concerns the automatic generation of planning timetables, which still demand a high degree of accuracy and optimization for them to be useful. The research on automatic generation and optimization of train timetables has been limited. However, research has been done on train scheduling and regular timetable optimization. Caprara et al. (Caprara, 2001) consider the EU policy perspective and use heuristics with the Lagrangian relaxation technique that refines a given timetable. Lindner (Lindner, 2000) focusses on regular train timetables and the algorithm employs a Mixed Integer Linear Programming (MILP) method suitable for hub-and-spoke type rail networks. Work done by (Peeters and Kroon, 2000) focusses on the optimization of cyclic regular railway timetables. The UK rail network has a structure that is complex to integrate, which makes it difficult to achieve cyclic regularised train timetables that are common in many European countries.

1 Introduction The UK train services are operated by a number of franchised independent train operating companies (TOCs). However, the rail infrastructure such as tracks and stations are shared and centrally run by a single operator Network Rail (formerly Railtrack), which is therefore responsible for coordinating bids from the TOCs for the train services that they would like to operate, so that the UK rail infrastructure capacity is not exceeded and its usage would be conflict free. This paper considers the train timetabling problem Network Rail faces at the early stage when the TOCs have just submitted their bids. Network Rail would resolve all the conflicts through careful scheduling and negotiations to produce the UK Train Timetable, which is updated and made available to the public twice a year. Since this is a very complex task, the planning and scheduling process has to be started about 18 months before the new UK Train Timetable goes live. It is recognised that at the early stage of the timetabling process, conflicts arising from the timetables are unavoidable given the limited capacity of the rail network and the diverse requirements and objectives of the TOCs. Therefore there is no point

(van Wezel et al, 1994) discusses a system designed for the Dutch Railways that minimizes the halting times at the stations and finds the optimal departure times subject to several equality and inequality constraints. Optimization of timing coordination and capacity allocation has been researched by (Carey et. al, 1998) (Carey, 1998) and (Zwaneveld et. al, 1996), but the optimization process assumes that a set of train timetables have already been compiled.

1

In UK, Railtrack commissioned AEA Technology Rail in the development of a system, called Planning Timetable Generator (PTG), based on simulated annealing (Kirkpatrick et al, 1983, Dowsland, 1993) for the automatic generation of train planning timetables since 1997 (Watson et al, 2000). Although simulated annealing is simple to apply and very quick to implement, the approach may be limiting the ability to scale up PTG for larger and less simplified problems. Hence we are motivated to investigate an alternative approach. In recent years, evolutionary algorithms have demonstrated a lot of success in solving complex and large practical problems efficiently. In this paper, we explore how our train timetabling problem could be substructured so that solutions for each component are evolved by a separate evolutionary algorithm. In that context, a collaborative scheme is operated between the co-evolved species so that solutions from each problem sub-structure can be pooled together to derive a better evaluation than if members of each species were evaluated in isolation. One anticipated advantage of this cooperative co-evolution approach is that the algorithm would be well suited for future exploitation of high performance parallel computing architecture, thereby scaling up its power.

is complemented by the “Rules of the Plan” and “Rules of the Route” (ROTP/ROTR) issued by Network Rail setting out the parameters for safe operation and maintenance of the network. The train trips that the TOCs propose to run are mainly specified in terms of stopping patterns that can be mapped onto the NID. There would also be a set of business objectives, largely for the TOCs, associated with the train trips proposed. There are three types of key solution variable: Departure times Scheduled runtimes Resource options at a station A departure time has to be decided for each of the train trips being timetabled. Propagating from these departure times with references to the standard parameters in the ROTP/ROTR, timings of the trains along their stopping patterns can be derived. It is then possible to determine the relative train movements along the tracks and at the stations or key junctions. However, within the permitted bounds the journey times (called “pathing”) between adjacent stations and the dwell times at stations of the train could be adjusted for coordination purposes. In this paper, we shall treat pathing and dwell time variables together, following the stopping patterns of the trains being timetabled, and collectively we shall call them scheduled runtimes.

In Section 2, we shall describe our train timetabling problem in terms of its key solution variables, constraints and objective function. The key solution variables are treated as sub-structures of the problem. The assumptions and simplifications made on the domains of these variables will be discussed. The genotypes of their corresponding species will also be described. In Section 3, we shall describe the co-operative co-evolutionary algorithm. In Section 4, some experiments including a test case based on a train network in southern England will be discussed. Finally, conclusions and further work will be remarked in Section 5.

Train stations may have many platforms and complicated track layouts, which could also be used for resolving timetable conflicts and soft constraints. In this paper, we have simplified the problem by assuming that each station and the track layout in its vicinity is represented by a number of alternative through routes joining two notional ends of the station, and we call them resource options at the station. 2.1 Key Variables

2 The train timetabling problem 2.1.1 Departure Times In this paper, half-minute is used as the basic time unit. Departure times are expressed as integer

The UK rail network is comprehensively described in the National Infrastructure Database (NID). This 2

Figure 1b: Train graphs of t with different scheduled runtimes

number of half-minutes from a starting time of the day of operations. The chromosome representing a solution to this problem sub-structure is therefore simply a vector of integers.

For illustration, Figure 1a shows two chromosomes with different configurations of scheduled runtimes for a certain train. ‘0’ and ‘1’ indicate the lower and higher alternative scheduled runtimes respectively and the precise values can be looked up easily. Figure 1b is a train graph showing the timedisplacement of the train corresponding to the two configurations of scheduled runtimes.

The genetic operator used for evolving the solution population is the adaptive step-size mutation Evolution Strategy (ES) (Hansen et al, 2001) (Ostermeier et al, 1994). Each chromosome has an associated vector of mutation step-sizes, e.g. +2, -1 correspond to adding 2 and subtracting 1 halfminute respectively to the associated gene values. In each generation, the mutation step-sizes are probabilistically applied to produce new offspring. The mutation vector inherited by the offspring is updated by retaining all the step-sizes that have been applied and replacing the rest by randomly generated new step-sizes. A Gaussian distribution is used, which favours smaller step-sizes so that it is less likely to result in drastic changes in departure times between generations.

2.1.3 Resource options Even though already simplified, the number of resource options may still be quite large at many stations. Furthermore, some trains might only use a subset of the resource options with individual preferences. In this paper, we shall further simplify the problem by assuming that there are only two resource options at each station and that both options are available to all trains. Similar to scheduled runtimes, a ‘0’, ‘1’ binary string is used to represent resource options chromosomes.

2.1.2 Scheduled Runtimes

2.2 Constraints The train timetabling problem has many hard and soft constraints. The hard constraints are mainly set out in the ROTP/ROTR, and the soft constraints largely reflect the commercial objectives of the TOCs. In this paper, only the following hard and soft constraints are considered.

Although in theory any amount of extra time could be added to a train journey, in practice the scheduled runtimes would be set within a small range. For planning timetables, we make a further simplification that each scheduled runtime is chosen between two discrete values. Train t SR 1

0

0

0

0

0

SR 2

1

0

1

1

0

2.2.1 Hard Constraints • Headway is the minimum safe distance (time gap) between two trains travelling in the same direction on the same track. • Runthrough occurs when a train would overtake, according to the timetable, another train that share the same track/platform. • Resource over-allocation occurs when a resource option at a station is allocated to two or more trains at the same time. 2.2.2 Soft constraints • Key Time/Time windows: TOCs may prefer certain trains to arrive/depart at specific times (or within some time windows) at some stations. • Connections: Some trains might be best to arrive within a time window so that passengers could connect with another service at a selected station.

Figure 1a: Scheduled runtimes chromosome (SR) Station A

SR 1 SR 2

B

C

D

3

• Clockface Timings: Regular train services might be preferrable to use the same minutes-inthe-hour departure times, e.g. an hourly service departing at 10 minutes to the hour. • Evenness Groups : It may be preferrable to spread out evenly a group of trains servicing the same stretch of route

be treated as their representatives. Whenever a new individual of Pd is created, a complete timetable is derived using itself and the representatives from the other two species, and that individual is assigned a fitness being the objective function value of the complete timetable.

2.3 Objective function As explained earlier, the prospect of satisfying all the constraints is very slim at the stage of producing the planning timetables. Hence, penalty weights are assigned to each type of constraint violation. Generally hard constraints attract very large penalties compared to those for soft constraints. The objective function of our train timetabling problem is to minimise the weighted sum of violations (expressed in time units). Although the problem sub-structures are optimised as separate species, each instance of a species is evaluated after a solution for the full problem has been derived from it. Therefore the objective function is also applicable as the fitness function for the evolutionary algorithms of the co-evolved species.

As discussed in Section 2.1.1, Evolution Strategy (ES) is the main genetic operator for Pd . We use a simple (1+ λ )-ES scheme, in which λ offspring are produced by mutation from a single parent. In this paper, λ = 5 is used. For both Pp and Pc , a simple genetic algorithm (GA) (Goldberg, 1989) is used. The parameters used are given in Table 1. Table 1: GA parameters for

3 Co-operative Co-evolutionary Algorithm

Pp and Pc

Parameter

Value

Population Size

10

Crossover Probability

0.85

Crossover Type

Uniform

Mutation Probability

0.01

Selection Type

Tournament

The co-operative co-evolutionary algorithm is summarised below.

Parallel evolution of problem sub-components that interact in useful ways to optimize complex higher level structures has been introduced in work done by (Hillis, 1990) (Husbands et. al, 1991) (Potter et. al, 1994). The advantages of such decomposition are independent representation of interacting subcomponents and evolution of these subcomponents that facilitate an efficient concentrated exploration of the search space (Potter et. al, 1995). Discussed in section 2, the train timetabling problem is sub-structured and represented by co-evolving species - departure times Pd , scheduled runtime patterns Pp , and

Initialize ( Pd , Pp , Pc ) Assign Initial Fitness ( Pd , Pp , Pc ) While termination conditions not met Evolve Pd using (1+ λ )-ES For each individual of Pd Evaluate using collaborators from Pp , Pc Evolve Pp using simple GA For each individual of Pp Evaluate using collaborators from Pd , Pc Evolve Pc using simple GA For each individual of Pc Evaluate using collaborators from Pd , Pp

resource options Pc . The co-evolutionary algroithm evolves each of the species in turn for a pre-determined number of generations. For example, when Pd is being evolved, one member from each of Pp and Pc will

4

Collaborators are picked from the respective population using a greedy selection method: the fittest of two randomly inspected individuals is selected.

case points T10 T20 T40 T50 T60 T80 T90

4 Experiments In this section, we report two sets of test experiments. The first set uses artificially generated problem instances, and the second set uses data adapted from a rail network in southern UK. In the following discussion, we shall call our coevolutionary algorithm CCTT. For comparison purposes, a simulated annealing algorithm (SA) has also been implemented based on the PTG system from AEA Technology Rail. Both CCTT and SA are implemented under the same set of assumptions and simplications to the problem. This has enabled us to concentrate on research issues and not be obscured by the complexity of a commercial system if we were to compare with PTG directly. All the tests were run on a 2 GHz Pentium 4 PC with 512 MB memory

Connections 5 10 10 10 20 30 30

Clockface 0 5 20 20 20 25 30

Total 10 20 40 50 60 80 90

Table 3 summarises the results of 5 runs using different random number seeds and each run is for 1000 iterations of the algorithms. Table 3: Results of initial tests Tes t cas e T10 T20 T40 T50 T60 T80 T90

4.1 Initial tests

SA Best Fitnes s 2212 1819 3462 4064 5194 6064 7383

Ave. Fitnes s 2345 2116 3734 4368 5986 6965 8357

Time (sec) 2.41 2.35 3.43 3.84 4.32 5.73 7.46

CCTT Best Fitnes s 1135 1681 2734 3395 4528 5575 6549

Ave. Fitnes s 1526 1952 3085 3857 4984 6276 7255

Time (sec) 3.12 3.53 3.58 4.79 5.19 7.13 8.45

In Table 3, lower values represent better fitness. The results show that CCTT converges to fitter solutions faster than SA, although CCTT takes marginally higher CPU times.

Table 2 summarises 7 instances of artificially generated problems. Each instance has 150 trains to be timetabled within a 2 hour period. Of the 150 trains, 50 of them have fixed departure times. The problem instances differ in the number of trains that have soft constraints attached.

4.2 Case study of a network in southern UK Figure 2 shows a section of rail network in southern UK. The network includes inter-city, regional and freight trains. The network consists of 36 stations and 42 sections of tracks.

The number of conflict points where constraint violations are possible is also tabulated. Problems with larger number of conflict points are generally more difficult to solve. The problem instances represet a mix of planning situations, e.g. T10 considers very few soft constraints and T90 has the most, which might reflect how fine-grained the timetable planning process is. Table 2: Initial test instances

Test Conflict

1120 1423 1835 2743 3225 3733 4083

Key times 5 5 10 20 20 25 30

Trains with soft constraints

5

CCR – TCR ECN – PLY

2 2

4 0

Table 5 : Commercial Constraints Constraint Key Times/Time Windows

Connections Clockface timings Regular services (Evenness groups)

Trains VIC – GWK FAR – BTN ECN – FAR VIC – BTN DKG-VIC VIC - HST 0 CCR-CHM CCR-TCR

No. of Trains 23

4 0 4

In this case study, the track and platform occupation of the trains at the stations they visit are already pre-specified. Hence, we concentrate on just the optimization of departure times and scheduled runtimes in our tests. Values used for the constraint violation penalty weights are given in Table 6. Figure 2: A southern UK network

Table 6: Constraint violation penalty weights

Table 4 summarises the train services to be timetabled. There are 63 trains with varying stopping patterns. Table 5 summarises the soft commercial constraints.

Operational Type Weight Runthrough 4000 Headway 66 Violation

Table 4: Train services covered Train Service

No. of Trains

VIC – GWK FAR – BTN ECN – FAR VIC – BTN VIC – HST LHT – VIC VIC – PMH RDG – GWK HSM – VIC VIC – BRS DKG – VIC TBG – MWT LBR – ECN VIC – EGD VIC – LBR RDG – RHL STN – VIC VIC – WCY CCR – CHM

8 5 5 5 2 1 1 2 2 2 4 2 4 2 4 2 2 4 2

No. of stops (each train) 0 7 2 2 7 7 9 1 5 4 5 5 2 3 3 0 3 2 4

Commercial Type Weight Key Time 5 Key 10 Window Connecti- 5 on Evenness 10

We ran SA and CCTT with different random number seeds 5 times and after 300 iterations, the results achieved by both the algorithms are compared. Figure 3 compares the best fitness of the solutions. The results of SA level off quite quickly, whereas CCTT continued to yield improved solutions.

6

Acknowledgements We would like to thank AEA Technology Rail for their collaboration, advice and access to their Planning Timetable Generator (PTG) system.

Figure 3: Graph of best fitness solutions

Table 7 compares the constraint violations in the best solutions found.

Table 7: Constraints violated in the best solutions Type Runthroughs Headway Key Time Key Window Connection Evenness

SA Violations 3 23 3 5 3 3

CCTT Violations 2 16 5 1 2 3

5 Conclusions and future work In this paper, we have present a novel approach for the automatic generation of planning train timetables. Based on co-operative co-evolution, the train timetabling problem is decomposed into focussed modules. Experimental results have demonstrated that the approach is promising. So far there is very little research work on this particular train timetabling problem, and there are many possible directions in furthering this on-going research. For example, the allocation of tracks and platforms at stations may have to be improved to be more realistic; the fitness evaluation function is perhaps the most computationally expensive aspect of this approach, it might be sufficient to use rougher but faster evaluation methods at some stages of the algorithm.

7

Bibliography Back, T. (1996) “Evolutionary Algorithms in Theory and Practice,” Oxford University Press.

Kirkpatrick, D., Gelatt, C.D. and Vecchi, M.P. (1983). Optimization by simulated annealing. Science, Vol 220, pp.671-680.

Caprara, A., Fischetti, M., Guida, P.L., Monaci, M., Sacco, G. and Toth, P. (2001) “Solution of the Real-World Train Timetabling Problems,” Proceedings of the 34-th Hawaii International Conference on System Sciences, IEEE Computer Society Press.

Kwan, R. S. K. and Mistry, P. (2003) “A Coevolutionary Algorithm for Train Planning Timetable Generation,” To be published In Proceedings of Multi-desciplinary International Conference on Scheduling: Theory and Application, Nottingham, UK.

Carey, M. (1998) “Optimising Scheduled Times, Allowing for Behavioural Response,” Transportation Research - B, 32(5),329-342.

Lindner, T. (2000) “Train Schedule optimization in public rail transport,” PhD thesis, Technische Universitat Braunschweig, Germany. Lindner, T. and Zimmermann, U. (2000) “CostOriented Train Scheduling,” In Eighth International Conference on Computer Aided Scheduling of Public Transport (CASPT 2000), Berlin, Germany.

Carey, M. and Lockwood, D. (1998) “A Model, Algorithms and Strategy for Train Pathing,” Journal of Operational Research Society, 46(8), 9881005.

Michell, M. (1998) “An Introduction to Genetic Algorithms,” MIT Press.

Dowsland, K.A. (1993). Simulated Annealing. In Reeves, C.R. (Editor), Modern heuristic techniques for combinatorial problems, Blackwell Scientific Publications, Chapter 2, pp.20-69.

Mistry, P. and Kwan, R. S. K. (2003) “Generation and Optimization of Train Timetables using Coevolution,” In Proceedings of Genetic and Evolutionary Computation Conference (GECCO 2003), Chicago, USA. Springer-Verlag.

Goldberg, D. E (1989) “Genetic Algorithms in Search, Optimization and Machine Learning,” Addison-Wesley.

Ostermeier, A. Gawelczyk, A. and Hansen, N (1994) “A derandomized approach to self adaptation of Evolutionary Strategies,” Evolutionary Computation, 2(4):369-380.

Hansen, N. and Ostermeier, A. (2001) “Completely Derandomized Self-Adaptation in Evolution Strategies,” Evolutionary Computation, 9(2):159-195. MIT Press.

Peeters, L. and Kroon, L. (2000) “A Cycle Based Optimization Model for the Cyclic Railway Timetabling Problem,” In Eighth International Conference on Computer Aided Scheduling of Public Transport (CASPT 2000), Berlin, Germany.

Hillis, D. (1990) “Co-evolving parasites improve simulated evolution as an optimization procedure,” Artificial Life II, 313-324, Addison-Wesley. Husbands, P. and Mill, F. (1991) “Simulated coevolution as the mechanism for emergent planning and scheduling,” In Proceedings of the Fourth International Conference on Genetic Algorithms, 264-270, Morgan Kaufmann.

Potter, M. and De Jong, K.(1994) “A cooperative coevolutionary approach to function optimization,” In Proceedings of Third Conference on Parallel

8

Problem Solving from Nature, Jerusalem, Israel. Springer-Verlag. Potter, M. and De Jong, K.(1995) “Evolving Complex Structures via Cooperative Coevolution,” In Proceedings of Fourth Annual Conference on Evolutionary Programming, 307-317, San Diego, USA. MIT Press. Schwefel, H. P. (1995) “Evolution and Optimum Seeking,” New York,Wiley. Schwefel, H. P. and Rudolph, G. (1995) “Contemporary Evolution Strategies,” In Proceedings of Third ECAL:Advances in Artificial life, Berlin, 893-907, Springer-Verlag. Watson, R., Cooper, G.B., Nicholls, S.N., Grant, B. and Wood, D. (2000). The role of automated timetable generation in the development of improved railway/mass transit timetables and infrastructure configurations – a simulated annealing approach assessed from a business perspective. Presented at the Eighth International Conference on Computer-Aided Scheduling of Public Transport (CASPT 2000), Berlin. van Wezel, M et al. (1994) “Genetic Improvement of Railway Timetables,” In Proceedings of Third Conference on Parallel Problem Solving from Nature, Jerusalem, Isreal. Zwaneveld, P. et. al (1996) “Routing Trains Through Railway Stations: Model Formulation and Algorithms,” Transportation Science, 30, 181 194.

9

Suggest Documents