• No results found

The inter-arrival time between consecutive buses at bus stops

N/A
N/A
Protected

Academic year: 2021

Share "The inter-arrival time between consecutive buses at bus stops"

Copied!
55
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

BSc Thesis Applied Mathematics

The Inter-arrival Time between Consecutive Buses at Bus Stops

Huan Wu

Supervisor: Richard J. Boucherie

January 24, 2020

Department of Applied Mathematics

Faculty of Electrical Engineering,

Mathematics and Computer Science

(2)

Acknowledgement

I would like to express my sincere thanks and gratitude to my supervisor Professor Richard J. Boucherie for his professional guiding, generous support and encouragement throughout the whole process of doing this project and thesis writing. Honestly speaking, I cannot fulfil this project without his guidance and help.

I would also like to extend my gratitude to Rutger Mauritz, Weiting Cai and Di Zhuang for their kind help and support. Thank you for helping me whenever I have difficulties in programming. Besides, I would also like to thank my parents for their unconditional love and support to me without which I cannot go through this tough academic journey overseas.

In addition, I would also like to thank my cousin Xiaoping Wu for helping me about the

English writing. Thank you for helping me correct the grammar and typo mistakes in this

thesis. Last but not the least, my thanks also goes to Bram A.J. Jonkheer and other lovely

guys like Sven Dummer, Wisse van der Meulen whom I hang out with during the three

years of studying in University of Twente, who make the tough time joyful and fun.

(3)

The Inter-arrival Time between Consecutive Buses at Bus Stops

Huan Wu January 24, 2020

Abstract

It happens very often that a bus is delayed at a bus stop, leading to that passen- gers waste time waiting for the bus and bus companies receive a lot of complaints.

This real life problem becomes the source of my research project in this thesis. To get the arrival time of buses with more exactness and certainty will help much to enhance the working efficiency of companies and save time cost for passengers. The inter-arrival time between consecutive buses at bus stops is explored in four different models, namely Simple Gated Model, Complicated Gated Model, Exhaustive Model and Poisson Model. In the Simple Gated Model, the inter-arrival of time between buses is investigated through both theoretical analysis and discrete event simulation.

The results show that the difference between analytical values and simulation values is significantly small. In the other three models, the inter-arrival time between buses is worked out by simulating specific situations with certain variables controlled. In the Complicated Model, it shows that the inter-arrival time between buses is influ- enced by the number of passengers arriving per unit time. In the last two models, the inter-arrival time between buses has a similar change pattern with the arrival rate of passengers being the same.

More work is to be done in the study of Poisson Model in finding the inter-arrival time between buses. For example, for sake of convenience and being easy to handle, it is supposed that all passengers get on(or off) the bus just through one gate in my research, yet in actual life, passengers get on(or off) the bus trough two gates. The research to come could focus on the study of two gates case.

Keywords: Inter-arrival time between buses, Gated Model, Exhaustive Model, Poisson Model, arrival rate of passengers.

Email: h.wu-3@student.utwente.nl

(4)

Contents

1 Introduction 4

2 Simple Gated Model 5

2.1 Problem Context . . . . 5

2.2 Assumption . . . . 5

2.3 Analysis . . . . 5

2.3.1 The Distribution of X n j . . . . 7

2.3.2 The Expectation of X n j . . . . 8

2.3.3 The Expectation of A j n . . . 10

2.4 Simulation . . . 10

2.4.1 Explanation of the Simulation . . . 11

2.4.2 Simulation Results . . . 11

3 Complicated Gated Model 12 3.1 Problem Context . . . 12

3.2 Assumptions . . . 13

3.3 Analysis . . . 13

3.3.1 The Distribution of X n j . . . 14

3.3.2 The Expectations of X n j and A j n . . . 15

3.4 Simulation . . . 15

4 Exhaustive Model 17 4.1 Motivation . . . 17

4.2 Problem Description . . . 17

4.3 Assumptions . . . 17

4.4 Simulation . . . 18

4.4.1 Explanation of the Simulation . . . 18

4.4.2 Simulation Results . . . 18

5 Poisson Model 19 5.1 Problem Description . . . 19

5.2 Assumptions . . . 19

5.3 Simulation . . . 19

5.3.1 Explanation of the Simulation . . . 19

5.3.2 Simulation Results . . . 19

6 Discussion 20 7 Appendix 1 23 8 Appendix 2 25 8.1 Derivations and Results of E(X i j ) . . . 25

8.1.1 E(X 0 j ) and E(X 1 j ) . . . 25

8.1.2 E(X 2 j ) . . . 25

8.1.3 E(X 3 j ) . . . 25

8.1.4 E(X 4 j ) . . . 26

8.2 Merging the case for 1 < j < n and j = n . . . 27

8.3 Derivations and Results of A j i . . . 27

(5)

8.3.1 E(A j 0 ) and E(A j 1 ) . . . 27

8.3.2 E(A j 2 ) . . . 27

8.3.3 E(A j 3 ) . . . 28

8.3.4 E(A j 4 ) . . . 28

9 Appendix 3 30 9.1 Flow Chart of Class Passenger Arrival(t, s) . . . 30

9.2 Flow Chart of Class Bus Arrival(t, s, b) . . . 30

9.3 Flow Chart of Class Pick Up(t, s, b) . . . 33

9.4 Flow Chart of Class Bus Departure(t, s, b) . . . 33

10 Appendix 4 34 10.1 Simulation Code of Avg(A j n ) for Simple and Complicated Gated Models . . 34

10.2 Recursion Code of E(A j n ) for Simple Gated Model . . . 39

10.3 Simulation Code of Avg(A j n ) for Exhaustive Model . . . 40

10.4 Simulation Code of Avg(A j n ) for Poisson Model . . . 46

(6)

1 Introduction

Nowadays, public transportation has become the main way of travelling which is good both environmentally and financially. Although the arrival time of a bus is usually available on bus apps and other online applications, it often happens that a bus maybe delayed. This might be caused by the large number of passengers waiting in the stop. In this sense, knowing the exact arriving time of the bus is highly useful and important to both the bus companies and the passengers.

In this thesis, the research question that ‘what is the inter-arrival time between consecutive buses at an arbitrary bus stop?’ will be explored and answered within the framework of four different theoretical models, namely Simple Gated Model, Complicated Gated Model, Exhaustive Model and Poisson Model. In the first model, the research question will be ex- plored by both theoretical analysis and simulation results, while in the other three models, it will only be answered numerically by simulations.

The four models are ranked from most simple to most sophisticated, with the last one

most resembling the real life case. The reason why analytical solutions are provided only

in the first model is that the other three models are more complicated (than the first one),

therefore no analytical solutions can be derived. The simulation code for the first model

is the basis of the other three models.

(7)

2 Simple Gated Model

2.1 Problem Context

Consider bus-b on a one-directional road at stop-n, where b, n ∈ N = {0, 1, 2...}. At each stop, passengers arrive according to a Poisson Process with the same rate λ. A bus that arrives at a stop will allow all passengers waiting there to board the bus, i.e. the bus has unlimited capacity. But gated discipline is applied, which means a bus does not pick up the passengers who arrive during its halting time and these passengers will wait for the next bus. The halting time of the bus is proportional to the number of passengers boarding the bus with the proportional factor being α. Actually, α is the average time that a pas- senger takes to get on the bus. At stop-0, buses arrive according to a deterministic time, i.e. every T time, a bus arrives. The travel time between each stop is also deterministic.

Let the travel time be D. To initialise the system, it is supposed that before time nD, no passengers arrive at stop-n, which means at each bus stop, the arrival process of passengers starts after bus-0 arrives. This results in a fact that the halting time of bus-0 is 0 at any stop.

2.2 Assumption

When a bus arrives at a bus stop, the previous bus has already finished its halting proce- dure, i.e. different buses will not meet each other at the same bus stop. In other words, buses will not pile up. It might be considered that this assumption is unrealistic or even

“weird". The reason why we make this simplified assumption is that it can save us from taking into account the complex situations of buses piling up or overtaking each other in the real life case.

2.3 Analysis

To get some idea of how the system works, we begin with analysing the first three buses (bus-0, 1, 2) from stop-0 to stop-4, which can be seen as the preliminary tool for section 2.3.1. After this step, some structured pattern will be found, and then we will broaden our horizon to analyse an arbitrary bus-j with j ∈ Z + at an arbitrary stop-n with n ∈ N.

Let’s first introduce the following definitions:

Definition 1. For b, n ∈ N and w ∈ Z + ,

• X n b := the number of passengers waiting for bus-b at stop-n.

• X −w b := 0 .

• H n b := the halting time of bus-b at stop-n.

Definition 2. Let K be a random variable such that P (K = 0) =  and P (K > 0) = 1−, where 0 <  < 1. X ∼ P oisson(K) if P (X = x|K = k) = k x!

x

e −k for x = 0, 1, 2...

Figure 1 shows the arrival and departure time of bus-0. We use one dot to represent

both arrival and departure time since the halting time of bus-0 is 0 at any stop.

(8)

Figure 1: The Arrival and Departure Time of Bus-0.

It follows that H i 0 = 0 and X i 0 = 0, where i ∈ {0, 1, 2, 3, 4}.

Then the arrival and departure time of bus-1 is going to be analysed. See figure 2, where the up and down arrow represent the arrival and departure time respectively.

Figure 2: The Arrival and Departure Time of Bus-1.

The following can be gained:

• X 0 1 ∼ P oisson(λT ) , and H 0 1 = αX 0 1 .

• X 1 1 ∼ P oisson λ(T + H 0 1 ) 

, and H 1 1 = αX 1 1 .

• X 2 1 ∼ P oisson λ(T + H 0 1 + H 1 1 ) 

, and H 2 1 = αX 2 1 .

• X 3 1 ∼ P oisson λ(T + H 0 1 + H 1 1 + H 2 1 ) 

, and H 3 1 = αX 3 1 .

• X 4 1 ∼ P oisson λ(T + H 0 1 + H 1 1 + H 2 1 + H 3 1 ) 

, and H 4 1 = αX 4 1 . Next, bus-2 is going to be analysed. See figure 3.

Figure 3: The Arrival and Departure Time of Bus-2.

The distribution of X i 2 with i ∈ {0, 1, 2, 3, 4} has a Poisson form, where the parameters

could be random variables, since the arrival process of passengers is a Poisson Process with

(9)

rate λ. Here we want to explain how to find the parameter for X i 2 . We take X 0 2 as an example. The parameter for X 0 2 = λ∗ the time interval in which new passengers arrive.

New passengers refer to passengers waiting for bus-2 at stop-0. Then the beginning point of this interval is the time at which the previous bus(i.e. bus-1) arrived at stop-0, because based on the gated discipline, passengers who arrive during the halting time of bus-1 will take bus-2 instead of bus-1. The ending point of that interval is the time at which bus-2 arrives at stop-2. Back to figure 2 and 3, the starting point of this interval is T and the ending point is 2T . Therefore, X 0 2 ∼ P oisson(λ(2T − T )) . We can use the same method to get the parameters for X 1 2 , X 2 2 , X 3 2 , X 4 2 . Then we have:

• X 0 2 ∼ P oisson(λT ) , and H 0 2 = αX 0 2 .

• X 1 2 ∼ P oisson 

λ (2T +D+H 0 2 )−(T +D+H 0 1 )  

⇒ X 1 2 ∼ P oisson λ(T +H 0 2 −H 0 1 )  , and H 1 2 = αX 1 2 .

• X 2 2 ∼ P oisson 

λ (2T + 2D + H 0 2 + H 1 2 ) − (T + 2D + H 0 1 + H 1 1 )  

⇒ X 1 2 ∼ P oisson λ(T + H 0 2 + H 1 2 − H 0 1 − H 1 1 ) 

, and H 2 2 = αX 2 2 .

• X 3 2 ∼ P oisson 

λ (2T + 3D + H 0 2 + H 1 2 + H 2 2 ) − (T + 3D + H 0 1 + H 1 1 + H 2 1 )  

⇒ X 1 2 ∼ P oisson λ(T + H 0 2 + H 1 2 + H 2 2 − H 0 1 − H 1 1 − H 2 1 ) 

, and H 3 2 = αX 3 2 .

• X 4 2 ∼ P oisson 

λ (2T +4D+H 0 2 +H 1 2 +H 2 2 +H 3 2 )−(T +4D+H 0 1 +H 1 1 +H 2 1 +H 3 1 )  

X 4 2 ∼ P oisson λ(T + H 0 2 + H 1 2 + H 2 2 + H 3 2 − H 0 1 − H 1 1 − H 2 1 − H 3 1 ) 

(1) and H 4 2 = αX 4 2 .

• Note: the parameter for X i 2 is always positive since buses will not pile up by assump- tion.

2.3.1 The Distribution of X n j

Taking equation (1) X 4 2 ∼ P oisson λ(T + H 0 2 + H 1 2 + H 2 2 + H 3 2 − H 0 1 − H 1 1 − H 2 1 − H 3 1 )  an example, it can be observed that the parameter for X 4 2 contains the sum of the halting as time of bus-2 and the negative sum of the halting time of bus-1. For compactness sake, we introduce the following definition:

Definition 3. For j, w ∈ Z + and n ∈ N,

• Z n j := P n l=0 H l j .

• Z −w j := 0 .

• Z n 0 := 0 .

The distribution of X n 0 is too easy, so we will skip that and directly give the distribution of X n j based on definition 3, which is stated in the following theorem. Note that the parameter for X n j is always positive since we assume that buses will not pile up.

Theorem 1. X n j ∼ P oisson λ(T + Z n−1 j − Z n−1 j−1 ) , ∀j ∈ Z + and n ∈ N.

(10)

Proof. The distribution of X n j has a Poisson form since the arrival process of passengers is a Poisson Process with rate λ. Let I n j = [a, b] be the time interval during which passengers who will wait for bus-j at stop-n arrive. a is the time point at which bus-(j − 1) arrives at stop-n. Before bus-(j − 1) arrives at stop-n, it halted at stop-0, 1, 2...(n − 1). So the total halting time for it is P n−1 l=0 H l j−1 = Z n−1 j−1 . The travel time for it to reach stop-n is nD. Together with the fact that at time (j − 1)T , bus-(j − 1) departs from stop-0, we get a = (j − 1)T + nD + Z n−1 j−1 . Similarly, b is the time point at which bus-j arrives at stop-n and b = jT + nD + Z n−1 j . Therefore, I n j = [a, b] =[(j − 1)T + nD + Z n−1 j−1 , jT + nD + Z n−1 j ] . It follows that X n j ∼ P oisson(λ

I n j

) ⇒ X n j ∼ P oisson λ(b − a) ⇒ X n j ∼ P oisson λ(T + Z n−1 j − Z n−1 j−1 ) 

.

Actually, the distribution of X n j is summarized by starting from analysing bus-1 at stop-i, where i ∈ {0, 1, 2, 3, 4}. Readers who are interested in it can see Appendix 1 in detail.

2.3.2 The Expectation of X n j

Having gained the probability distribution of X n j , the expectations of the inter-arrival time between consecutive buses at bus stops may be obtained as follows. Let A j n :=the time between bus-j’s arriving and bus-(j − 1)’s arriving at stop n, where j ∈ Z + and n ∈ N.

There is a special relationship between E(X n j ) and E(A j n ), which will be explained in section 2.3.3. Therefore, E(X n j ) should be solved firstly and it is shown as follows:

E(X n j ) =

 

 

λT (1 + αλ) n if j = 1

E(X n−1 j ) + λ αE(X n−1 j ) − αE(X n−1 j−1 ) 

if 1 < j ≤ n

λT if j > n

(2)

Equation (2) is concluded from the expression of E(X i j ) , where i ∈ {0, 1, 2, 3, 4}. See derivations and results of E(X i j ) in section 8.1 in Appendix 2. Before proving that equation (2) is correct, let’s introduce the following theorem.

Theorem 2. Let X and Y be discrete random variables. If Z ∼ P oisson(aX + bY + c) with a ,b, c ∈ R and aX + bY + c > 0 with probability 1, then E(Z) = aE(X) + bE(Y ) + c.

Proof. Fubini’s Theorem [1] ensures that P y=∞ y=0 P x=∞

x=0 P (X = x, Y = y) = P x=∞

x=0

P y=∞

y=0

P (X = x, Y = y) , since P (X = x, Y = y) is non-negative.

Then we can show that E(Z) = E (E(Z | X, Y ) = P y=0 P ∞

x=0 E(Z | X = x, Y = y)P (X = x, Y = y) = P y=∞

y=0

P x=∞

x=0 (ax+by+c)P (X = x, Y = y) = P x=∞

x=0 ax P y=∞

y=0 P (X = x, Y = y) + P y=∞

y=0 by P x=∞

x=0 P (X = x, Y = y) + c P y=∞

y=0

P x=∞

x=0 P (X = x, Y = y) = P x=∞

x=0 axP (X = x)+ P y=∞

y=0 byP (Y = y)+c = aE(X)+bE(Y )+c i.e. E(aX+bY +c).

From now on, equation (2) is going to be split into three theorems and proved by making use of theorem 2.

Theorem 3. If j = 1, then ∀n ∈ N, E(X n j ) = E(X n 1 ) = λT (1 + αλ) n . Proof. We prove it by Mathematical Induction.

• Basis Step: for n = 0, definition 3 and theorem 1 imply X 0 1 ∼ P oisson(λT ) . So

E(X 0 1 ) = λT = λT (1 + αλ) 0 .

(11)

• Induction Step: take k ≥ 1 and k ∈ N, by definition 3 and theorem 1, we have X k 1 ∼ P oisson λ(T + Z k−1 1 ) ⇒ E(X k 1 ) = [using theorem 2] = λ T + E(Z k−1 1 ) 

. Assume for n = k, k ≥ 1 and k ∈ N, E(X k 1 ) = λT (1 + αλ) k ——(IH). Now we want to show that E(X k+1 1 ) = λT (1 + αλ) k+1 .

By definition 3 and theorem 1, we have X k+1 1 ∼ P oisson λ(T +Z k 1 ) = P oisson λ(T + Z k−1 1 + H k 1 ) = P oisson λ(T + Z k−1 1 + αX k 1 ) ⇒ E(X k+1 1 ) = [using theorem 2] = λ T +E(Z k−1 1 ) +αλE(X k 1 ) =[using E(X k 1 ) = λ T +E(Z k−1 1 ) 

]=E(X k 1 )+αλE(X k 1 ) = E(X k 1 )(1 + αλ) =[using IH]=λT (1 + αλ) k (1 + αλ) = λT (1 + αλ) k+1 .

• Conclusion: ∀n ∈ N, E(X n 1 ) = λT (1 + αλ) n .

Theorem 4. Given j ∈ Z + and n ∈ N, if j > n, then E(X n j ) = λT .

Proof. We prove it by Mathematical Induction based on n. Although we have two variables namely j and n, the choice of j is restricted by j > n. So we can cover all the cases for j > n .

• Basis Step: for n = 0 and j > 0, definition 3 and theorem 1 imply X 0 j ∼ P oisson(λT ) ⇒ E(X 0 j ) = λT .

• Induction Step: by theorem 1, we know that for j ≥ 1 and k ∈ N, X k j ∼ P oisson λ(T + Z k−1 j − Z k−1 j−1 ) ⇒ E(X k j ) =[using theorem 2]=λ T + E(Z k−1 j ) − E(Z k−1 j−1 ) 

.

Assume for n = k, k ≥ 1, j > k = n and k ∈ N, E(X k j ) = λT ——(IH). Now we want to show that for k ≥ 1, j > k + 1 and k ∈ N, E(X k+1 j ) = λT .

Definition 3 and theorem 1 imply X k+1 j ∼ P oisson λ(T +Z k j −Z k j−1 ) = P oisson λ(T + Z k−1 j −Z k−1 j−1 +Z k j −Z k j−1 −Z k−1 j +Z k−1 j−1 ) = P oisson λ(T +Z k−1 j −Z k−1 j−1 +Z k j −Z k−1 j + Z k−1 j−1 − Z k j−1 ) = P oisson 

λ (T + Z k−1 j − Z k−1 j−1 ) + (T + Z k j − Z k−1 j ) − (T + Z k j−1 − Z k−1 j−1 )  

= P oisson λ(T +Z k−1 j −Z k−1 j−1 )+λ(T +H k j )−λ(T +H k j−1 ) = P oisson λ(T + Z k−1 j − Z k−1 j−1 ) + λ(T + αX k j ) − λ(T + αX k j−1 ) ⇒ E(X k+1 j )=[using theorem 2]=λ(T + E(Z k−1 j ) − E(Z k−1 j−1 )) + λ(T + αE(X k j )) − λ(T + αE(X k j−1 )) =[using E(X k j ) = λ T + E(Z k−1 j ) − E(Z k−1 j−1 ) 

]=E(X k j ) + λT + αλE(X k j ) − λT − αλE(X k j−1 ) =[firstly, E(X k j ) = λT by IH since j > k + 1 implies j > k, besides, j − 1 > k since j > k + 1. Therefore by using IH, we get E(X k j−1 ) = λT ]=λT + λT + αλλT − λT − αλλT = λT .

• Conclusion: E(X n j ) = λT if j ∈ Z + , n ∈ N and j > n.

Theorem 5. Given j ∈ Z + , n ∈ N, then E(X n j ) = E(X n−1 j ) + λ αE(X n−1 j ) − αE(X n−1 j−1 )  . Proof. Theorem 1 implies X n−1 j ∼ P oisson λ(T + Z n−2 j − Z n−2 j−1 ) 

⇒ E(X n−1 j ) =[using theorem 2]=λ T + E(Z n−2 j ) − E(Z n−2 j−1 ) 

.

Theorem 1 also implies X n j ∼ P oisson λ(T + Z n−1 j − Z n−1 j−1 ) = P oisson λ(T + Z n−2 j − Z n−2 j−1 + Z n−1 j − Z n−1 j−1 − Z n−2 j + Z n−2 j−1 ) = P oisson λ(T + Z n−2 j − Z n−2 j−1 ) + λ(Z n−1 j − Z n−2 j ) − λ(Z n−1 j−1 − Z n−2 j−1 ) = P oisson λ(T + Z n−2 j − Z n−2 j−1 ) + λH n−1 j − λH n−1 j−1  = P oisson λ(T + Z n−2 j − Z n−2 j−1 ) + λαX n−1 j − λαX n−1 j−1 

⇒ E(X n j ) =[using theorem 2]=λ T + E(Z n−2 j ) − E(Z n−2 j−1 ) + λ αE(X n−1 j ) − αE(X n−1 j−1 ) 

=[taking E(X n−1 j ) = λ T + E(Z n−2 j ) − E(Z n−2 j−1 )  ]=

E(X n−1 j ) + λ αE(X n−1 j ) − αE(X n−1 j−1 ) 

.

(12)

The expressions of E(X n j ) for j = 1 and j > n are “special", since in these two cases, E(X n j ) can be expressed explicitly by formulas containing λ, α, T and n, while the expression of E(X n j ) for 1 < j ≤ n can only be expressed implicitly by a recursion relationship. Therefore, we decided to distinguish E(X n j ) for three cases in equation (2), namely j = 1, 1 < j ≤ n and j > n , although theorem 5 shows that E(X n j ) = E(X n−1 j ) + λ αE(X n−1 j ) − αE(X n−1 j−1 ) , ∀j ∈ Z + and n ∈ N.

2.3.3 The Expectation of A j n

Recall that A j n :=the time between bus-j’s arriving and bus-(j − 1)’s arriving at stop n, which is the inter-arrival time between bus-j and bus-(j − 1) at stop-n. We assume that E(A j n ) > 0 , since buses will not see each other at the same stop. There are two methods to find E(X n j ) . The first one is similar as what we have done in finding E(X n j ) , i.e. to calculate E(A j i ) with i ∈ {0, 1, 2, 3, 4} and conclude the expression of E(A j n ) from the pattern of the results of E(A j i ) . Since this method is too tedious, we will leave it in section 8.3 in Appendix 2. The second one, which will be used in this section, is to draw the conclusion for E(A j n ) based on equation (2) by using the following corollary.

Corollary 1. E(A j n ) = E(X λ

nj

) , ∀j ∈ Z + and n ∈ N.

Proof. Say, at time t 1 , bus-(j − 1) arrives at stop-n and at time t 2 , bus-j arrives at stop-n, so we have A j n = t 2 − t 1 . Passengers who are going to wait for bus-j will come during the time interval [t 1 , t 2 ] due to the gated discipline. The arrival process of passengers is a Poisson Process with rate λ, and this implies X n j ∼ P oisson λ(t 2 − t 1 ) = P oisson(λA j n ) . It follows from theorem 2 that E(X n j ) = λE(A j n ) ⇐⇒ E(A j n ) = E(X

j n

) λ .

Corollary 1 states the relationship between E(A j n ) and E(X n j ). So by applying corollary 1 on equation (2), the following can be gained:

E(A j n ) =

 

 

T (1 + αλ) n if j = 1

E(A j n−1 ) + αE(X n−1 j ) − αE(X n−1 j−1 ) if 1 < j ≤ n

T if j > n

(3)

Readers may be interested in the limiting behavior of E(A j n ) , and here we state that

n→∞ lim lim

j→∞ E(A j n ) = T (4)

Equation (4) implies that j approaches ∞ first, so the equality can be concluded from equation (3).

If we run the recursion code of E(A j n )(see Appendix 4), it can be verified that:

λT ≈ E(A n n ) | n>1 (5)

So equation (5) is leaved as a conjecture.

2.4 Simulation

Given that α is fixed, the value of λ is tricky because in this model, buses cannot meet

each other at the same stop. Therefore we should choose λ small enough so that in the

simulation, there is a high probability that when a bus arrives at a bus-stop, its previous

(13)

bus has already finished the halting procedure.

The purpose of this simulation is to get the numerical value of Avg(A j n ) and to compare it with the analytical value of E(A j n ) . See simulation code of Avg(A j n ) and recursion code for E(A j n ) in Appendix 4.

2.4.1 Explanation of the Simulation

In the simulation part, we use t to represent time, s to represent the id of bus stop and b to represent the id of bus. The simulation is based on object-oriented program- ming, which contains five classes, namely Bus(b), Bus Stop(s), Passenger Arrival(t, s), Bus Arrival(t, s, b) and Bus Departure(t, s, b). Only the last three classes contain actions. See the flow charts of these classes in Appendix 3.

2.4.2 Simulation Results

In this section, we will give the numerical value of Avg(A j n ) and its confidence interval.

Besides, we will compare Avg(A j n ) with E(A j n ) .

We choose α = 5s = 3600 5 h, T = D = 0.25h, n = 5 and λ = 50/h, 100/h respectively.

To get Avg(A j n ), we will run 101 times simulations and each simulation will run 10h.

The confidence interval of Avg(A j n ) is calculated by the formula (1 − sl)100% − CI(µ) = Avg(A j n ) − c SSD m , Avg(A j n ) − c SSD m 

[2], where µ is the mean, sl is the significant level, m is the sample size, SSD is the sample standard deviation, and c is gained from t − table[2]

with degree of freedom df = m − 1.

Let η be the number which represents how much percentage the boundary value of CI deviates from the average value. The simulation results are shown in table 1, 2 and figure 4, 5. Numbers with 7 decimals are used because the difference of E(A 5 5 ) and E(A 6 5 ) for λ = 50/h only reveals until the 7th appears.

Avg(A j 5 ) 95% − CI(µ) η E(A j 5 )

Avg(A j 5 ) − E(A j 5 ) j=1 0.3495050 (0.3468921, 0.3521179) 1.51% 0.3497286 0.0002236

j=2 0.2376100 (0.2338698, 0.2413502) 1.57% 0.2361804 0.0014296 j=3 0.2496150 (0.2457634, 0.2534666) 1.54% 0.2509269 0.0013119 j=4 0.2528053 (0.2489380, 0.2566726) 1.53% 0.2499693 0.0028360 j=5 0.2476348 (0.2438418, 0.2514278) 1.53% 0.2500004 0.0023656 j=6 0.2477035 (0.2436503, 0.2517567) 1.64% 0.2500000 0.0022965 Table 1: Numerical Value of the Inter-Arrival Time for λ = 50/h.

Avg(A j 5 ) 95% − CI(µ) η E(A j 5 )

Avg(A j 5 ) − E(A j 5 ) j=1 0.4783553 (0.4740818, 0.4826288) 0.89% 0.4790124 0.0006571

j=2 0.1869499 (0.1803511, 0.1935488) 3.53% 0.1869317 0.0000182

j=3 0.2570545 (0.2504650, 0.2636438) 2.56% 0.2581709 0.0011164

j=4 0.2514301 (0.2446624, 0.2581979) 2.69% 0.2494832 0.0019469

j=5 0.2494224 (0.2423989, 0.2564460) 2.82% 0.2500129 0.0005905

j=6 0.2494087 (0.2424256, 0.2563918) 2.80% 0.2500000 0.0005913

Table 2: Numerical Value of the Inter-Arrival Time for λ = 100/h.

(14)

Figure 4: Avg(A j 5 ) vs E(A j 5 ) for λ = 50/h.

Figure 5: Avg(A j 5 ) vs E(A j 5 ) for λ = 100/h.

It can be observed that the value of E(A j 5 ) always lies in the 95% − CI(µ) and the difference between E(A j 5 ) and Avg(A j 5 ) is significantly small. Therefore, the analytical ex- pression of E(A j n ) , i.e. equation (3), can verify that the simulation code is indeed correct.

3 Complicated Gated Model

3.1 Problem Context

Consider bus-b on a one-directional road at stop-n, where b, n ∈ N. At each stop, passen-

gers arrive according to a Poisson Process with the same rate λ. A bus that arrives at a

stop will allow all passengers waiting there who are waiting there to board the bus, but

(15)

gated discipline is applied. It takes time α for a bus to pick up a passenger. The time for picking up passengers is called picking-up time. At stop-n, when bus-(b + 1) finishes its picking-up time, bus-b is still halting, then bus-(b+1) will wait for bus-b until bus-b finishes halting procedure and departs together with it. We call the time of a bus waiting for its previous bus finishing the halting procedure as waiting time. The halting time contains picking-up time and waiting time. Every T time, a bus arrives at stop-0, and the travel time between each bus stop is D. To initialise the system, it is supposed that before time nD , no passengers arrive at stop-n, which means that at each stop, the arrival process of passengers starts after bus-0 arrives. This results in a fact that the halting time of bus-0 is 0 at any stop.

3.2 Assumptions

Some buses might pile up at some bus stops, which means when bus-(b + 1+ arrives at stop-n, bus-b is still in its halting procedure. In other words, different buses might meet each other at the same stop. In addition, when a cluster of buses arrive at the same time at a stop, passengers waiting there will only board the first bus in the cluster of buses.

Besides, buses cannot overtake each other.

3.3 Analysis

Let’s fist introduce the following definitions.

Definition 4. For b, n ∈ N,

• P n b := the picking-up time of bus-b at stop-n.

• W n b := the waiting time of bus-b at stop-n.

Recall that X n b and H n b are the number of passengers waiting for bus-b at stop-n and the halting time of bus-b at stop-n respectively. It follows from the problem context that P n b = αX n b and H n b = P n b + W n b .

Definition 5. Let r ∈ R, r + := max{0, r} . Definition 6. For b, n ∈ N,

• a b n := the arrival time of bus-b at stop-n.

• d b n := the departure time of bus-b at stop-n..

• s b n := a b n + P n b := the scheduled departure time of bus-b at stop n.

Note that a b n = d b n−1 + D if n ≥ 1, and W n b = (a b−1 n + H n b−1 ) − s b n  +

if b ≥ 1. Besides, d b n = a b n + H n b = s b n + W n b .

The behaviour of bus-0 is easy since it just passes through each stop without halting, so

we are going to analyse the features of bus-j, such as the number of passengers waiting for

bus-j, the inter-arrival time between bus-j and bus-(j −1) at stop-n, where j ∈ Z + . When

bus-j and bus-(j − 1) arrive at stop-n, the following situations might occur at stop-(n − 1)

if n ≥ 1, which are shown in figure 6.

(16)

Figure 6: Three Situations at Stop-(n − 1).

The first situation is that bus-j and bus-(j − 1) did not pile up at stop-(n − 1), in other words, they did not meet each other at stop-n, which leads to the fact that a j n > a j−1 n . The second situation is that bus-j and bus-(j − 1) piled up at stop-(n − 1), and s j n−1 > d j−1 n−1 . This implies that at stop-(n − 1), bus-j departs later than bus-(j − 1) and a j n > a j−1 n . The third situation is that bus-j and bus-(j − 1) piled up at stop-(n − 1), but s j n−1 ≤ d j−1 n−1 . In this case, bus-j will wait W n−1 j time until bus-(j − 1) finishes its halting procedure, and they will depart from stop-(n − 1) at the same time. This implies a j n = a j−1 n .

3.3.1 The Distribution of X n j

Theorem 6. X n j ∼ P oisson λ(T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) + 

, ∀j ∈ Z + and n ∈ N.

Proof. a j n ≥ a j n−1 since buses cannot overtake each other. Let I be the time interval during

which passengers wait for bus-j at stop-n arrive. Gated discipline implies that if I exists,

i.e. a j n > a j n−1 , then I = [a j−1 n , a j n ] . The arrival process of passengers is a Poisson Process

with rate λ implies that X n j ∼ P oisson(λ|I|) . When bus-(j) and bus-(j − 1) arrives at

(17)

stop-n, we should consider what happened at stop-(n − 1), so cases that whether n = 0 or n ≥ 1 have to be clarified at first.

• Case 1: n = 0. In this case, I exists, since bus-j always arrives later than bus-(j − 1) at stop 0. X 0 j ∼ P oisson(λ|I|) = P oisson λ(a j 0 −a j−1 0 ) = P oisson jT −(j −1)T  = P oisson(λT ). X 0 j ∼ P oisson(λT ) ⇐⇒ X 0 j ∼ P oisson λ(T + Z −2 j + αX −1 j − Z −1 j−1 ) +  since T > 0, Z −2 j = Z −1 j−1 = 0 by definition 3 and X −1 j = 0 by definition 1.

• Case 2.1: n ≥ 1, bus-j and bus-(j − 1) did not pile up at stop-(n − 1). In this case, bus-j and bus-(j − 1) did not see each other at stop-(n − 1), so W n−1 j = 0 and αX n−1 j = P n−1 j = H n−1 j . It follows that a j n > a j−1 n , so I exists.

Before bus-(j − 1) arrives at stop-n, it halted at stop-0, 1, 2...(n − 1). So the total halting time for it is P n−1 l=0 H l j−1 = Z n−1 j−1 . The travel time for it to reach stop-n is nD . Together with the fact that at time (j −1)T , bus-(j −1) departs from stop-0, we get a j−1 n = (j − 1)T + nD + Z n−1 j−1 . Similarly, a j n = jT + nD + Z n−1 j . Therefore, X n j ∼ P oisson(λ|I|) = P oisson λ(T + Z n−1 j −Z n−1 j−1 ) 

=[using definition 3]=P oisson λ(T + Z n−2 j + H n−1 j − Z n−1 j−1 ) 

=[since H n−1 j = αX n−1 j ]=P oisson λ(T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) 

=[since I exists and |I| > 0]=P oisson λ(T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) + .

• Case 2.2: n ≥ 1, bus-j and bus-(j − 1) piled up at stop-(n − 1) and s j n−1 > d j−1 n−1 . s j n−1 > d j−1 n−1 implies that αX n−1 j = P n−1 j = H n−1 j , W n−1 j = 0 and d j n−1 > d j−1 n−1 . Therefore a j n = d j n−1 + D > d j−1 n−1 + D = a j−1 n , which means I exists. So the proof is the same as case 2.1.

• Case 2.3: n ≥ 1, bus-j and bus-(j − 1) piled up at stop-(n − 1) but s j n−1 ≤ d j−1 n−1 . In this case, bus-j and bus-(j − 1) will depart together from stop-(n − 1) and arrive at the same time at stop-n. This leads to the fact that I does not exists and bus-j has no passengers to pick up. So X 0 j ∼ P oisson(0) , which means P (X = 0) = 1.

Now T + Z n−2 j + αX n−1 j − Z n−1 j−1 ≤ 0 is going to be proved. s j n−1 ≤ d j−1 n−1 ⇒ a j n−1 + P n−1 j ≤ d j−1 n−1 ⇒ jT + Z n−2 j + (n − 1)D + αX n−1 j ≤ (j − 1)T + (n − 1)D + Z n−1 j−1 ⇒ T + Z n−2 j + αX n−1 j − Z n−1 j−1 ≤ 0 . It follows that X n j ∼ P oisson(0) = P oisson λ(T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) + 

.

3.3.2 The Expectations of X n j and A j n

It follows from theorem 2 that E(X n j ) = λE (T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) + 

. Recall that A j n is the inter-arrival time between bus-j and bus-(j − 1) at stop-n. Corollary 1 implies that E(A j n ) = E (T + Z n−2 j + αX n−1 j − Z n−1 j−1 ) + 

. Indeed, E(A j n ) = E(T +Z n−2 j +αX n−1 j − Z n−1 j−1 )P (T + Z n−2 j + αX n−1 j > Z n−1 j−1 ) + 0P (T + Z n−2 j + αX n−1 j ≤ Z n−1 j−1 ) = E(T + Z n−2 j + αX n−1 j − Z n−1 j−1 )P (T + Z n−2 j + αX n−1 j > Z n−1 j−1 ) . We are not going to the direction of finding P (T + Z n−2 j + αX n−1 j > Z n−1 j−1 ) , but instead, a simulation will be implemented to find the numerical value of the average inter-arrival time.

3.4 Simulation

The event classes and flow charts are the same as those of the Simple Gated Model. See

section 2.4.1. For the parameters, we take α = 3600 5 h , T = D = 0.25h, n = 10. We will

(18)

choose λ = 150/h, 200/h respectively to investigate how it influences the inter-arrival time.

To get Avg(A j n ) , we will run 50000 times simulations and each simulation will run 25h.

The simulation results are shown in table 3 and figure 7. Plotting CI makes the graph too chaotic and at many points, the CI is nearly invisible, so we decide to show graph 7 without the CI.

Avg(A j 10 ) for λ = 150/h

90% − CI(µ) and η for λ = 150/h .

Avg(A j 10 ) for λ = 200/h

90% − CI(µ) and η for λ = 200/h

j=1 1.6578 (1.6570, 1.6585), 0.05% 2.9011 (2.8997, 2.9024), 0.05%

j=2 0.0000 \ , \ 0.0000 \ , \

j=3 0.0000 \ , \ 0.0000 \ , \

j=4 0.0143 (0.0140, 0.0147), 2.37% 0.0000 \ , \ j=5 0.1341 (0.1331, 0.1351), 0.75% 0.0000 \ , \

j=6 0.2385 (0.2371, 0.2399), 0.59% 0.0010 (0.0009, 0.0011), 10%

j=7 0.2513 (0.2498, 0.2527), 0.58% 0.0104 (0.0101, 0.0108), 3.62%

j=8 0.2494 (0.2479, 0.2509), 0.58% 0.0510 (0.0502, 0.0519), 1.74%

j=9 0.2487 (0.2473, 0.2502), 0.58% 0.1322 (0.1308, 0.1337), 1.10%

j=10 0.2514 (0.2499, 0.2529), 0.58% 0.2142 (0.2124, 0.2161), 0.88%

j=11 0.2503 (0.2488, 0.2517), 0.59% 0.2446 (0.2425, 0.2466), 0.84%

Table 3: Numerical Values of Avg(A j 10 ) and its Confidence Interval in Complicated Gated Model.

Figure 7: Graph of Avg(A j 10 ) in Complicated Gated Model.

The simulation results imply that the bigger the λ is, the more often that E(A j n ) = 0

occurs. This means that if λ is bigger, then the event that buses pile up occurs with higher

frequency. It can also be verified from figure 7 that, for both the values of λ(150/h, 200/h),

the change pattern of Avg(A j 10 ) remains the same, decreasing to 0 first and then increasing

to approximately T = 0.25 later as j increases.

(19)

For the case that λ = 200/h, it can be observed from table 3 that A 2 10 , A 3 10 ...A 5 10 are 0 but A 6 10 > 0 . The reason is explained as follows: when a cluster of buses-u, (u + 1)...v pile up at a stop, passengers who arrive later than the cluster of buses will board the bus-(v + 1), which arrives later than bus-v(the last bus in the cluster of buses). To put it in our case, bus-1, 2...5 pile up at stop-9 and bus-6 arrives later than bus-5; some passengers arrive later than bus-5 but earlier than bus-6; and it takes some time for bus-6 to get these passengers on board. When bus-6 is picking up passengers at stop-9, bus-1, 2...5 are already on the way to stop-10. This leads to that A 6 10 > 0 .

Table 3 show that bus-1, 2...5 arrive together at stop-10. According to the problem context and assumptions(section 3.1, 3.2) we made, it is only bus-1 which will pick up passengers waiting there, leading all the others taking non. So bus-2, 3, 4, 5 will wait for bus-1 until it finishes halting procedure and these buses will depart together from stop-10. Therefore, it can be predicted that A 1 s , A 2 s ...A 5 s are 0 for s ≥ 11.

4 Exhaustive Model

4.1 Motivation

In the Piling Up Model, if some buses pile up and depart together from stop-n, then, at stop-s (s ≥ n + 1), only the first bus of the cluster of buses will pick up passengers and all the other buses will just wait for the first bus, having no passengers to pick up. This is resource-wasting. In order to make better use of public resources, the Exhaustive Model will be proposed and analysed numerically. Notations used in this model are the same as those in the previous models.

4.2 Problem Description

Consider bus-b on a one-directional road at stop-n, where b, n ∈ N = {0, 1, 2...}. At each stop, passengers arrive according to a Poisson Process with the same rate λ. A bus that arrives at a stop will allow all passengers who are waiting for it to board the bus, i.e. the bus has unlimited capacity. The halting time of the bus is proportional to the number of passengers boarding the bus with the proportional factor being α. At stop-0, buses arrive according to a deterministic time, i.e. every T hour, a bus arrives. The travel time between each bus stop is also deterministic. Let the travel time be D hour. To initialise the system, it is supposed that before time nD, no passengers arrive at stop-n, which means at each bus stop, the arrival process of passengers starts after bus-0 arrives. This results in a fact that the halting time of bus-0 is 0 at any stop.

4.3 Assumptions

Exhaustive discipline is applied, which means when a bus arrives at a bus-stop, it will pick

up all the passengers including the people who arrive during it’s halting procedure. The

bus will depart when it finishes picking up all the passengers or the next bus arrives. If

the bus finds that no passengers are present at the stop, it will wait for 10s. Finally, it is

assumed that the following might happen: when bus-(b + 1) arrives at stop-n, bus-b is still

picking up passengers.

(20)

4.4 Simulation

In this model, finding E(A j n ) is much more complicated than the one in Complicated Gated Model. Therefore, only numerical results of Avg(A j n ) will be given by simulation. Given that α is fixed, the value of λ should be chosen big enough so that the probability that buses meet each other at the bus stop can be significantly large. See simulation code in Appendix 4.

4.4.1 Explanation of the Simulation

In the simulation part, we use t to represent time, s to represent the id of bus stop and b to represent the id of bus. The simulation is based on object-oriented program- ming, which contains six classes, namely Bus(b), Bus Stop(s), Passenger Arrival(t, s), Bus Arrival(t, s, b), Pick Up(t, s, b) and Bus Departure(t, s, b). Only the last four classes contain actions. See the flow charts of these classes in Appendix 3.

4.4.2 Simulation Results

We choose α = 5s = 3600 5 h , T = D = 0.25h, n = 10 and λ = 400/h. To get Avg(A j n ) , we will run 2000 times simulations and each simulation will run 25h. The simulation results are shown in table 4 and figure 8.

Avg(A j 10 ) 95% − CI(µ) η j=1 2.1906 (2.1865, 2.1949) 0.19%

j=2 0.1272 (0.1226, 0.1319) 3.63%

j=3 0.1411 (0.1362, 0.1461) 3.49%

j=4 0.1788 (0.1726, 0.1851) 3.50%

j=5 0.2472 (0.2391, 0.2553) 3.28%

j=6 0.4516 (0.4362, 0.4670) 3.41%

j=7 0.2241 (0.2151, 0.2332) 4.04%

j=8 0.2048 (0.1959, 0.2137) 4.35%

j=9 0.1722 (0.1648, 0.1796) 4.29%

j=10 0.1723 (0.1646, 0.1800) 4.44%

j=11 0.1318 (0.1257, 0.1379) 4.62%

Table 4: Numerical Values of Avg(A j 10 ) and its Confidence Interval in Exhaustive Model.

Figure 8: Graph of Avg(A j 10 ) in Exhaustive Model.

(21)

Since the simulation result of the Exhaustive Model(figure 8) has a similar trend as the one of the Poisson Model(9), it will be discussed in section 6.

5 Poisson Model

5.1 Problem Description

To make a model more applicable in real life, we will study a Poisson Model in this section.

Consider bus-b on a one-directional road at stop-n, where b, n ∈ N = {0, 1, 2...}. At each stop, passengers arrive according to a Poisson Process with the same rate λ. A bus that arrives at a stop will allow all passengers waiting there to board the bus, i.e. the bus has unlimited capacity. At each bus stop, a random proportion of the number of passengers in the bus will disembark from the bus. The halting time of the bus is proportional to the number of passengers boarding the bus with the proportional factor being α as well as the number of passengers disembarking from the bus with the proportional factor being β. At stop-0, buses arrive according to a Poisson Process with rate γ 1 . The travel time between each bus stop is i.i.d.∼ exp(γ 2 ) . To initialise the system, at each bus stop, the arrival process of passengers starts after bus-0 arrives. This results in a fact that the halting time of bus-0 is 0 at any stop.

5.2 Assumptions

When a bus arrives at a bus stop, if no one disembarks and no passengers are waiting at the stop, the bus will wait for 10s. The bus only has one gate, and when it arrives at a stop, it will firstly let passengers disembark and then picks up passengers waiting at the bus stop. Exhaustive discipline is applied, which means when a bus arrives at a bus stop, it will pick up all the passengers including the people who arrive during it’s halting procedure. After passengers disembark from the bus, it will leave when it picks up all the passengers or the next bus arrives. Buses might meet each other at the same bus stop.

5.3 Simulation

This is the most complicated model in this thesis, so only Avg(A j n ) will be given numerically by simulation. To ensure that in the simulation, buses might meet each other, the value of λ should be chosen big enough given that α is fiexed. See simulation code in Appendix 4.

5.3.1 Explanation of the Simulation

The number of classes and instance variables in each class (such as t, s, b) are the same as those in the Exhaustive Model, but the flowcharts of the events Bus Arrival(t, s, b) and Bus Departure(t, s, b) are different. See the flow charts in Appendix 3.

5.3.2 Simulation Results

We choose α = β = 5s = 3600 5 h , γ 1 = γ 2 = 4/h , n = 10 and λ = 400/h. To get Avg(A j n ) ,

we will run 4000 times simulation and each simulation will run 25h. The simulation results

are shown in table 5 and figure 9.

(22)

Avg(A j 10 ) 95% − CI(µ) η j=1 2.4148 (2.3671, 2.4625) 1.98%

j=2 0.4247 (0.4035, 0.4458) 4.98%

j=3 0.2579 (0.2441, 0.2718) 5.37%

j=4 0.1760 (0.1666, 0.1853) 5.32%

j=5 0.1304 (0.1230, 0.1378) 5.65%

j=6 0.1092 (0.1024, 0.1160) 6.22%

j=7 0.0853 (0.0780, 0.0906) 6.23%

j=8 0.0670 (0.0623, 0.0718) 7.11%

j=9 0.0556 (0.0515, 0.0596) 7.36%

j=10 0.0418 (0.0383, 0.0453) 8.38%

j=11 0.0327 (0.0296, 0.0358) 9.41%

Table 5: Numerical Values of Avg(A j 10 ) and its Confidence Interval in Poisson Model.

Figure 9: Graph of Avg(A j 10 ) in Poisson Model.

6 Discussion

There is a big difference between A 1 n and A 2 n (n ≥ 1) in all models. It can be explained as the following: bus-0 does not halt at stop-0, 1, ...(n − 1), while bus-1 and bus-2 halt. This causes the fact that A 1 n is relatively big and A 2 n is relatively small since the inter-arrival time between bus-j and bus-(j − 1) at stop-n depends on the total halting time of these buses at stop-0, 1, ...(n − 1) given that the travel time between each stop is on average the same.

Complicated Gated Model implies that if λ is bigger, then the situation that buses meet each other at the same stop happens more frequently. This is also intuitively true for the Exhaustive and the Poisson Models.

The simulation results of the last two models imply that as a whole, there is a decreasing

trend of A j n as j increases. The reason might be the following: λ is so big that the number

(23)

of buses in the system cannot handle the the system load (number of passengers). So the

load becomes higher and higher as time increases. Meanwhile, more buses enter the system

but they are still not able to handle the load. Since λ is too big, it happens very often

that these buses meet each other at the same stop. This causes the fact that A j n decreases

as j increases.

(24)

References

[1] The Fubini Principle in Discrete Math. url: http://web.math.ucsb.edu/~cmart07/

fubini.pdf.

[2] Klaas (K.) Poortema and Dick (T.M.J.) Meijer. Mathematical Statistics with Appli-

cations. UNIVERSITEIT TWENTE, 2017.

(25)

7 Appendix 1

Appendix 1 shows how to get the distribution of X n j by starting from analysing bus-1 at stop-i. Firstly, let’s have a look at how bus-1, bus-2, bus-3 works with respect to time. See figure 10 below:

Figure 10: The Arrival and Departure Time of Bus-1, 2, 3 Based on Definition 3.

The distributions of X i 1 and X i 2 are the same as those in section 2.3, but with only the sum of halting time being substituted by Z i j . The distribution of X i 3 is as follows:

• X 0 3 ∼ P oisson λ(3T − 2T ) ⇒ X 0 3 ∼ P oisson λ(T + Z −1 3 − Z −1 2 ) 

, and H 0 3 = αX 0 3 .

• X 1 3 ∼ P oisson 

λ (3T +D+Z 0 3 )−(2T +D+Z 0 2 )  

⇒ X 1 3 ∼ P oisson λ(T +Z 0 3 −Z 0 2 )  , and H 1 3 = αX 1 3 .

• X 2 3 ∼ P oisson 

λ (3T + 2D + Z 1 3 ) − (2T + 2D + Z 1 2 )  

⇒ X 2 3 ∼ P oisson λ(T + Z 1 3 − Z 1 2 ) 

, and H 2 3 = αX 2 3 .

• X 3 3 ∼ P oisson 

λ (3T + 3D + Z 2 3 ) − (2T + 3D + Z 2 2 )  

⇒ X 3 3 ∼ P oisson λ(T + Z 2 3 − Z 2 2 ) 

, and H 3 3 = αX 3 3 .

• X 4 3 ∼ P oisson 

λ (3T + 4D + Z 3 3 ) − (2T + 4D + Z 3 2 )  

⇒ X 4 3 ∼ P oisson λ(T + Z 3 3 − Z 3 2 ) 

, and H 4 3 = αX 4 3 .

Based on the pattern of figure 10, let’s broaden our horizon to analyse an arbitrary bus-j

at stop-i. See figure 11 below:

(26)

Figure 11: The Arrival and Departure Time of Bus-j.

The distribution of X i j is shown as follows:

• X 0 j ∼ P oisson 

λ jT − (j − 1)T  

⇒ X 0 j ∼ P oisson λ(T + Z −1 j − Z −1 j−1 )  , and H 0 j = αX 0 j .

• X 1 j ∼ P oisson 

λ (jT + D + Z 0 j ) − ((j − 1)T + D + Z 0 j−1 )  

⇒ X 1 j ∼ P oisson λ(T + Z 0 j − Z 0 j−1 ) 

, and H 1 j = αX 1 j .

• X 2 j ∼ P oisson 

λ (jT +2D +Z 1 j )−((j −1)T +2D +Z 1 j−1 )  

⇒ X 2 j ∼ P oisson λ(T + Z 1 j − Z 1 j−1 ) 

, and H 2 j = αX 2 j .

• X 3 j ∼ P oisson 

λ (jT +3D +Z 2 j )−((j −1)T +3D +Z 2 j−1 )  

⇒ X 3 j ∼ P oisson λ(T + Z 2 j − Z 2 j−1 ) 

, and H 3 j = αX 3 j .

• X 4 j ∼ P oisson 

λ (jT +4D +Z 3 j )−((j −1)T +4D +Z 3 j−1 )  

⇒ X 4 j ∼ P oisson λ(T + Z 3 j − Z 3 j−1 ) 

, and H 4 j = αX 4 j .

It is not that only the number of passengers waiting for bus-j at stop-i ∈ {0, 1, 2, 3, 4} is of interest, but also the number of passengers waiting for bus-j at an arbitrary stop. In other words, we should analyse bus-j at stop-n, where j ∈ Z + and n ∈ N. See figure 12 below:

Figure 12: The Arrival and Departure Time of Bus-j at stop-n.

(27)

8 Appendix 2

8.1 Derivations and Results of E(X i j )

Derivations of E(X i j ) is based on definition 3, theorem 1 and 2.

8.1.1 E(X 0 j ) and E(X 1 j )

• X 0 j ∼ P oisson(λT ) ⇒ E(X 0 j ) = λT ∀j ∈ Z + .

• X 1 1 ∼ P oisson λ(T + αX 0 1 ) ⇒ E(X 1 1 ) = λ T + αE(X 0 1 ) = λ(T + αλT ) = λT (1 + αλ) .

• For j ≥ 2, X 1 j ∼ P oisson λ(T +Z 0 j −Z 0 j−1 ) ⇒ X 1 j ∼ P oisson λ(T +H 0 j −H 0 j−1 ) ⇒ X 1 j ∼ P oisson λ(T + αX 0 j − αX 0 j−1 ) ⇒ E(X 1 j ) = λ T + αE(X 0 j ) − αE(X 0 j−1 ) = λ(T + αλT − αλT ) = λT .

8.1.2 E(X 2 j )

• X 2 1 ∼ P oisson λ(T +Z 1 1 ) ⇒ X 2 1 ∼ P oisson λ(T +H 0 1 +H 1 1 ) ⇒ X 2 1 ∼ P oisson λ(T + αX 0 1 +αX 1 1 ) ⇒ E(X 2 1 ) = λ T +αE(X 0 1 )+αE(X 1 1 ) = λ T +αλT +αλT (1+αλ) = λT 1 + αλ + αλ(1 + αλ) = λT (1 + αλ) 2 .

• X 2 2 ∼ P oisson λ(T + Z 1 2 − Z 1 1 ) ⇒ X 2 2 ∼ P oisson λ(T + H 0 2 + H 1 2 − H 0 1 − H 1 1 ) ⇒ X 2 2 ∼ P oisson λ(T + αX 0 2 + αX 1 2 − αX 0 1 − αX 1 1 ) ⇒ E(X 2 2 ) = λ T + αE(X 0 2 ) + αE(X 1 2 ) − αE(X 0 1 ) − αE(X 1 1 ) = λ T + αE(X 1 2 ) − αE(X 1 1 ) = λ T + αλT − αλT (1 + αλ) = λT (1 + αλ)(1 − αλ) .

• For j ≥ 3, X 2 j ∼ P oisson λ(T + Z 1 j − Z 1 j−1 ) ⇒ X 2 j ∼ P oisson λ(T + H 0 j + H 1 j − H 0 j−1 − H 1 j−1 ) ⇒ X 2 j ∼ P oisson λ(T + αX 0 j + αX 1 j − αX 0 j−1 − αX 1 j−1 ) ⇒ E(X 2 j ) = λ T + αE(X 0 j ) + αE(X 1 j ) − αE(X 0 j−1 ) − αE(X 1 j−1 ) = λ T + αλT + αλT − αλT − αλT  = λT .

8.1.3 E(X 3 j )

• X 3 1 ∼ P oisson λ(T + Z 2 1 ) 

⇒ X 3 1 ∼ P oisson λ(T + H 0 1 + H 1 1 + H 2 1 ) 

⇒ X 3 1 ∼ P oisson λ(T + αX 0 1 + αX 1 1 + αX 2 1 ) 

⇒ E(X 3 1 ) = λ T + αE(X 0 1 ) + αE(X 1 1 ) + αE(X 2 1 ) = λ T + αλT + αλT (1 + αλ) + αλT (1 + αλ) 2  = λT 1 + αλ + αλ(1 + αλ) + αλ(1 + αλ) 2  = λT 

(1 + αλ) 1 + αλ + αλ(1 + αλ)  

= λT (1 + αλ) 3 .

• X 3 2 ∼ P oisson λ(T + Z 2 2 − Z 2 1 ) ⇒ X 3 2 ∼ P oisson λ(T + H 0 2 + H 1 2 + H 2 2 − H 0 1 − H 1 1 − H 2 1 ) ⇒ X 3 2 ∼ P oisson λ(T + αX 0 2 + αX 1 2 + αX 2 2 − αX 0 1 − αX 1 1 − αX 2 1 ) ⇒ E(X 3 2 ) = λ T + αE(X 0 2 ) + αE(X 1 2 ) + αE(X 2 2 ) − αE(X 0 1 ) − αE(X 1 1 ) − αE(X 2 1 ) = λ T +αE(X 1 2 )+αE(X 2 2 )−αE(X 1 1 )−αE(X 2 1 ) = λ T +αE(X 1 2 )−αE(X 1 1 )+

λ αE(X 2 2 ) − αE(X 2 1 ) = E(X 2 2 ) + λ αE(X 2 2 ) − αE(X 2 1 ) = λT (1 + αλ)(1 − αλ) + λ αλT (1 + αλ)(1 − αλ) − αλT (1 + αλ) 2  = λT (1 + αλ) 1 − αλ + αλ(1 − αλ) − αλ(1 + αλ) = λT (1 + αλ) (1 − αλ)(1 + αλ) − αλ(1 + αλ) = λT (1 + αλ) 2 (1 − 2αλ) .

• X 3 3 ∼ P oisson λ(T + Z 2 3 − Z 2 2 ) ⇒ X 3 3 ∼ P oisson λ(T + H 0 3 + H 1 3 + H 2 3 − H 0 2

H 1 2 − H 2 2 ) ⇒ X 3 3 ∼ P oisson λ(T + αX 0 3 + αX 1 3 + αX 2 3 − αX 0 2 − αX 1 2 − αX 2 2 ) ⇒

E(X 3 3 ) = λ T + αE(X 0 3 ) + αE(X 1 3 ) + αE(X 2 3 ) − αE(X 0 2 ) − αE(X 1 2 ) − αE(X 2 2 ) =

Referenties

GERELATEERDE DOCUMENTEN

people over the past few days this woman had ignored the devastating reviews of movie critics – and in doing so she had allowed the film’s studio and distributor to claim a

Because of the imbalance of China’s population, in some of the area higher salary does not mean the higher development and lower labour cost is not necessarily the influential factor

The comparison between the present situation and the conceptual model that corresponds with the way Arriva wants to organise the maintenance, the “Garage Workshop-model”,

Een bezoeker aan het evenement komt dus met kans 1 3 in elk van de drie tijdsintervallen tussen de vertrekkende bussen aan en voor elk van die tijdsintervallen is de te

3 in elk van de drie tijdsintervallen tussen de vertrekkende bussen aan en voor elk van die tijdsintervallen is de te verwachten wachttijd 10 minuten.. In figuur 2 is de

[Investement abroad] (1 pt) A British bank sells pounds now at a rate of 1.3 E/pound and agrees to buy them one year from now at a rate of 1.25 E/pound.. The British bonds pay

[r]

We assume that the actual arrival times a actual i have a deviation from the scheduled arrival time according to a normal distribution with average 0 and standard deviation 3