• No results found

Queuing models for two challenges in road transportation

N/A
N/A
Protected

Academic year: 2021

Share "Queuing models for two challenges in road transportation"

Copied!
51
0
0

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

Hele tekst

(1)

Queuing models for two challenges in road

transportation

Jules Kontar Lisse Coret

July 15, 2019

Master Thesis

Supervisor: prof. dr. Sindo N´

nez Queija

Korteweg-de Vries Instituut voor Wiskunde

(2)

Abstract

This thesis examines two queuing models related to road transport. The first model addresses the problem of monitoring payed parking spots in a city. Parkers of cars wish to pay as little as possible for their parking and might not pay their parking fee. An enforcement agency will visit neighborhoods to check whether the parked cars have paid their fees. By using game theory and queuing theory it is shown that the enforcement agency will choose to keep the time between visits constant.

The second model is used to evaluate different methods of routing incoming traffic over multiple possible roads. The methods differ in which information they need to make their decisions. Monte Carlo simulations were used to obtain the results.

Title: Queuing models for two challenges in road transportation Author: Jules Kontar Lisse Coret, jules.coret@gmail.com, 10097651 Supervisor: prof. dr. Sindo N´u˜nez Queija

Second corrector: dr. Arnoud den Boer Examination date: July 15, 2019

Korteweg-de Vries Instituut voor Wiskunde Universiteit van Amsterdam

Science Park 105-107, 1098 XG Amsterdam http://www.kdvi.uva.nl

(3)

Contents

1. Introduction 4

2. Mathematical Background 5

2.1. Poisson arrivals see time averages . . . 5

2.2. Queues . . . 8

2.3. Game Theory . . . 9

2.3.1. Nash-equilibrium . . . 9

2.3.2. Subgame perfect equilibrium . . . 10

2.4. Monte Carlo and Variance reduction methods . . . 11

3. Parking 13 3.1. Risk neutrality . . . 19

4. Routers with partial knowledge 21 4.1. Setup . . . 21

4.2. Analytic results . . . 23

4.2.1. Fixed routing probabilities . . . 24

4.2.2. Adjusted M/M/2 queue . . . 25

4.3. Simulation Methodolgy . . . 27

4.4. Simulation Results . . . 28

4.4.1. Influence of load under fully guided traffic and homogeneous servers 28 4.4.2. Influence of load under partially guided traffic and homogeneous servers . . . 30

4.4.3. Influence of load under fully guided traffic and heterogeneous servers 31 4.4.4. Changing proportion of guided traffic sent to each router . . . 33

4.5. Additional Queues . . . 34

4.5.1. Results for additional queues . . . 35

4.6. Conclusion . . . 39

4.6.1. Further research . . . 40

5. Populaire samenvatting 41

A. Structure of code for Routing Simulations 43

(4)

1. Introduction

Transport infrastructure is essential for the operation of modern society. Governments and other parties expend large sums of money on maintaining existing and constructing new infrastructure. It is essential to ensure that this is done in a cost-effective way. Using models to determine where additional infrastructure is most needed is one method. This thesis focuses on another method of reining in costs, optimizing the use of existing infrastructure.

Two different problems are examined. The first problem focuses on enforcing parking fees. The second example examines methods of dynamically routing traffic over a set of alternative routes. While both problems are framed as relating to a traffic issue, they are analyzed independently of each other. Consequently, the results and reasoning used to examine the first problem will not be used in the examination of the second problem. The parking problem concerns checking whether parked cars have paid their parking fees and fining them if they have not. The interests of the authority checking the cars is twofold. Primarily the aim is to ensure that all parkers will pay their fees. Assuming that not all parkers will pay their fees, the secondary aim is to have a high probability of catching none paying parkers. The authority is limited in the capacity it has to check the parking spots.

The parking problem is analyzed by modelling the available parking in a city as a set of limited capacity queues. Under certain assumptions I manage to derive certain characteristics of what an optimal checking schedule would look like. Additionally, game theory will be used to examine how limited resources could be distributed across multiple neighborhoods assuming parkers would base their behavior on the probability of getting caught.

The second problem concerns incoming traffic that has to be distributed across mul-tiple roads. Modern technology, such as smart phones and other internet connected navigation systems, allows for dynamically changing routing decisions. These naviga-tion systems will be able send cars to different routes based on the amount of traffic the navigation system perceives to be on those routes already.

The possible routes are modelled as infinite capacity queues. The performances of several possible routing functions, which the navigation systems could use, are evaluated under different circumstances. The evaluation is done by use of Monte Carlo simulations of the systems.

Both problems are connected in their use of queues to model the problem they exam-ine. Additionally both problems model incoming agents (parkers and traffic respectively) as a Poisson process.

(5)

2. Mathematical Background

Both problems examined in this thesis use continuous time stochastic processes in the mathematical modelling of the problem. Additionally both models are in part be driven by events that occur with exponentially distributed intervals, so called Poisson arrivals. The first problem uses game theory to model the behavior of multiple agents with competing interests. Monte Carlo simulations are used in the examination of the second problem. This chapter will give a brief introduction to these fields of mathematics.

2.1. Poisson arrivals see time averages

Both problems in this thesis use stochastic processes as part of their model. A stochastic process is a collection of random variables {Xt: t ∈ T } on a common probability space,

which take values from the state space S [7, p. 41]. Time is denoted by t. Often time is either discrete (T = N) or time is continuous (T = R+). In this thesis time will always

be continuous. In this thesis a stochastic process will regular be referred to as a system. The models examined in this thesis make use of Poisson arrivals. Certain events influencing the evolution of the system occur with exponentially distributed intervals. An important property of the exponential distribution is that it is memoryless. Let A be an exponential random variable. Interpret the value of A to be the time of an event. The distribution of the time till the event remains fixed as time progresses and the event does not occur. Let A be exponential distributed with rate λ then for x ≥ 0 its distribution is defined as

P(A ≤ x) = 1 − e−λx.

Consequently, its probability density function is fA(x) = λe−λx.

Let x > y ≥ 0 and let z > 0 then the exponential distribution has the following properties

P (x > A > y) =

Z x

y

λe−λada = e−λy− e−λx

P (x > A − z > y|A > z) = Rx+z y+z λe −λada 1 −Rz 0 λe −λada = e−λ(y+z)− e−λ(x+z) e−λz = e−λy− e−λx.

(6)

on open intervals and are finite. This suffice to demonstrate that these two random variables have the same distribution.

From exponentially distributed events a stochastic process known as a Poisson process can be constructed. A Poisson process with rate λ is defined as follows. Let Ai be i.i.d.

exponential random variables with rate λ. Then A = {A(t), t ≥ 0} is the corresponding Poisson process with A(t) = max({n : Pn

i=1Ai ≤ t}). This process is called a Poisson

process since A(t) has a Poisson distribution with mean λt. This property can be demonstrated as follows. First note that

P (A(t) = k) = P (Ak+1 > t) − P (Ak> t).

Since Ai is the sum of i i.i.d exponential random variables it has an Erlang(i, λ)

distri-bution with a CDF equal to

P(Ai ≤ t) = 1 − i−1 X n=0 1 n!e −λt (λt)n.

. Using this expression on can derive the follow equality

P (A(t) = k) = 1 − (1 − k X n=0 1 n!e −λt (λt)n) − (1 − (1 − k−1 X n=0 1 n!e −λt (λt)n)) = k X n=0 1 n!e −λt (λt)n− k−1 X n=0 1 n!e −λt (λt)n = 1 k!e −λt (λt)k.

This is the probability mass function of a Poisson distribution with mean λt.

An important theorem regarding Poisson processes, which is often used in this thesis, is Poisson Arrivals See Time Averages (PASTA). The following formulation comes from [12]. The proof of a more general form of the theorem, where the arrival rate does not have to be constant over time, can be found in [10]. Let N (t) be a stochastic process and let A(t) be a Poisson process which observes and potentially influences N (t). A(t) is called the arrival process and its jumps will be referred to as arrivals. Assume that A(t) does not depend on the past of N . This is formulated as the Lack of Anticipation Assumptions (LAA): for all t ≥ 0, {A(t + u) − A(t), u ≥ 0} and {N (s), 0 ≤ s ≤ t} are independent.

The PASTA property concerns the state a stochastic process is in at the moment of an arrival. Depending on the structure of N the amount of time spent in every single state might be zero, if the number of states is uncountable. Let B be a set in the value space of N (t) such that {N (t) ∈ B} is measurable in the probability space for all t ≥ 0. For the formulation of the PASTA property first define the following processes.

(7)

V (t) = t−1 Z t 0 U (s)ds Y (t) = Z t 0 U (s)dA(s) Z(t) = Y (t)/A(t).

Assume that the sample paths of U are a.s. left continuous. Under these assumptions and definitions V (t) is the fraction of the interval [0, t] that N spent in a state in B and Z(t) is the proportion of arrivals that occur before or at time t which see the system in a state in B.

Theorem 2.1 (Poisson Arrivals See Time Averages). Under LAA, V (t)−−→ V (∞) ⇐⇒a.s. Z(t) → V (∞).

This theorem has two main uses. It allows us to construct distribution of the state of a system when a Poisson arrival occurs. And allows the computation of the long run average of a system by sampling at exponential intervals.

The sum of a finite number of independent Poisson processes is a Poisson process. I will proof this holds for the sum of two independent Poisson processes which by induction can be used to show that it holds for the sum of any finite number of independent Poisson processes.

Theorem 2.2. Let A(t) and B(t) be independent Poisson processes with rates λa and

λb. Then C(t) = A(t) + B(t) is a Poisson process with rate λc= λa+ λb. Additionally,

the probability of an individual arrival in the C process originating from the A process is λa/λc and is independent of the types of the previous arrivals.

Proof. By definition A(t) and B(t) are constructed from series of i.i.d. Exponential random variables (Ai) and (Bi). Let A∗i =

Pi

j=1Aj and Bi∗ =

Pi

j=1Bj. Construct the

series (Ci∗) such that C0∗ = 0 and Ci∗ = min({A∗j : A∗j > Ci−1∗ } ∪ {B∗

j : B

∗ j > C

∗ i−1}).

Define the C1, C2, C3, ... such that Ci = Ci∗− C ∗

i−1. Note that by construction

C(t) = max({n :

n

X

i=1

Ci ≤ t}) = max({n : Cn∗ ≤ t})

= max({n : A∗n≤ t}) + max({n : Bn∗ ≤ t}) = A(t) + B(t).

To show that C(t) is a Poisson process we need to show that the Ci are i.i.d exponential

random variables with rate λc = λa+ λb. For simplicity assume that Ci−1∗ = A∗n−1 and

m = max({i : Bi∗ ≤ C∗

i−1}) − 1 for m, n; the reasoning for the case where C ∗

i−1 = B

∗ n−1

is symmetric. Then Ci = min(An, Bm− Ci−1∗ + Bm−1∗ ) with P(Bm > Ci−1∗ − Bm−1∗ ) = 1.

By the memoryless property of the exponential distribution we have that under these conditions Bm− Ci−1∗ + B

m−1 ∼ Exp(λb). Consequently Ci ∼ min(Exp(λa), Exp(λb))

and

(8)

= 1 − (e−λaxe−λbx)

= 1 − e−λcx.

To proof the final assertion, we use the memoryless property as follows

P An < Bm− Ci−1∗ + B ∗ m−1|Bm > Ci−1∗ − B ∗ m−1 = P (An< Bm) = Z ∞ 0 P(An< x)fB(x)dx = Z ∞ 0 (1 − e−λax bxe−λbxdx = λa λa+ λb = λa λc .

This shows that if the last arrival was from process (Ai) then the probability that the

next arrival will be from process (Ai) equals λλac. Consequently, the probability that the

next arrival is from process (Bi) equals 1 −λλac = λλbc. The same reasoning can be applied

under the assumption that Ci−1∗ = Bn−1∗ to complete the proof.

Note that the reverse of this theorem also holds. A Poisson process can be split up into multiple independent Poisson processes by assigning arrivals independently of each other to other processes with fixed probabilities. This result will be implicitly used throughout this thesis.

2.2. Queues

Queues are stochastic processes which are often used in modelling real world processes. Many different types of queues can be constructed. Most queuing models have an ex-ternal world, which sends a workload to a queue in the form of discrete units. These units are said to arrive at the queue. Depending on what the queue is used to model, these units can take many different names from customers and patients to packages. In this thesis the units will usually be revered to as either parkers or cars. Depending on the model, these units are homogeneous and indistinguishable from each other except for their arrival times or they have distinguishing qualities which could alter how they are processed by a queue.

The workload that arrives at a queue is processed by the server(s). Generally, a server can only process one unit at a time, but a queue can have multiple servers. The time it takes a server to process a unit of work can be either deterministic or random. It can depend on a multitude of factors, from the properties of the unit it is processing to the time since the queue started operating, or any other dynamic which could be called for by the model. Once a unit has been processed it is said to depart the queue.

All queues have space in their system. This space is filled by the units that are either being processed or are waiting to be processed. Depending on the specifications of the queue this space can be of infinite size or have limited capacity. Queues with infinite capacity can have on average more arrivals than departures. The average queue length and associated sojourn times will thus increase as time goes by. In this thesis such a

(9)

queue will be referred to as an unstable queue.

Kendall’s notation is used to describe the properties of many general queueing systems [8, p. 518]. A series of letters and possibly numbers describe the main characteristics of a queue. The first letter indicates the arrival process with M indicating a memoryless (Poisson) arrival process. The second letter indicates the distribution of service times with M indicating memoryless (exponentially distributed) service times. The third letter or number indicates the number of parallel servers. These first three elements are always shown. The next three elements are optional and have default values. The fourth element indicates the service order. Its default value is First Come First Serve (FCFS). The fifth element denotes the number of spots in the system, with its default value being infinite. The last element denotes the size of the population from which arrivals are generated which also has a default value of infinite. In this thesis the service order is always FCFS and the population is always infinite.

2.3. Game Theory

This section is taken from [1, section 2.3] and serves as a general introduction to game theory. Game theory is the mathematical field of study which is concerned with exam-ining and predicting the decisions of rational agents in strategic games. These games have to be precisely defined with an overview of all possible strategies of all agents and the reward each combination of strategies entails for each agent. A well-known game is the prisoners dilemma and serves as a good illustration of what game theory is.

2.3.1. Nash-equilibrium

In the prisoners dilemma two suspects of a crime are interrogated independently of each other and are both offered the same deal. If they both confess the crime, they will both spent five years in prison. If one suspect confesses but the other keeps silent then the one who confesses will only receive two year in prison while the one who kept silent will be sentenced to seven years in prison. If both keep silent the they both will be sentenced to four years in prison.

The payoffs of this game are shown in table 2.1. For every combination of strategies of the players two numbers are shown. The left number indicates the payoff for suspect one while the second number indicates the payoff for suspect two.

Suspect Two Confess Keep silent

Suspect One Confess (-5,-5) (-2,-7)

Keep silent (-7,-2) (-3,-3) Table 2.1.: Payoffs of Prisoners Dilemma

The suspects both want to minimize their own time in prison i.e. maximize their payoff. From table 2.1 it is readily apparent that both suspects are always strictly

(10)

better of when they confess, regardless of the action of the other suspect. It is therefore rational for each suspect to confess their crime. This is where the dilemma occurs. Both suspects act in their own best interest and as a result both receive longer sentences than if they had both not acted in their own best interest.

There are multiple types of Nash-equilibria. A pure Nash-equilibrium occurs when all players take specific actions with complete certainty. In a mixed Nash-equilibrium, an agent will follow a certain strategy with a certain probability. An interesting property of games with a finite number of players, who can only choose between a finite number of pure strategies, is that there always exist at least one mixed Nash-equilibrium [3].

2.3.2. Subgame perfect equilibrium

The Nash-equilibrium is not always the most appropriate tool to examine a game. This is best illustrated with the ultimatum game. In the ultimatum game there are two players. Player one is given four one-euro coins. Player one then has to distribute these coins between himself and player two. Player two then can either accept or reject the distribution of coins that player one offers. If player two accepts then each player gets the coins as distributed by player one, but if player two rejects neither player gets anything. This game has multiple pure Nash-equilibria. In one such equilibrium player two only accepts the distribution if he is granted three or more coins and player one offers three coins. Neither can increase their own reward by deviating from these strategies, but the distribution of the coins is intuitively incorrect. Furthermore, similar equilibria can be constructed for each possible distribution of the coins.

A way to examine this game is by looking for a subgame perfect equilibrium. Subgame perfect equilibria take into account that actions do not have to be taken at the same time. The subgame perfect equilibria are a subset Nash-equilibria. A subgame perfect equilibrium can be determined by reasoning backwards from the last decision that has to be taken. For each possible combination of earlier decisions, the optimal last decision is determined. With those last decisions determined, the before last decisions can be optimized. This process can be repeated until the subgame optimal decision for the first action in the game has been determined.

0 1 2     3 4 (3,1)    (0,0)   (2,2)    (0,0)   (1,3)    (0,0)   (0,4)    (0,0)   a r a r a   (4,0)    (0,0)             r a r a r

(11)

Figure 2.1 gives an analysis of the ultimatum game. The circles indicate that the decision has to be made by the player whose number is in the circle. Each line is a possible decision. For player one the numbers indicate how many coins he offers to player two and for player two a indicates he accepts the distribution. The number in brackets at the bottom are the payoffs which result from each sequence of decisions.

When player one offers player two one or more coins, player two can chose between receiving nothing or receiving what player one offered. Accepting the offer will yield a higher payoff for player two and thus player two always accepts the offer. Player two is only indifferent between accepting and rejecting when he is offered nothing. Player one can thus now offer to give player two one coin with the knowledge that the offer will be accepted. No other action player one can choose from, gives a possibly higher pay-off without the risk of a lower pay-off.

2.4. Monte Carlo and Variance reduction methods

In some settings it is very difficult or impossible to analytically derive certain quantities. Monte Carlo methods can sometimes be used to estimate these quantities. All Monte Carlo methods are based on using a computer to generate a large number of draws from a random variable which has some relation to the quantity that has to be estimated. In this thesis I am interested in the expected value of several random variables. Due to how these random variables are constructed, analytically deriving their expectation is impossible. Instead a Monte Carlo method will be used. This method generates draws from the distribution of the random variables of interest. The average of these draws is then used as an estimate of the expectation of the random variable. This method works due to the central limit theorem.

An increase in the number of draws decreases the variance of the estimate. The draws are made using pseudo random numbers generated by a computer. Therefore, the number of draws is mainly limited by time and the availability of computational resources. Several methods exist to reduce the variance of an estimate without increasing the number of necessary draws.

Two methods of variance reduction are used in the simulations of chapter 4. These are the use of common random variables and the use of antithetic variables. Here these methods will be discussed in general.

Common Random Variables is a method which can be used when comparing two random variables. By calculating the value of the two random variables of interest using the same pseudo-random numbers as a basis, one ensures that the difference between performances is mostly due to structural differences between the two random variables. The influence of luck of the draw is therefore reduced. From a mathematical point of view assume that one is interested in the ratio of two random variables X and Y . Then the variance of this ratio is

(12)

The variance of the ratio can thus be reduced by introducing a positive correlation between X and Y . By having X and Y depend on the same underlying realization of random variables, this positive correlation can be achieved.

The second method used to reduce variance is antithetic variables. When interested in the mean of a variable X, taking the mean over multiple realizations of X will, by the central limit theorem, reduce the variance of the estimate. Let X1 and X2 both be

realizations of X and estimate the mean of X by X1+X2

2 . The use of antithetic variables

then reduces the variance of the estimate by the following property of variance Var X1+ X2 2  = 1 4Var X1+ 1 4Var X2+ 1 2Cov(X1, X2).

Let Ui be i.i.d. uniform random variables on (0, 1). Assume that X can be written

as a deterministic function of these Ui’s such that X1 = f (U1, U2, ...). Note that X2 :=

f (1−U1, 1−U2, ...) has the same distribution as X1 and thus can also be used to estimate

X. Due to how X2 is constructed the covariance between it and X1 is in many cases

(13)

3. Parking

After a driver arrives in a city he will want to park his car for the duration of his visit. In many cities parking space is limited, either due to historical street plans or modern city planning choices. To ration the existing parking spots a city can decide to introduce parking fees.

For a parking fee to work effectively it will have to be enforced. If parkers know that parking fees are not enforced by checks and fines, then they could be tempted to not pay the fee. The enforcement of parking fees is a laborious task, with human enforcers physically visiting all paid parking spots within the city. Modern technology has improved the efficiency of the process with number plate recognizing cameras and a registry of cars for which the parking fee has been paid. However, these innovations do not make enforcement free from effort. In this chapter, a game theoretic model of this situation is constructed and analyzed.

It is assumed that individual parkers can choose to pay or not pay the parking fees. To punish non-payers an enforcement agency checks the parked cars for whether their parking fees have been paid or not. This checking requires resources. Checking a neigh-borhood continuously would consume an unjustifiable amount of resources. The enforcer will have to determine the total amount of resources that will be used in the checking of all neighborhoods and how to distributed those sources over the neighborhoods.

The model has an infinite time horizon. The game starts at time t = 0. The utilization of resources is expressed as the average long run utilization of resources per time unit U . Let there be n neighborhoods for which the enforcement agency is responsible. Each neighborhood i has a total cost of checking all parking spots ci, a finite number of parking

spots ai, a parking fee per time unit hi and a fine gi for not paying fee.

Let Ui be the utilization of resources per time unit used to check neighborhood i. Note

that Pn

i Ui = U . Let Si represent the checking schedule for neighborhood i. Let there

be a function L which maps a schedule to the long run average number of checks per time unit that schedule will entail. Consequently Ui = ciL(Si).

The only choice the enforcement agency has is which schedule to use in which neigh-borhood, with the associated cost arising from this choice. The possible schedules are restricted to two main types. The first type consists of all schedules which can be constructed by infinitely repeating a finite sequence of inter check times. The second type consists of all schedules where the inter check times are drawn from i.i.d random variables with finite expectations.

A schedule S of the first type is represented by a finite sequence such that S = [s1, s2, .., sn] for a n ∈ N and si ∈ R+. For this type schedule we have L(S) = n/

Pn i=1si.

The second type of schedule is simply represented by a random variable with finite mean such that L(S) = 1/E(S). Different neighborhoods are allowed to have different types of

(14)

schedules. The schedules are chosen at the beginning of the game and cannot be altered afterwards. It is assumed that all other agents know the chosen schedules.

Let (Pi

t) denote the stochastic process indicating the number of occupied parking spots

in neighborhood i. Parkers arrive at neighborhood i according to a Poisson process with rate λi. If there is no available parking spot at the moment of arrival, then the parker

will disappear from the game. Each neighborhood i has a sequence of i.i.d. random variables (Tji) such that the jth parker to arrive in the game will stay parked for Tji time units, if that parker parks in neighborhood i. Assume that Ti

j > 0 a.s. All agents in

the game know the values of these parameters for all neighborhoods. Note that for the random variables their distributions are regarded to be their parameter value.

Note that (Pi

t) can only take a finite number of values and that it has long term

distribution over these states as described in the section on PASTA. Furthermore, the neighborhood can be seen as a M/G/a/a queue. Let the initial state of the neighborhood, which contains more information than merely Pi

0, be drawn from its long run distribution.

For this type of queue, the blocking probability can be calculated using the Erlang B formula [5]. Since the initial state of the neighborhood is drawn from its long run average distribution, this blocking probability is valid for all arriving parkers and not just for those who arrive in the far future.

The parkers arrive at a neighborhood i according to a Poisson process with rate λi.

The enforcement agency knows the values of λi for all neighborhoods. If at least one

parking spot is available then the parker will park. The moment of arrival of parker j is ej and relates to the epoch of the game. Parker j does not know the value of ej and

makes no assumptions regarding its value. The length of time tj that parker j will stay

parked in neighborhood i is the realization of Vji = Tji1Pi

ej<ai.

Parker j knows the value of tj.

Parker j can only make one decision in the game. It can either choose to pay the parking fee of tj × hi or risk the fine of gi. Parker j will only have to pay the fine if it

does not pay the fee and neighborhood i is checked during the interval [ej, ej+ tj). The

aim of the parker is to minimize the expected amount paid. Parker j does not know the value of ej. From its perspective the probability of being checked in neighborhood i

only depends on tj and Si. Let G(Si, tj) be the probability of being checked given this

information and assume that parker j can calculate its value. Parker j will thus pay the parking fee if G(Si, tj) × gi ≥ tj × hi.

The aim of the enforcement agency is to ensure that in each neighborhood at least an α proportion of the parkers will pay the parking fee, while minimizing the utilization of resources U . The following theorems will aid in the derivation of the behavior of the agents of the game. Note that this game has subgames, due to the sequential nature of decisions taken by the agents. In a standard analysis, the decisions of the parkers conditional on the actions of the enforcement agency would be derived. In our setting the space of possible actions of the enforcement agency is of such complexity that this approach would be very difficult. Instead we will first show that the enforcement

(15)

agency will always choose a strategy from a less complex subset of possible strategies and continue with the standard analysis from there.

Theorem 3.1 (Optimal checking schedule I). For all l > 0 and all Ti with E(Ti) ≤ ∞

the following equation holds

EG [1/l], Vji = max EG(S, Vji) : L(S) = l ∧ S ∈ S 

where [1/l] is the schedule where the inter check time always equals 1/l and S is the set of possible schedules.

Proof. hallo In this proof we are only examining one neighborhood. Therefore, the neighborhood indicating subscripts are left out. We know that the neighborhood behaves as an M/G/a/a queue. Since E(Ti) ≤ ∞ we know that the Erlang B formula can be

applied [5]. Long term blocking probabilities thus exist. Using the PASTA property of the arrivals we know that 1Pi

ej<ai is seen by incoming parkers as Bernoulli random

variable with probability of being 1 equal to 1 − pb. Where pb is the blocking probability

according to the Erlang B formula.

For any S ∈ S with L(S) = l we first define a probability measure µ. If the inter check times are drawn from a random distribution then the probability measure is the probability measure of that distribution. Note that from the perspective of an arriving parker the inter check times from a deterministic schedule also appear as being drawn from a random distribution. This is due to the fact that an arriving parker j makes no assumptions regarding its arrival time ej and to the PASTA property of governing its

arrival. Therefore, a similar probability measure µ can be defined for a deterministic schedule. Measure theory is used here to cover discrete, continuous and mixed proba-bility distributions without having to address each type separately. Let µ be a measure with respect to the Borel σ algebra on R with µ(A) = n1 Pn

i=1si ∈ A.

Construct the following Radon-Nikodym derivative p

p(x) = x

R y dµ(y).

Note that R p(x)dµ(x) = 1. The probability measure which results from this deriva-tive has a useful interpretation. For a measurable set B of possible inter check times, R

Bp(x)dµ(x) is the long run proportion of time that the inter check time is an element

of B. Due to the PASTA property of the arrival process of the parkers this proportion is equal to the probability that parker j arrives during an inter check period with a length in B.

Given that a non-paying parker arrives during an inter check period of length x then due to the PASTA property we know that the time between the arrival of the non-paying parker and the next check is uniformly distributed on (0, x]. The chance that the non-paying parker is still parked at the time of the next check (u(x)) can be expressed as

(16)

follows u(x) = 1 x Z (0,x] 1 − P Vji ≤ t dλ(t) = 1 − 1 x Z (0,x] P Vji ≤ t dλ(t).

By combining u(x) and p(x) we can calculate G(S, Vji). By applying Jensen’s inequal-ity, the following derivation can be done.

EG(S, Vji) = Z u(x)p(x) dµ(x) = Z  1 − 1 x Z (0,x] P Vji ≤ t dλ(t)  x R y dµ(y)dµ(x) = 1 − 1 R y dµ(y) Z Z (0,x] P Vji ≤ t dλ(t)  dµ(x) ≤ 1 − 1 R y dµ(y) Z (0,R x dµ(x)] P Vji ≤ t dλ(t) = 1 − l Z (0,1/l] P Vji ≤ t dλ(t) = EG([1/λ], Vji).

For any l the probability of checking any individual parker by using a checking schedule S with L(S) = l is bounded from above by the probability of checking any individual parker by using the schedule [1/l].

This result shows that of all possible schedules, which cost l, the schedule with constant inter check times equal to 1/l yields the highest probability of checking any individual parker1. The next theorem extends this result.

Theorem 3.2 (Optimal checking schedule II). For all l > 0 and all Ti with E(Ti) ≤ ∞

the following equation holds

EG [1/l], Vji = max EG(S, Vji) : L(S) ≤ l ∧ S ∈ S  .

Proof. This theorem expands the result of theorem 3.1 and relies on the result of that theorem. First note that

EG(S, Vi j) : L(S) ≤ l = EG(S, V i j) : L(S) = l ∪ EG(S, V i j) : L(S) < l .

The previous result coversEG(S, Vji) : L(S) = l . To show that the theorem holds for

1This result is related to the waiting time paradox. The waiting time paradox concerns passengers

arriving at a bus stop according to a Poisson process. The time between busses is assumed to have a distribution with mean µ and variance σ2. The expected time the passengers have to wait on the next bus is, under these circumstances, not equal to µ/2. It is larger and equal to µ/2 + σ2/2µ. The theorems in this chapter concern the probability that a bus has arrived within a random period of time instead of the expected time till the bus arrives.

(17)

EG(S, Vi

j) : L(S) < l let l− ∈ (0, l). Then by theorem 3.1 we have EG [1/l−], Vji =

max EG(S, Vi

j) : L(S) = l

∧ S ∈ S . To complete the proof it suffices to show that

EG [1/l], Vji ≥ EG [1/l−], Vji . Note that P Vi

j ∈ [0, ∞) = 1, consequently it suffices to show that

∀r∈[0,∞)G ([1/l], r) ≥ G [1/l−], r .

If r = 0 then G ([1/a], r) = 0 for all a > 0 and the equation holds. If r > 0 then u(x) = 1 − 1 x Z (0,x] P(r ≤ t)dλ(t) = 1 x Z (0,x] 1t<rdλ(t) = min r x, 1  p(x) = µ(x) = 1{1/a}(x) G([1/a], r) = Z min(r x, 1)1{1/a}(x)dµ(x) = min (r a, 1) .

Consequently, using l > l−, the proof is finished by noting that

∀r∈[0,∞)G ([1/l], r) = min(r l, 1) ≥ min(r l−, 1) = G [1/l−], r .

This result shows that the [1/l] yields the highest checking probability not only of all schedules with cost l, but of all schedules with cost less or equal to l.

Corollary 3.3. For all l > 0 and all Ti with E(Ti) ≤ ∞ a.s. the following equation

holds E G [1/l], Vji |Vi j > 0 = max E G(S, V i j)|V i j > 0 : L(S) ≤ l ∧ S ∈ S  .

Proof. Note that G(S, 0) = 0. Thus

EG(S, Vji) = P(Vji > 0)E G(S, Vji)|Vji > 0 + P(Vji = 0)E G(S, Vji)|Vji = 0 = P(Vji > 0)E G(S, Vji)|Vji > 0 .

Since the checking schedule does not react to the state of the queuing system that describes the number of cars parked and the queuing system evolves independently of the checking schedule, the following inequalities hold. Using the result of 3.2 and let S ∈ {S : L(S) ≤ l ∧ S ∈ S} then

(18)

P(Vji > 0)E G([1/l], Vji)|Vji > 0 ≥ P(Vji > 0)E G(S, Vji)|Vji > 0

E G([1/l], Vji)|Vji > 0 ≥ E G(S, Vji)|Vji > 0

E G [1/l], Vji |Vji > 0 = max E G(S, Vji)|Vji > 0 : L(S) ≤ l ∧ S ∈ S  .

Corollary 3.4. For all l > 0 and all tj > 0 the following equation holds

G ([1/l], tj) = max ({G (S, tj) : L(S) ≤ l ∧ S ∈ S}) .

Proof. This is a direct consequence of theorem 3.2. Note that in the proofs of 3.1 and 3.2 the random variable Vji could have been replaced with any other a.s. positive random variable. The properties of the arrival process and of Ti drive the underlying dynamics

of the queue on which the proof depends. The values of the Vi

j are connected to the

values of the Tji by the practical assumption that the time period during which a car can be checked by the enforcer equals the time period during which the car is parked. If we let this implicit assumption go and let Vi

j denote only the length of time during which

the parker can be checked, then this corollary is obtained by letting Vji be a random variable which is tj a.s.

These results demonstrate that the chance of checking a random parker (with length of stay drawn from Uji) and the chance of checking a specific parker (with length of stay equal to tj) in neighborhood i, when the amount of checking resources available

for neighborhood i is constrained, are maximized by having inter check times which are constant and as short as the resource constraint allows. Recall that parkers aim to min-imize the expected amount paid for parking. Raising the probability of getting checked increases the probability of getting fined when not paying the fee. This increases the expected cost of parking when not paying the fee. For the enforcer it is therefore always preferable to maximize the chance of catching a (non-paying) parker. Consequently, the enforcer will always choose a schedule with constant inter check times or a schedule which results in the same checking chances as the constant inter check time schedule.

The previous conclusion allows for the calculation of G(Si, tj) given L(Si) ≤ li and

the scheduler maximizes the incentive to pay the fee:

G(Si, tj) = G([1/li], tj) = min(tj× li, 1).

The parker thus chooses to pay the fee if min(tj × li, 1) × gi ≥ tj× hi

min(li, 1/tj) ≥ hi/gi

li ≥ hi/gi if li ≤ 1/tj

1/tj ≥ hi/gi if li > 1/tj.

This result shows that the population of parkers can be split up into two groups: those who will stay longer than the inter check time and those who stay shorter. Those who

(19)

stay less than 1/li time units will pay the fee if li ≥ hi/gi. Note that this condition does

not depend on the exact length of stay. Either all parkers pay the fee or none of them do. For these parkers the parking fee and the expected fine both increase linearly as time parked increases.

Those who stay longer than the inter check time will only pay the fee if the total fee is less than the fine. Increasing the frequency of checks will not compel them to pay the fee. Make the additional assumption that those who are checked n times will have to pay the fine n times, if they did not pay the fee. Let parker j stay parked in neighborhood i for a time tj > 1/li. Let n = max{m ∈ N : mtj ≤ li}. Note that at time ej+ nli parker

j will have been checked n times and that the distribution of the time till the next check is the same as at time ej. Consequently, the probability that parker j will be checked

again equals G([1/li], tj − n/li). This parker will pay the fee if

tj× hi ≤ (n + G([1/li], tj− n/li)) × gi

tj× hi ≤ tj × li× gi

hi ≤ li× gi.

This condition is the same as the one derived for parkers staying less than 1/li time units.

Consequently, for a specific allocation of resources to a neighborhood either all or none of the parkers will choose to pay the fee. The amount of resources the enforcement agency will need to expend to achieve its objective (having in every neighborhood at least a proportion α of the parkers in that neighborhood paying the fee) is determined by the ratios of the prices of the fines and fees (gi/hi) and the cost of checking a neighborhood

(ci). The distribution of the parking times and the number of parking spots do not

influence this result.

3.1. Risk neutrality

Throughout this game it is assumed that the parkers are risk neutral. This means that they care about expected costs and do not care whether those costs are fixed or have a large variance. This assumption is crucial in the derivation of the results. The parkers in one neighborhood only differ on how long they stay parked. Both the expected amount to be paid in fines and the amount to be paid in parking fees were derived to be linear function of time spent parking. Consequently, either all or none of the parkers would choose to risk the fine. By making the parkers either risk averse or risk seeking the inequality which governs their behavior would be structurally altered. Let the risk preferences of the parkers be captured by a utility function p. The inequality which has to hold for a parker to pay the fee is

G([1/li], tj)p(gi) ≥ p(tjhi)

litjp(gi) ≥ p(tjhi).

(20)

To illustrate this, assume that all parkers have the same utility function and are risk averse. Further assume that the utility function is twice differentiable. Since paying more is less preferable than paying less, we have p0 < 0. To satisfy the risk averseness of the parkers we know that p00 < 0. As a specific case use p(x) = −x2. Then the condition becomes litjp(gi) ≥ p(tjhi) −litjgi2 ≥ −t 2 jh 2 i tj ≤ lig2i/h 2 i.

In this example the scheduler can increase the proportion of fee-paying parkers by raising the frequency of the checks. Consequently, achieving a fee-paying proportion of exactly or just above α is possible for many distributions of parking times. The derivation of more general results for this version of the game is left to future research. Note that this research will mainly focus on the properties of the ratio tjp(gi)/p(tjhi).

These results would likely illuminate how the distribution of parking times, the utility function and the probability of getting caught interact to lead to a proportion of parkers not paying the fees. The difficulty of proofing the results will mostly depend on which restrictions are placed on the utility function and the distribution of parking times.

(21)

4. Routers with partial knowledge

With the spread of internet connected navigation devices and real time monitoring of major roads, the routing of traffic to optimize the use of available road capacity has become possible. This chapter analyses a routing model with two or more roads and multiple routers. Several methods of routing are examined. This efficiency will be measured as the average sojourn time of all cars moving through the system. Secondarily I examine the under-utilization of resources. The constructed model is an extension of the model examined in [4] and is related to the problems examined in [6, chapters 9, 10] Much research has been done in similar settings. Especially in the context of the design of server farms, super computers and other large-scale IT related applications. However, there are several important differences between the system that is examined here and those systems. The first important difference is that in this set up not all traffic is necessarily routed. The second difference is that in this case the size of a job (service time of one element of the traffic) depends on which server processes the job and not on properties of the job itself. In many setups focused on IT applications the size of a job might be job specific and possibly approximately known at the time of routing. More information on these models and associated routing strategies can be found in [2, chapters 14, 24].

4.1. Setup

This system consists of two queues and two routers. Part of the traffic chooses which queue to enter based on a static probability distribution. The arrivals and the processing times are exponentially distributed. The arrival rate of traffic into the system is denoted as λ. The processing rates in the queues are respectively µ1 and µ2. Without loss of

generality assume that µ1 ≥ µ2. The probabilities that an arriving car will be routed by

router 1 or router 2 are respectively α1 and α2 with α = α1+ α2 ≤ 1. Traffic which is not

routed joins queue 1 with probability p1 and queue 2 with probability p2 = 1 − p1. This

setup is visualized in figure 4.1. Theorem 2.2 ensures that the incoming traffic flow can be interpreted as the sum of four independent Poisson arrival processes; two of which go to the routers and two go directly to the queues. There are two performance measures of interest. These are the wasted server capacity and the average sojourn times.

The average sojourn time of a car in the system will be denoted as ES. The wasted server capacity is defined specific to this setting. Most stable queues are empty a pro-portion of the time. In this system one of the queues can be empty while the other could contain more cars than can be served simultaneously. Additionally, if µ1 6= µ2 and there

(22)

Router 1 Router 2 Queue 1 Queue 2 μ1 μ2 λ α1 α2 1 −α1−α2 1 − p 1 p1

Figure 4.1.: Two routers two queues

instead of the faster server. Let Li,t be the length of queue i at time t. Let Wt denote

the proportion of excess service capacity wasted until time t. Recall that µ1 ≥ µ2 and

define waste as follows WT = 1 µ1+ µ2− λ Z T 0 µ11L1,t=01L2,t>1+ µ21L1,t>11L2,t=0 (4.1) + (µ1− µ2)1L1,t=01L2,t=1dt W = lim T →∞ WT T .

The benefit of this normalized definition of waste is that if EW > 1 then the system is unstable and ES = ∞1.

In this analysis several different decision functions are used. These decision functions differ in which knowledge they require. The knowledge required can be split up into two main categories: the parameters of the system and the state of the system. The state of the system is described by the lengths of the queues (L1 and L2) and the number of cars

routed by router i still present in queue j denoted as Ni,j, for i, j ∈ {1, 2}. The routers

used in this thesis are:

• weighted Join the Shortest Queue (wJSQ) • Join First Empty Queue (JFE)

• Join Own Queue if Length less than n (JOQLn) • Join Own Queue if Known less than n (JOQKn) • Join Queue with fewest Known (JQK).

1Without providing a full proof of this statement note that the expected sum of the lengths of the

queues at time T > 0 equals the number of cars in the system at T = 0 plus the expected number of arrivals T λ minus the expected number of processed carsR0Tµ11L1,t>0+ µ21L2,t>0dt. By comparing

this quantity to the definition of WT, assuming that W > 1 and applying some standard algebra one

(23)

Weighted Join the Shortest Queue (wJSQ) is a routing method with knowledge of the service rates and the lengths of both queues. The router first calculates the expected sojourn time for the to be routed car for both queues. It is readily verified that if joining queue i the expected sojourn time equals (Li + 1)/µi. If both queues have the same

expected sojourn times then the router randomly sends the car to either one of them with equal probability. When µ1 = µ2 and α = 1 then this routing scheme maximizes

with respect to stochastic order, the amount of traffic moved through the system at any time t < ∞ [11]. Note that since this strategy weighs the speed at which traffic will flow through a queue it could also be seen as a Least-Work-Left policy [2, p. 412].

Join First Empty Queue (JFE) is a routing policy which aims to prevent the queues from becoming empty. For both queues it calculates the value Li

µi−λ(1−α)pi, which is the

expected time it would take for the queue to empty out if no traffic were routed to it2.

The router sends a new car to the queue for which this value is lowest. If this value is equal for both queues than the router sends the new car to the queue with the highest µ value. If the µ values are equal then the router randomly sends the car to either one of them with equal probability.

Join Own Queue if Length less than n (JOQLn) is one of the routing methods which uses two routers with access to different information. Each queue i has its own router i. Cars which arrive at router i are sent to queue i if Li ≤ n. Otherwise they are

sent to the other queue. The value of n is fixed and does not depend on the state of the system.

Join Own Queue if Known less than n (JOQKn) is the other routing method where the availability of information is asymmetric. Instead of basing their decisions on the lengths of the queues these routers base their decisions on how many of the cars they guided into their own queues are still present in them. Cars which arrive at router i are sent to queue i if Ni,i ≤ n. Otherwise they are sent to the other queue.

Join Queue with fewest Known (JQK) router sends new cars to the queue with the fewest cars, guided by either router, in it. If Ni,i+ Nj,i < Ni,j + Nj,j then a newly

arrived car will be sent to queue i. If there are equal numbers of guided cars in both queues then a queue is picked at random with equal probabilities.

4.2. Analytic results

For the listed decision functions the state space necessary to keep the system Markov becomes too complex to analyze analytically. However, routing with fixed probabilities effectively turns the system into two separate M/M/1 queues, which can be analyzed. Additionally, an adjusted M/M/2 queue with different service rates is examined. These two systems form a basis to compare the other decision functions against. The two M/M/1 queues represent a performance which any useful routing strategy should be

2To verify this property of M/M/1 queues, let E

i be the expected time till a queue of length is empty.

Let µ, λ be the service and arrival rates respectively. Then E0= 0 and Ei= (1+µEi−1+λEi+1)/(µ+

(24)

capable of improving on. The adjusted M/M/2 queue is taken as a benchmark of performance which other routing methods will have difficulty matching.

4.2.1. Fixed routing probabilities

When both routers use fixed routing probabilities the system effectively functions as two independent M/M/1 queues. First several properties of this type of queue are derived before being used within the context of the model. This type of routing will be referred to as static routing.

Let the arrival rate be denoted as λ and the service rate as µ. Let πi denote the

equilibrium weight of state i and let EL be the average number of cars in the queue. Then one can derive that

πi =  λ µ i 1 −λ µ  EL = ∞ X i=0 i λ µ i 1 − λ µ  = λ µ 1 −λµ.

Let S be the average sojourn time. Using Little’s law [9] its value is

ES = EL/λ = 1

µ − λ.

The two routers in this setup do not use any dynamic information. For simplicity assume that they coordinate when determining the routing probabilities. Consequently the system effectively becomes a system with only one router which routes a α = α1+ α2

proportion of the traffic. Let the proportion of guided traffic sent to queue 1 be r1. Then

the total arrival rates at queue 1 and 2 (λ1, λ2) and the expected sojourn times (ES1, ES2)

are λ1 = λ (αr1+ (1 − α)p1) λ2 = λ (α(1 − r1) + (1 − α)(1 − p1)) ES1 = 1 µ1− λ1 = 1 µ1 − λ (αr1+ (1 − α)p1) ES2 = 1 µ2− λ2 = 1 µ2 − λ (α(1 − r1) + (1 − α)(1 − p1)) .

Let the aim of the router be to minimize the expected sojourn time (ES) of all traffic. The optimal value for r1can be derived and can be shown to be one of the solutions of the

quadratic equation dλ1ES1+λ2ES2

dr1 . The derivation is not conceptually difficult. However

the equations used in the derivation have a high number of terms. The expression of the solution is similarly large and difficult to interpret. When comparing the performance of this static policy with the performance of dynamic routers a numerical approximation of the optimal rate r1∗ is used.

(25)

For a given value of r1, which could be the optimum described, there are several

quantities which are of interest for comparison purposes. These are the expected sojourn time (ES) and the average wasted capacity (EW ). The expected sojourn time has the following expression. ES = 1 λ(λ1ES1+ λ2ES2) = 1 λ 1 µ1 λ1 − 1 + µ21 λ2 − 1 ! = µ1 1 αr1+(1−α)p1 − λ + µ2 1 α(1−r1)+(1−α)(1−p1) − λ .

The wasted capacity can be computed as follows: WT = 1 µ1 + µ2− λ Z T 0 µ11L1,t=01L2,t>1+ µ21L1,t>11L2,t=0 + (µ1 − µ2)1L1,t=01L2,t=1dt W = lim T →∞ WT T EW =E lim T →∞ WT T = µ1 µ1 + µ2− λ λ1 µ1 − λ1 µ1 2! λ 2 µ2 2 + µ2 µ1+ µ2− λ λ2 µ2 − λ2 µ2 2! λ 1 µ1 2 + µ1− µ2 µ1+ µ2− λ  1 −λ1 µ1  λ2 µ2 − λ2 µ2 2! .

4.2.2. Adjusted M/M/2 queue

The performance of this model is what would be achieved if jockeying between the queues were allowed and can be done at no cost. Research has been done to optimal routing and jockeying decisions if jockeying were not free [13]. The introduction of cost-free jockeying, and the homogeneity of the traffic, makes routing essentially superfluous as any inefficiently routed element of traffic can be rerouted at any time.

The system is similar to a M/M/2 queue but has important differences. These dif-ferences stem from the fact that the servers are not assumed to have equal expected service times. Recall that m1 ≥ m2. To optimize the use of resources we assume that if

there is one car in the system then server one is active and if two or more cars are in the system both servers are active. Note that this ensures that waste as defined in equation 4.1 is equal to zero. Figure 4.2 illustrates the transition rates between the states of the system.

These transition probabilities allow for the construction of the detailed balance equa-tions and the equilibrium distribution. Let πi denote the equilibrium weight of state i.

(26)

0 1 2 3 4

Figure 4.2.: One queue with two servers

Then one can derive that πi =  λ µ1 + µ2 i−1 λ(µ1+ µ2− λ) µ1(µ1+ µ2) + µ2λ for i ≥ 1. (4.2)

By design no capacity is wasted. To calculate the average sojourn times, fix the serving order. The servers will operate on a first come first serve basis. Additionally, the car that has been in the system the longest will be served by server 1, which is the faster server. This implies that cars can move from server 2 to server 1 when server 1 opens up. The distribution of service time is memoryless ensuring that switching servers does not increase expected service time.

The entire system is Markov and the arrivals are Poisson arrivals. Due to the PASTA property we know that the long-term average sojourn time is equal to the expected sojourn time of a single car. To calculate the expected sojourn time three situation are examined. In the first situation a car arrives to find an empty queue. In the second situation the car arrives to find a queue of length one and in the third situation the queue has at least two other cars in it. Let P denote the number of cars already in the system when the new car arrives. Let S be the sojourn time of the new car. If P = 0 then

S|(P = 0) ∼ Exp(µ1),

E(S|P = 0) = E (Exp(µ1)) = 1

µ1

. (4.3)

If P = 1 then there is already one car being processed by server 1. Due to the properties of the exponential distribution, the time till the next car leaves the system is distributed as an exponential random variable with rate µ1+ µ2. The chance that the

new car leaves is equal to µ2

µ1+µ2. If the new car does not leave then it moves to server 1.

S|(P = 1) ∼ Exp(µ1+ µ2) + B  1, µ1 µ1+ µ2  S|(P = 0), E(S|P = 1) = 1 µ1+ µ2 + µ1 µ1+ µ2 1 µ1 = 2 µ1+ µ2 . (4.4)

(27)

first. After i − 1 cars have been served the new car will be in the position it would have been in had P been 1. Let Ej be i.i.d. exponential random variables with rate µ1+ µ2.

Then the sojourn time can be expressed as

S|(P = i ≥ 2) ∼ i−1 X j=1 Ej+ S|(P = 1) E(S|P = i ≥ 2) = 2 µ1+ µ2 + i−1 X j=1 1 µ1+ µ2 = i + 1 µ1+ µ2 . (4.5)

Using the PASTA property and equations 4.2, 4.3, 4.4 and 4.5 the average sojourn time can be calculated

S ∼ ∞ X i=0 1P =i(S|P = i) E(S) = E ∞ X i=0 1P =i(S|P = i) ! = ∞ X i=0 πiE(S|P = i) = µ1+ µ2− λ µ1(µ1+ µ2) + µ2λ 1 + (1 − µ λ 1+µ2) 2 (1 −µ λ 1+µ2) 2 .

4.3. Simulation Methodolgy

The other routing methods are not examined analytically. Instead their performance is evaluated using Monte Carlo methods. Python was used as programming language and object-oriented programming methods were applied.

The one of the main difficulties with using Monte Carlo simulation in the context of queues is the inherent autocorrelation that occurs. If one car had to spent a far above average amount of time to make it through the queue then the next car will most likely also have spent much time in the queue. This autocorrelation increases the variance of the estimate, when estimating the mean sojourn time yielded by the use of a particular decision function. The methods used to reduce the variance of the estimations are described in general terms in section 2.4. Appendix A contains a detailed description of the code used to do the simulations. This description also goes deeper into how the variance reduction methods are implemented. This implementation will be summarized here.

Instead of doing one very large simulation, multiple smaller simulations are done. The results of these smaller simulations are then used to create both estimates and confidence intervals of the quantities such as average sojourn time and waste. Each simulation lets a fixed-length sequence of cars move through the system. These cars are endowed with randomly generated properties such inter arrival time, process time depending on queue, which queue/router it initially goes to and how ties are broken.

(28)

num-ber of options or a length of time based on an exponential distribution. Therefore, all of these quantities can be constructed by transforming a uniform (0,1) random variable. Consequently, if n cars are used in a simulation, which all have m stochastic properties, then a total of n×m uniform random variables determine the outcome of the simulation. The values of these random variables are drawn in advance and used for multiple simu-lations with different routing functions. Additionally, an antithetic version of each draw is computed and used to run a set of simulations. This ensures that common random variables reduce the variances of comparisons between different routing methods and antithetic random variables reduce the variance overall.

In section 4.4 the average sojourn time of different routing methods are compared to the sojourn time of the wJSQ router. In terms of the notation of section 2.4 for the common random variables, the mean sojourn time during a single simulation given that a specific routing method is used is X. When using the same draw of uniform random variables, the mean sojourn time resulting from using a wJSQ router is the Y .

The waste measure of performance can be estimated by using the state of the system at every moment during the calculations. I have chosen to only look at the state space at the moment a car arrives at a router or queue. Since these moments determined by a Poisson process they, due to PASTA, can be used to estimate the long run distribution of the system. This method proofed to be far less computationally intensive than tracking all the moments a change in state space occurs and reconstructing the entire history.

4.4. Simulation Results

Due to the number of parameters it would be unfeasible to examine the performance of the various routers for the entire parameter parameter space. Instead the focus is on the effect of changing one parameter while the other parameters remain fixed. This is done for 6 different settings. The first four settings the influence of the load on the system is examined under various conditions. The fifth setting focuses on changing relative queue capacity. Lastly the influence of α is examined. All previously defined router functions are used in the simulations. Two of the router functions require a parameter n to make their decisions. Versions of these router functions are used where n comes from the set {0, 1, 10, 20}.

4.4.1. Influence of load under fully guided traffic and

homogeneous servers

The first simulation examines the situations where the average service time in both queues are equal and each router manages half of the incoming traffic. The values for µ1 and µ2 are set to 0.5, which makes the value of λ equal to the load ρ.

Figure 4.3 contains the estimates and highlighted 95% confidence intervals for the waste, the sojourn time divided by the sojourn time for weighted Join the Shortest Queue and for the sojourn time. Figure 4.3b shows that both JOQKn and JOQLn perform reasonably well if n has a low value. For higher values of n JOQLn performs

(29)

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Waste Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (a) Waste 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.0 1.2 1.4 1.6 1.8 2.0 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(b) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 5 10 50 100 S MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (c) Sojourn time

Figure 4.3.: The performance of various router functions for different loads when µ1 =

µ2 = 1/2 and α1 = α2 = 1/2

much like a static router for all but the highest loads. This is to be expected. Only under higher loads are queues regularly longer than n and do the routers divert traffic. In this setting, the JOQ routers differ from the static router by occasionally diverting traffic, due to the values of α1, α2, p1, p2.

The parameters are set in such a way that both queues have the same processing rate and the same unrouted incoming traffic. Consequently the comparisons, which wJSQ and JFE make between the two queues when deciding where to send a new arrival, will always yield the same results. Due to the use of common random variables, which are also used for tiebreaks, wJSQ and JFE behave identically under these parameters.

The performance of JQK is influenced by the fact that it consists of two routers. Each one only routes half of the traffic and thus has only knowledge of half the cars in the system. If there were only one router handling all the traffic then JQK would have behaved identically to wJSQ and JFE, but the lack of information sharing between the routers reduces the performance slightly.

Figure 4.3b illustrates the effectiveness of common random variables. The width of the confidence interval is noticeably smaller when comparing the performance of two simulated routers than when comparing a simulate router with a derived theoretical value.

(30)

4.4.2. Influence of load under partially guided traffic and

homogeneous servers

This setup is similar to the previous one; only in this setup not all cars are guided by a router. Only 20% of all traffic is guided. The service rates of the routers are still µ1 = µ2 = 1/2 and λ equals the load.

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Waste Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (a) Waste 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.8 1.0 1.2 1.4 1.6 1.8 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(b) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 5 10 50 100 S MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (c) Sojourn time

Figure 4.4.: The performance of various router functions for different loads when µ1 =

µ2 = 1/2 and α1 = α2 = 1/10

Figure 4.4 contains the estimates made by the simulation. A few changes compared to the previous setup stand out. The M/M/2 queue now outperforms the WJSQ router. This is mainly due to the fact that the value of α does not influence the performance of the M/M/2 queue while it does reduce the performance of the WJSQ router. Ad-ditionally the JOQLn and JOQKn routers with high n, now match the performance of the JQK router for lower loads. Lastly there is a far more noticeable difference between the JOQLn and JOQKn routers for low n. The JOQK0 and JOQK1 matching the performance of the JQK router for all examined loads.

The performance of the JOQL0 and JOQL1 shows the same trend as the Static router for high loads. This can be explained by the fact that when loads are high, the lengths of the queues are usually also high. Consequently JOQL0 and JOQL1 will divert traffic most of the time. Due to the parameter settings, if these routers always divert then their performance should mirror that of the Static router. These routers slightly out perform the Static router, since they do occasionally, when their own queues are exceptionally short, allow traffic into their own queues.

(31)

The JOQK10 and JOQK20 only start outperforming the Static router for very high load. Due to the low α there are few guided cars in the queues. Only when the queues tend to be very long do they contain enough guided cars to trigger the diverting of traffic. Only when the JOQK routers regularly divert traffic away from their own server can they improve the average sojourn time.

4.4.3. Influence of load under fully guided traffic and

heterogeneous servers

In the previous sections the process speed and the arrival rates at the servers were equal to each other. This section contains two setups where the processing speed of one server is double the processing speed of the other. All traffic is assumed to be routed. In the first setup the arrival rates at the routers have the same ratio as the processing rates of their respective servers. In the second setup their ratio is the inverse of the ratio of the processing rates of the respective servers. Note that only the JOQKn and JOQLn routers will perform differently depending on the setup.

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Waste Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (a) Waste 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0 100 200 300 400 500 600 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(b) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.8 1.0 1.2 1.4 1.6 1.8 2.0 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(c) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 5 10 50 100 500 1000 5000 S MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (d) Sojourn time

Figure 4.5.: The performance of various router functions for different loads when µ1 =

2/3, µ2 = 1/3 and α1 = 2/3, α2 = 1/3

Figure 4.5 illustrates the performance under the first setup. The JOQKn and JOQLn routers with low n do not perform well. Already at modestly high loads they are not capable of maintaining stability in the system. Figure 4.5a illustrates this instability. The proportion of excess capacity lost due to inefficient routing is higher than 1. The JOQKn and JOQLn routers with higher n remain stable but perform noticeably worse

(32)

than the JQK router and only outperform static routing probabilities at very high loads. 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Waste Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (a) Waste 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1 2 3 4 5 6 7 8 9 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(b) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.8 1.0 1.2 1.4 1.6 1.8 2.0 S/ SwJSQ MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ

(c) Sojourn time ratios

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 5 10 50 100 S MM2 Static JFE JOQK_0 JOQK_1 JOQK_10 JOQK_20 JOQL_0 JOQL_1 JOQL_10 JOQL_20 JQK wJSQ (d) Sojourn time

Figure 4.6.: The performance of various router functions for different loads when µ1 =

1/3, µ2 = 2/3 and α1 = 2/3, α2 = 1/3

Figure 4.6 shows the performance of the routers when the ratio of the arrival rates at the routers is the inverse of the ratio of the service rates. Under these settings the JOQKn and JOQLn routers with low n perform much better. Routers with n = 0 perform best for low loads, while routers with n = 1 perform better for loads above 0.8. The performance of these routers is similar to the performance of the JQK router noticeably outperform static routing probabilities.

The JOQKn and JOQLn with higher n manage to perform just well enough to prevent for instability for most values of λ. Only for very high loads do they perform better than static routing. They let the slow queue grow to a length of approximately n while the fast queue is nearly empty. The router of the fast queue will hardly ever route its cars to the slow queue thus providing a load of approximately λ/2 on the fast queue. The router on the slow queue will provide that queue with a load of 2λ as long as that queue has a length less than or equal to n. Only at very high loads, when a M/M/1 queue can be expected to regularly be n or more cars long, do these routers route cars away from the slow queue often enough.

Referenties

GERELATEERDE DOCUMENTEN

To test this assumption the mean time needed for the secretary and receptionist per patient on day 1 to 10 in the PPF scenario is tested against the mean time per patient on day 1

Besides, 14 respondents argue that no clear definition of a results-oriented culture is communicated and that everyone has its own interpretation of it. All of

Hoewel er nog maar minimaal gebruik gemaakt is van de theorieën van Trauma Studies om Kanes werk te bestuderen, zal uit dit onderzoek blijken dat de ervaringen van Kanes

The results show that the cultural variables, power distance, assertiveness, in-group collectivism and uncertainty avoidance do not have a significant effect on the richness of the

We study the cycle time distribution, the waiting times for each customer type, the joint queue length distribution at polling epochs, and the steady-state marginal queue

More dynamic routing mechanisms are introduced by Hofri and Ross [118], who study a model where the server does not move to an empty queue while customers are waiting at other

Omdat deze werken eventueel archeologisch erfgoed op de planlocatie kunnen aantasten, is door het agentschap Onroerend Erfgoed (OE) van de Vlaamse Overheid

Gezien deze werken gepaard gaan met bodemverstorende activiteiten, werd door het Agentschap Onroerend Erfgoed een archeologische prospectie met ingreep in de