• No results found

Table 7.1: Example instances with their parameters

Instance ∆S S TS y ∆D D TD A 1 15 15 0 5 30 20 B 1 15 15 5 5 30 20 C 5 10 10 5 2 60 15 D 1 10 60 5 10 60 5 E 10 10 60 5 1 60 5 Gd-Rtd 5 10 15 0 1 50 15 Ut-Rtd 5 30 15 20 2 85 30 Non-Convex 1 10 15 0 2 50 5

In order to evaluate our approach to the passenger waiting problem, we applied our calculation to a number of example instances, presented in Table 7.1. The results of our analysis are presented in Table 7.2. Although these results demonstrate our approach quite well, we encourage the readers to experiment with their own instances using our available web-based implementation from Section 7.6.

Table 7.2 can be read as follows: The top table contains the schedule definitions of the instances as discussed in Section 7.3. The bottom table contains the results:

Our competitive analysis from Section 7.4 tells us that we should wait for the rth

144 Passenger Route Choice in Case of Disruptions

Let us also introduce a function g : N0→ [0, 1] such that g(i) gives us the probability

that the ith regular connection can pass the disrupted area, but the (i − 1)th regular connection cannot yet. We calculate g using f in the following way:

g(i) =        f(∆S + y) if i = 0 f(∆S + iTS+ y) otherwise − f(∆S + (i −1)TS+ y)

Now the expected arrival time can be calculated using

E[arr] =∞

i=0

g(i)(∆S + iTS+ S).

If we want to evaluate this formula for a distribution with infinite support, we should terminate the calculation based on some small threshold  and stop it when f(∆S + iTS+ y) >1 − .

Finding an indifference distribution

We first consider uniform distributions, where x is drawn uniformly from the range [0, ω] for a given ω > 0. We will denote the expected arrival time for a given uniform

distribution by Eω[arr]. We want to find an ω such that we are indifferent between

both considered strategies, i.e., such that Eω[arr] = ∆D + D. We can apply a binary

search procedure in order to find an ω that brings us close enough to ∆D + D. The

ωthat we find with this procedure can be used in the decision process as follows:

If we believe it is likely that the real-life distribution behaves uniformly with range [0, a] with a < ω, we should prefer the regular connection over the alternative one. If we believe that a > ω we should prefer the alternative connection over the regular connection. We can apply a similar procedure if x is drawn from the exponential distribution with rate λ.

As long as we consider single parameter distributions for which the expected arrival E[arr] is continuous when regarded as a function of the parameter of the distribution, and we can find lower and upper bounds for the parameter such that one bound gives E[arr] < ∆D+D and the other bound gives E[arr] > ∆D+D, a binary search procedure can produce the value of the parameter for which the passenger will be indifferent between the regular and the alternative connections.

Although the indifference value can also be found analytically, we chose a binary search procedure since it is easy to implement and efficient enough to do computa- tions within less than a second on almost any device. Note that also strategies that let the passenger wait some time and then depart are reasonable (and might minimize the expected arrival time dependent on the respective distribution). It will be part of our further research to include these strategies in the evaluation as well.

7.6 Implementation 145

7.6 Implementation

As many passengers use smartphones during their journeys, we decided to implement the online and average case analysis using a platform that can be executed easily on these devices. Our implementation consists of roughly 250 lines of JavaScript, which can be executed by almost any web browser. This includes some rudimentary input checking and displaying results for the user. Our implementation is available at http://computr.eu/pwp and is able to calculate the results from Section 7.7 instantly on a modern smartphone.

Important for the performance of calculating ω and λ using binary search is the precision of the binary search in approximating ∆D + D. In our implementation, the binary search terminates when |E[arr] − (∆D + D)| < 0.001. Furthermore, for the  in evaluating E[arr] for the exponential distribution we choose 0.001 as well. The expectation for the uniform distribution is evaluated with exact precision, as this distribution has finite support.

7.7 Examples

Table 7.1: Example instances with their parameters

Instance ∆S S TS y ∆D D TD A 1 15 15 0 5 30 20 B 1 15 15 5 5 30 20 C 5 10 10 5 2 60 15 D 1 10 60 5 10 60 5 E 10 10 60 5 1 60 5 Gd-Rtd 5 10 15 0 1 50 15 Ut-Rtd 5 30 15 20 2 85 30 Non-Convex 1 10 15 0 2 50 5

In order to evaluate our approach to the passenger waiting problem, we applied our calculation to a number of example instances, presented in Table 7.1. The results of our analysis are presented in Table 7.2. Although these results demonstrate our approach quite well, we encourage the readers to experiment with their own instances using our available web-based implementation from Section 7.6.

Table 7.2 can be read as follows: The top table contains the schedule definitions of the instances as discussed in Section 7.3. The bottom table contains the results:

Our competitive analysis from Section 7.4 tells us that we should wait for the rth

146 Passenger Route Choice in Case of Disruptions

Table 7.2: Analysis results for the example instances from Table 7.1

Instance r Cr I ω λ 1/λ A 0 1.13 23 0.09 11.6 B 1 1.94 27.25 0.07 14.9 C 3 1.95 94.75 0.02 49.5 D “any” 6.36 64 0.04 28.2 E 0 3.05 40.5 0.04 26.7 Gd - Rtd 2 1.80 67.3 0.03 34.1 Ut - Rtd 2 1.86 105.5 0.02 55.8 Non-Convex 6 1.58 68.5 0.03 34.8 Cr

I . The results of the average case analysis presented in Section 7.5 are given by the

range ω of the uniform distribution and rate λ of the exponential distribution that make the passenger indifferent between taking the first detour train and waiting until the disruption is resolved. This means that if the passenger expects the disruption to vanish before the distributions listed in the table predict, he should wait until the disruption is resolved, while otherwise he should take the first detour train.

Let us first discuss instances A and B. With a regular travel time of 15 minutes and a detour of 30 minutes, the second regular connection will already arrive relatively close to the detour and it can thus be expected that waiting is not very beneficial.

For instance A the competitive analysis reflects this with a choice for r=0. Things

change when we increase y from 0 to 5, as in instance B we get r=1. The adversary

then picks x = 6 and makes us end up in the second regular connection rather than in the alternative connection. However, the average case analysis yields an ω that is quite similar for instances A and B. This holds for 1/λ as well. As both values are not that large, this approach suggests to take the detour.

Instance C is an example where the competitive analysis suggests to wait longer. This is mostly because the alternative connection is quite lengthy compared to the regular connection. As a result, waiting for the next regular departure takes only a small amount of time compared to the increase in travel time of the detour. The large values of the uniform distribution with range ω ≈ 95 and the exponential distribution with mean 1/λ ≈ 50 suggest we should wait.

Instance D is interesting, as all values for rwithin the range considered yield the

same competitive ratio. This is due to the adversary exploiting that y > 0 by letting the passenger take one regular connection later than the first one to pass through the disruption, by picking x = 6. Regardless of the waiting strategy, in the worst case the passenger will end up in the second departure of the regular connection.

7.7 Examples 147

If we swap ∆D and ∆S, we end up in instance E and we get a better competitive ratio if we always pick the first detour. The impact of the swap of ∆D and ∆S on the uniform range ω is quite large, while the exponential mean 1/λ barely changes. Therefore, interpreting the best strategy in this situation is quite difficult, but if we are risk-averse we can safely take the detour.

The examples presented in Figures 7.1 and 7.2 yield a competitive ratio of 1.80 and 1.86. In the Gd-Rtd scenario, it pays off to wait for 30 minutes to make sure that no early regular connection departs whose 10 minute trip length is much faster than the 60 minutes of the detour. For the Ut-Rtd scenario, the competitive ratio increases slightly, but the way in which it is attained is different. The best decision for the adversary is to release the disruption before the passenger stops waiting, while for the Gouda-Rotterdam case, it is better for the adversary to let the passenger take the detour. 0 0.5 1 1.5 2 2.5 0 1 2 3 4 5 6 7 8 9 10 11 𝑟𝑟𝑟𝑟 𝐶𝐶𝐶𝐶𝐼𝐼𝐼𝐼𝑟𝑟𝑟𝑟

Figure 7.3: An example where the behavior of Cr

I as a function of r behaves non-

convex

Finally, we have the non-convex scenario with a detour connection that is much more frequent than the regular one. This leads to non-convex behavior in the com- petitive ratio, as can be seen in Figure 7.3. Since there is no departure of the regular connection scheduled between the departures of the detour connection with r = 1 and r = 3, the detour connection with r = 1 dominates the detour connection with

r=2, as there is no opportunity to benefit from the resolution of the disruption in

that interval. This example justifies that we indeed have to try a set of different values for r as suggested by Theorem 7.2.

To conclude, these example instances show that there is no strategy which is clearly superior in all cases, and the question which strategy is best depends both on the preferred quality measure and on the periodic timetables of the instance under consideration.

146 Passenger Route Choice in Case of Disruptions

Table 7.2: Analysis results for the example instances from Table 7.1

Instance r Cr I ω λ 1/λ A 0 1.13 23 0.09 11.6 B 1 1.94 27.25 0.07 14.9 C 3 1.95 94.75 0.02 49.5 D “any” 6.36 64 0.04 28.2 E 0 3.05 40.5 0.04 26.7 Gd - Rtd 2 1.80 67.3 0.03 34.1 Ut - Rtd 2 1.86 105.5 0.02 55.8 Non-Convex 6 1.58 68.5 0.03 34.8 Cr

I . The results of the average case analysis presented in Section 7.5 are given by the

range ω of the uniform distribution and rate λ of the exponential distribution that make the passenger indifferent between taking the first detour train and waiting until the disruption is resolved. This means that if the passenger expects the disruption to vanish before the distributions listed in the table predict, he should wait until the disruption is resolved, while otherwise he should take the first detour train.

Let us first discuss instances A and B. With a regular travel time of 15 minutes and a detour of 30 minutes, the second regular connection will already arrive relatively close to the detour and it can thus be expected that waiting is not very beneficial.

For instance A the competitive analysis reflects this with a choice for r=0. Things

change when we increase y from 0 to 5, as in instance B we get r=1. The adversary

then picks x = 6 and makes us end up in the second regular connection rather than in the alternative connection. However, the average case analysis yields an ω that is quite similar for instances A and B. This holds for 1/λ as well. As both values are not that large, this approach suggests to take the detour.

Instance C is an example where the competitive analysis suggests to wait longer. This is mostly because the alternative connection is quite lengthy compared to the regular connection. As a result, waiting for the next regular departure takes only a small amount of time compared to the increase in travel time of the detour. The large values of the uniform distribution with range ω ≈ 95 and the exponential distribution with mean 1/λ ≈ 50 suggest we should wait.

Instance D is interesting, as all values for rwithin the range considered yield the

same competitive ratio. This is due to the adversary exploiting that y > 0 by letting the passenger take one regular connection later than the first one to pass through the disruption, by picking x = 6. Regardless of the waiting strategy, in the worst case the passenger will end up in the second departure of the regular connection.

7.7 Examples 147

If we swap ∆D and ∆S, we end up in instance E and we get a better competitive ratio if we always pick the first detour. The impact of the swap of ∆D and ∆S on the uniform range ω is quite large, while the exponential mean 1/λ barely changes. Therefore, interpreting the best strategy in this situation is quite difficult, but if we are risk-averse we can safely take the detour.

The examples presented in Figures 7.1 and 7.2 yield a competitive ratio of 1.80 and 1.86. In the Gd-Rtd scenario, it pays off to wait for 30 minutes to make sure that no early regular connection departs whose 10 minute trip length is much faster than the 60 minutes of the detour. For the Ut-Rtd scenario, the competitive ratio increases slightly, but the way in which it is attained is different. The best decision for the adversary is to release the disruption before the passenger stops waiting, while for the Gouda-Rotterdam case, it is better for the adversary to let the passenger take the detour. 0 0.5 1 1.5 2 2.5 0 1 2 3 4 5 6 7 8 9 10 11 𝑟𝑟𝑟𝑟 𝐶𝐶𝐶𝐶𝐼𝐼𝐼𝐼𝑟𝑟𝑟𝑟

Figure 7.3: An example where the behavior of Cr

I as a function of r behaves non-

convex

Finally, we have the non-convex scenario with a detour connection that is much more frequent than the regular one. This leads to non-convex behavior in the com- petitive ratio, as can be seen in Figure 7.3. Since there is no departure of the regular connection scheduled between the departures of the detour connection with r = 1 and r = 3, the detour connection with r = 1 dominates the detour connection with

r=2, as there is no opportunity to benefit from the resolution of the disruption in

that interval. This example justifies that we indeed have to try a set of different values for r as suggested by Theorem 7.2.

To conclude, these example instances show that there is no strategy which is clearly superior in all cases, and the question which strategy is best depends both on the preferred quality measure and on the periodic timetables of the instance under consideration.

148 Passenger Route Choice in Case of Disruptions