• Keine Ergebnisse gefunden

Non-Negligible Interchange Times

4.3 Non-Negligible Interchange Times

Towards a more realistic scenario we need to take the time necessary for changing trains into account as well. Therefore, we will now extend both models to cover non-negligible interchange times.

4.3.1 Extending the Time-Expanded Graph

In a first step, we extend the basic time-expanded model to cover constant interchange times, which we will modify further at the end of this section to be applicable to variable interchange times as well.

4.3.1.1 Constant Interchange Times

Pyrga et al. [PSWZ04a] propose the concept of change nodes in the time-expanded graph.

In this approach a copy of all departure and arrival nodes is kept for each station. These are called change nodes. The waiting edges are only introduced between change nodes, linking them by increasing time values at each station. For every original arrival node there are two additional outgoing edges: one, called entering edge, connecting a change node to the departure node of the same train and the other, calledleaving edge, connecting an arrival node to the change node whose time stamp is no less than the time stamp of the arrival event plus the minimum interchange time for this station.

In order to describe the model formally, let S, S0 be stations, z be a train, dzS the departure node at stationSbelonging to trainz, andazS the arrival node at stationSfor trainz. ThenG= (V, E), withV =D∪A∪C andE=Z∪W∪L∪E∪Y, where

• Dis the set of departure nodes,

• Ais the set of arrival nodes,

• Cis the set of change nodes with|C|=|D∪A|,

• Z = S

SS0ZSS0 is the set of train edges, where for each pair of stations S, S0: ZSS0 ={(dzS, azS0) :dzS ∈D, azS0 ∈A, zis a train} ,

• W =S

SWSis the set of waiting edges connecting a change node to the next change node at the same station, whereWS={(cS, c0S) :cS, c0S ∈C},

• L={(azS, cS) :azS∈A, cS ∈C} is the set of edges for leaving a train,

• E={(cS, dzS) :cS ∈C, dzS ∈D}is the set of edges for entering a train, and

• Y ={(azS, dzS) :azS ∈, dzS ∈D}is the set of edges for staying in a train, connecting the arrival of a train at a station to the departure of the same train at that station.

An example can be seen in Figure4.2.

4.3.1.2 Variable Interchange Times

As mentioned in Section1.1, there are several different interchange times in the German timetable data. In the case that these interchange times depend on the train class, we see two possibilities to further extend the model.

t*

t’

t’

t

t

t’’

change departure arrival

f

g e

h b a

time

Figure 4.2: Example for the time-expanded model with change nodes for constant interchange times and the extension with a special-interchange edge (f) for non-constant interchange times. Edgef allows the change fromttotalthough the change to the later departingt0 is not allowed.

(a) The platform model. At each station we introduce virtual platformspi,i∈PS. The change nodes are organized not only in one cycle per station but there is a cycle for each of the virtual platforms pi. The arrival event aof a train at virtual platform pi at time τ is connected to the event vj at platform pj with timestamp τ +τij

whereτij is the time needed for a transfer from a train at platformpito a train at platformpj.

(b) Adding special-interchange edges. Instead of introducing virtual platforms, we can add what we call special-interchange edges. We defineτχ to be the maximum over all interchange times at stationSfor a train arriving at nodeawith timeτ. Arrival nodeais connected to the change nodec with time stampτ0≥τ+τχ by a regular leaving edge. For all departure eventsdiwith a time stampτi< τ+τχwhich can be reached according to the interchange regulations, an additional special-interchange edge (a, di) is introduced.

An example for the second model is provided in Figure 4.2.

If there are many events reachable froma beforeτ+τχ but not many platforms the platform-based model is better in terms of memory consumption. But note that the second model can easily be extended to handle a range of different kinds of interchanges independent of platforms and train classes.

4.3.2 Extending the Time-Dependent Graph

Pyrga, Schulz, Wagner and Zaroliagis proposed two approaches for modeling the Earliest Arrival Problem with non-zero interchange time using a time-dependent graph [PSWZ04a].

One is based onplatform information, the other incorporatestrain routes. Both variants are applicable for constant as well as variable interchange times. We will only show the extensions to model constant interchange times using train routes.

4.3 Non-Negligible Interchange Times 39

0 0 0

0 0

0 0

A B

A B

pA

0

pA1

pA

2

pB0

pB

1 pB2

pB

3

pCi

pDj fpA

0pB0

fpB

1pA2

gA gA

gA

gB gB gB gB

Figure 4.3: An example for modeling a time-dependent graph with non-negligible constant interchange times using train routes.

Constant interchange times using train routes

Nodesv1, v2, . . . , vk,k >0 form atrain route if there is a train starting its journey atv1, and visiting v2,. . .,vk consecutively. If there is more than one train following the same schedule (with respect to the order in which they visit the above nodes) all these trains belong to the same train routeR. Note that it can bevi=vj fori6=j , for example when the train performs a loop.

Foru∈ S, let Σu denote the set of different train routes that stop at u. Let Ru be the set containing exactly one node at ufor each of the train routes Rin Σu. We define ρ(u) = |Ru| and R = S

u∈SRu. Then the new node set of the time-dependent graph G= (V, E) isV =S ∪ R. Foru∈ S letpui, 0≤i < ρ(u), denote the node representing thei-th train routeR∈Σu.

Again, the edge setE=A∪D∪Dˆ∪Rconsists of four different types of edges, namely the following:

• A=S

u∈SAu, where Au=S

0≤i<ρ(u){(pui, u)},

• D=S

u∈SDu, whereDu=S

0≤i<ρ(u){(u, pui)},

• Dˆ =S

u∈Su, where ˆDu=∅ if all trains that stop atuhave identical interchange time, and ˆDu=S

0≤i,j<ρ(u),i6=j{(pui, puj)}otherwise, and

• T =S

u,v∈STuv, whereTuv=∅if there is no train route visitinguandvsuccessively and

Tuv= [

0≤i<ρ(u) 0≤j<ρ(v)

{(pui, pvj) :pui, pvj being the corresponding route-nodes},

otherwise.

Edges e∈T are calledtrain edges and edgese∈A∪D∪Dˆ are calledtransfer edges.

The modeling with train routes is based on the following assumption.

Assumption 4.2. For any two nodespui,pvj connected by a train edge (pui, pvj)∈T and departure timesτd, τd0 from pui, for the respective arrival timesτa, τa0 atpvj it holds that

τd≤τd0⇒τa≤τa0.

In other words, there is no train t1 serving the same connection as t2 which departs later than t2, overtakes t2, and arrives earlier than t2 at the next station. In case the assumption is violated the train route concerned is split into two (or more) different train routes, for example by separating the trains into different speed classes.

Using a graph constructed in this way a fastest connection can be calculated by a time-dependent variant of Dijkstra’s algorithm.

Further Extending the Time-Dependent-Model For more steps towards a realis-tic scenario we refer to the description of our prototype of a time-dependent timetable information system in Chapter10.

4.4 Discussion: Time-Expanded