eindhoven university of technology master the fixed-cycle … · university of technology eindhoven...

79
Eindhoven University of Technology MASTER The fixed-cycle traffic-light queue - efficient algorithms and future improvements Timmerman, R.W. Award date: 2017 Link to publication Disclaimer This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration. General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

Upload: others

Post on 04-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Eindhoven University of Technology

MASTER

The fixed-cycle traffic-light queue - efficient algorithms and future improvements

Timmerman, R.W.

Award date:2017

Link to publication

DisclaimerThis document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Studenttheses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the documentas presented in the repository. The required complexity or quality of research of student theses may vary by program, and the requiredminimum study period may vary in duration.

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

Page 2: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

UNIVERSITY OF TECHNOLOGY EINDHOVEN

MASTER THESIS

The Fixed-Cycle Traffic-Light queue –efficient algorithms and future improvements

Author:Rik Timmerman0801291

Supervisors:Dr. ir. M.A.A. Boon

Prof. dr. J.S.H. van Leeuwaarden

August 3, 2017

A thesis submitted in partial fulfillment of the requirements for the degree ofMaster of Science

in Industrial and Applied Mathematics

Page 3: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Contents

I Algorithmic methods for the fixed-cycle traffic-light and bulk service typequeues 7

1 Introduction 7

2 Kernel method 92.1 Traditional PGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 Factorized PGF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.3 BSQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 Poisson case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5 Root-finding algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.6 Root-finding examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Pollaczek contour integral representation 18

4 Further comparison 214.1 Numerical inversion of PGFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.3 Computation time and accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.3.1 General arrivals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.3.2 Poisson arrivals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.3.3 Explicit performance measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.3.4 Implementation in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.4 Heavy-traffic scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Advanced analysis 325.1 Differentiation versus transform inversion . . . . . . . . . . . . . . . . . . . . . . . . . . 325.2 Delay distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.3 Tail distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6 Extensions and generalizations 396.1 Integral representation for generalizations of the FCTL queue and BSQ . . . . . . . . 396.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7 Conclusion and discussion 44

II Platoon forming algorithms for self-organized street intersections 46

8 Introduction 468.1 Main contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

9 Platoon Forming Algorithms 479.1 Batch algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479.2 Polling inspired algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.3 FCTL algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

2

Page 4: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

9.4 Comparable complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

10 Performance evaluation 5110.1 Relation between standard queueing theory and platoon forming algorithms . . . . 5110.2 Fairness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5310.3 Maximum capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5510.4 Mean delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

11 Mean delay approximation 5811.1 Light traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5811.2 Heavy traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5911.3 Mean delay curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

12 Conclusion and discussion 62

Appendix 66

A Computation times – a first comparison 66

B Computation times BSQ for general scenarios 71

C Computation times BSQ in heavy traffic scenario 73

D Computation times BSQ transform inversion 74

E Computation times tails of the BSQ model 76

F A stochastic domination result for the batch algorithm 77

G Maximum capacity for the k-limited and batch algorithms 78

3

Page 5: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Acknowledgements

I would like to thank Guido Janssen for significant ideas concerning various mathematical results.This made the first part of this thesis stronger.

For the second part I have at the beginning, when generating ideas, closely cooperated withYvonne Gootzen. I would like to thank you for the ideas and suggestions you had and the discus-sions that we had.

General introduction

One of the most studied stochastic models for traffic lights is the fixed-cycle traffic-light (FCTL)queue, firstly analyzed by Darroch [24]. The FCTL queue is traditionally modeled in discretetime, where time is divided into slots of unit length. During each slot exactly one delayed vehicleis allowed to depart from the queue, which is formed by cars arriving at the traffic light. Thegreen periods have a fixed length of g slots, whereas the red periods have a fixed length of rslots. The total cycle time is therefore also fixed and equal to c = g + r.

The vehicles that arrive to the queue when the queue is non-empty, join the queue at the endof the slot in which they arrive. In contrast, we assume that vehicles that arrive during a greenperiod, when the queue has already emptied, pass the intersection without slowing down (seeAssumption 1 in Section 1 for a precise statement). Because of the difference in discharge ratesof delayed vehicles (those vehicles have to accelerate) and non-delayed vehicles, this assumptionmakes sense.

Unfortunately, this assumption complicates the analysis, as is explained in e.g. [52], wherethe probability generating function (PGF) of both the queue length and the delay are derived.The PGF of the delay is directly expressed in terms of the PGF of the queue length, so having anexpression for the queue length, we can easily extend it to delay as well. Both [24, 52] requirefinding the roots of zg−Y (z)c to obtain the PGF of the queue length, where Y (z) is the PGF of thenumber of arrivals in one slot. This root-finding is the major complicating factor in determiningthe PGF of the queue length. For a few arrival processes analytical expressions for the roots ofzg − Y (z)c exist, but not for all [32]. In these cases, where no exact solutions for the roots areavailable, we have to resort to numerical schemes for root-finding.

Alternatively, a recent result shows that the PGF of the queue length can be expressed as acontour integral [6]. This method uses the roots of zg − Y (z)c in a different way such that wedo not have to compute the actual roots. Instead, a Pollaczek-type contour integral is formed,with specific residues at the roots of the equations zg − Y (z)c . Despite the fact that there is noneed to find the roots explicitly, we still need numerical methods, as the contour integral needsto be computed numerically in order to obtain information about the PGF of the queue lengthdistribution.

Obtaining the PGF of the queue length or the delay is still not very informative and we needto extract probabilities and moments from the PGF to be able to say something meaningful aboutthe model. Basically two options exist: one is analytically obtaining probabilities or momentsby taking derivatives of the PGF; and the other one is numerical inversion of the PGF, see e.g.[2, 22].

The FCTL queue is very well-studied, see e.g. [24, 28, 39, 41, 42, 52, 53], although it is quitelimited in its applications, as e.g. the g and r are fixed. One of these limitations is that traffic-

4

Page 6: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

lights nowadays often incorporate information about cars present at the intersection, resultingin e.g. actuated control of traffic lights, see e.g. [43]. The FCTL queue is not directly adaptedfor this randomness in green and red periods. In [42] a way is described to slightly loosen thefixed-cycle assumption in the FCTL queue, but independence between consecutive cycles is stillmandatory. Analyzing a fully actuated setting with maximum green times using the FCTL queueis not possible to date.

Also, the FCTL queue assumes independent arrivals (e.g. independent Poisson arrivals in eachslot). This implies that a network of intersections with traffic lights based on fixed cycles cannotbe analyzed using the standard version of the FCTL queue to each of the intersections separately.In network settings (think e.g. of a tandem of traffic-lights) typically correlation between arrivalswill be present, violating the independence assumption in the FCTL model. A recent paper [7]studies this and obtains fairly general results. However, arrivals between different cycles stillneed to be independent.

Considering recent developments in e.g. GPS technology and presence of GPS technologyin cars, the FCTL queue might become less applicable in the near future than it is nowadays.Already efforts are made to incorporate GPS data in e.g. queue length estimation [23], whichcould in turn be used to enhance the length of the green and red periods, leading to some formof actuated traffic control.

Upon assuming the existence of self-driving cars we might not want to consider the FCTLqueue anymore, as we can reduce delay, as is shown in e.g. [48], by dynamically forming pla-toons. In [48] a platoon forming algorithm is formulated for self-driving cars using informationabout future arrivals. Slowing down vehicles on time, and thereby creating platoons, leads to amore efficient use of the intersection and thereby reduces delay. These so-called platoon formingalgorithms (PFAs) are capable of outperforming the FCTL queue, when designed in a clever way.Considering these developments, the FCTL queue might be depracted in practical situations whenself-driving vehicles are standard, because of PFAs.

On the other hand, the FCTL queue might still function as a building block for more enhancedmodels. Applications like the queue length estimation in [23], require some underlying modellingof the traffic light, for which the FCTL model can be used. Another possible extension of theFCTL queue might be found in a traffic light model, where two arrivals streams are present, oneconsisting of "normal" vehicles and one of motorcycles, as in [40]. As motorcycles occupy lessspace than normal vehicles, motorcycles are able to stand along a normal vehicle and departat the same time as that vehicle, which is in contrast with the one delayed vehicle departurein the FCTL queue. This results in a better representation of the real world setting. Also theresults in [7] seem promising in the fact that networks of traffic lights might be analyzed using ageneralization of the FCTL queue.

The first part of this thesis is devoted to algorithms for the FCTL queue to obtain moments andprobabilities for the queue length and delay distribution from the PGFs. As indicated before,the PGF of the queue length in the FCTL queue comes in different forms, each having their owncomputational advantages and drawbacks. Upon obtaining the PGFs we have to choose a methodto extract the moments and probabilities from the PGF, which requires e.g. numerical inversionof the transform. Weighing all pros and cons and considering various scenarios (e.g. heavy trafficand tail probabilities) we come to recommendations for specific algorithms to obtain momentsand probabilities for the queue length and delay distribution. Furthermore, we generalize theobtained PGFs for the queue length distribution in the FCTL queue to a more general set ofmodels, considered in [42]. One of the models included by the generalization formulated in

5

Page 7: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

[42] is the FCTL queue with a one-vehicle assumption. This model can e.g. be used to modelright-turning traffic at signalized intersections. Another model in [42] is a model with randomgreen periods. As the bulk service queue (BSQ), firstly analyzed in [5], is very closely relatedto the FCTL queue, we also present algorithms for this model. We consider several extensionsof the BSQ, among which are random dispatch sizes (comparable to random green times in theFCTL queue), see [31], and vehicle dispatching strategies, see [44, 45]. We will see that thoseextensions are also included in the set of models in [42]. For all those queueing models, wepresent a general formula to obtain the PGF of the queue length distribution.

The second part of this thesis focuses on platoon forming algorithms. Upon assuming thepresence of self-driving cars, [48] shows a PFA. This PFA forces the vehicles to use the intersectionmore efficiently, leading to a decrease in the mean delay. We introduce several new PFAs andenvision the FCTL queue in this futuristic setting. We compare the performance of the FCTLqueue to the PFA introduced in [48]. We will see that the PFA in [48] generally outperforms theFCTL queue, e.g. regarding mean delay. However, the new PFAs we consider, which are basedon adapted polling models, lead to even further reductions in delay [48]. We will also considerfairness (defined as in [47]) and maximum capacity when comparing the PFAs and the futuristicFCTL queue. Because analytical results are mostly lacking, we simulate the PFAs to be able todraw conclusions. However, we do formulate approximations for the mean delay for severalPFAs, based on interpolating the light and heavy traffic limits for the specific PFAs as [9] does forstandard Polling models.

6

Page 8: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Part I

Algorithmic methods for the fixed-cycletraffic-light and bulk service type queues

Abstract

The fixed-cycle traffic-light (FCTL) queue is the null model for intersections with staticsignaling, where vehicles arrive, form a queue and depart during cycles controlled by a trafficlight. The bulk service queue (BSQ) is a closely related and widely applicable model, wherearrivals and queue forming are the same as in the FCTL queue, but here vehicles are onlyallowed to depart at the end of a cycle. We review and compare the available methods forperformance evaluation of the stationary FCTL queue and BSQ based on exact expressionsfor the probability generation functions, either in terms of complex-valued roots or complex-contour integrals. While both representations are typically considered numerically challeng-ing, forcing practitioners to use approximative methods or simulation, we present efficientnumerical schemes for root finding, contour integration and transform inversion. Taken to-gether, this presents a complete algorithmic recipe for the exact evaluation of the FCTL queueand BSQ and (with slight extensions) many related models, as the FCTL queue with randomgreen periods and vehicle cancellation strategies in the BSQ.

1 Introduction

As discussed in the general introduction, the fixed-cycle traffic-light (FCTL) queue is an inten-sively studied and widely applied stochastic model in traffic engineering [7, 24, 28, 39, 41, 52,53]. Recapping, the vehicles arrive to an intersection, form a queue and are allowed to leaveduring the time slots at which the traffic light is green. Each slot corresponds to the time neededfor a delayed vehicle to depart from the queue and the green and red periods, of length g and r,are assumed to be fixed multiples of one slot. The total cycle length is c = g + r. Vehicles thatarrive to the queue and are delayed, join the queue at the end of the slot in which they arrive.The high-level description is complete with the following assumption, dealing with vehicles thatarrive at an empty intersection during the green period.

Assumption 1 (FCTL assumption) For those cycles in which the queue clears before the greenperiod terminates, all vehicles that arrive during the residual green period pass through the sys-tem and experience no delay whatsoever.

The FCTL assumption lets vehicles that arrive during the residual green period pass the inter-section without slowing down, and therefore the discharge rate of these vehicles is larger thanthe discharge rate of the delayed vehicles (one per time unit). This is sensible, because of thedifference between delayed vehicles (that have to accelerate) and non-delayed vehicles.

Let Xk,n denote the queue length at time k in cycle n, where time is expressed in slots. Weassume that a cycle starts with a green period and then X g,n is defined as the overflow queue, thequeue length at the end of the green period, from which we can easily deduce the queue lengthat other moments during the cycle. We define An :=

∑ck=1 Yk,n to be the total number of arrivals

between X g,n and X g,n+1, where Yk,n denotes the number of vehicles arriving in slot k duringcycle n. Let us further define, An = Ad

n + Apn, where Ad

n denotes the number of delayed vehicles

7

Page 9: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

arriving during cycle n and Apn the number of vehicles that pass the intersection without delay in

the same time period. The overflow queue can then be defined as

X g,n+1 =max{X g,n+ Adn− g, 0}. (1.1)

Upon further assuming that all Yk,n are independently and identically distributed, we see thatthe queue lengths at the end of time slots can be modeled as a discrete-time Markov chain. Toensure that X g,n does not grow unboundedly, we assume that the average number of arrivals ineach cycle is less than the maximum number of delayed vehicles that are allowed to depart eachcycle. We will refer to this condition as the stability condition. Making this rigorous, the stabilitycondition reads cE[Yk,n] < g. Using these assumptions and suitable analytic techniques, [24]obtained the probability generating function (PGF) of the steady-state overflow queue, whereas[52] obtains the PGF of the steady-state delay, where a PGF A(z) of a random variable A is definedas A(z) = E[zA]. Hence, all information about the distributions of the steady-state overflow queueand steady-state delay can be obtained from [24, 52]. Moreover, the distribution of the outputprocess (the way vehicles leave the intersection) can also be obtained.

The traditional FCTL treatment in [24, 52], requires the complex-valued roots of the equationzg − Y (z)c on or within the unit circle, where Y (z) is the PGF of the arrivals in one slot, whichmakes the method computationally cumbersome. These roots are needed because the PGF of thestationary overflow queue length distribution contains g boundary terms that need to be foundseparately. By Rouché’s theorem there are g complex-valued roots of the equation zg−Y (z)c andthose are used as input for a system of linear equations, which, together with a normalizationcondition, gives the unknown boundary terms. Both steps were somehow assumed unavoidablein the mathematically rigorous treatment of the FCTL queue [24, 39, 41, 52, 53]. However,[42, 6] both show that the knowledge of the g roots is sufficient to determine the PGF of thequeue length and there is no strict need to solve the system of linear equations.

The above described root-finding strategy is not needed, as the two recent papers [42, 6]show. We still use the existence of those g roots, but do not compute them. Instead we usecomplex contour integration and residue calculus to obtain the right terms in order to obtain thePGF.

Some extensions and generalizations to the FCTL model exist and require only minor changesto computation methods. In [42] some are shown. One is a minor modification to the FCTL queuewhere a one-vehicle assumption is made to model right turning traffic. Another generalization isthat [42] allows for a random number of green slots in each cycle.

Bulk-service queues (BSQs) have a wide range of applications and are studied in e.g. [5, 31,32, 34, 44, 45]. Applications include (but are by no means limited to) vehicle cancellation andholding strategies [45] and cable access networks [25]. We will focus on the BSQ firstly analyzedby [5] and present ways of extending this to more general models later.

BSQs are, in terms of mathematical analysis, in many ways similar to the FCTL queue. Wewill remain talking about vehicles and use g to denote the number of vehicles that leave at eachdispatching moment (the time at which vehicles may leave), although these bulk-service queuesare much wider applicable and the notion of vehicle might not be the right one. The overflowqueue for the BSQ can be defined as

X b,n+1 =max{X b,n+ An− g, 0}. (1.2)

Note that the only difference with (1.1) is that we add all vehicles, because all vehicles aredelayed (as any vehicle has to wait until the next dispatch time), which is not the case in the

8

Page 10: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

FCTL queue (because of the FCTL assumption). An represents in this case the arrival process atthe BSQ between dispatching moments. This has the consequence that for some representationsof the PGF of X b we have to find the g complex-valued roots of the zg −A(z), where A(z) denotesthe PGF of the arrival process between dispatch moments, which is equivalent to the Y (z)c in theFCTL queue.

Also here we do not need the root finding strategy, just as in the FCTL case. For the BSQ thisis known for quite some time (see e.g. [1, 34]) and also here we do exploit the fact that the rootsexist, but do not compute them explicitly. The approach for the BSQ to obtain complex contourintegration solutions for the BSQ is very similar to the approach in the FCTL queue.

Also for the BSQ several extensions are possible. One of these extensions is a BSQ with ran-dom dispatch sizes (i.e. random g), see [31], and vehicle cancellation and/or holding strategiesare discussed in [44, 45].

Outline. We review the available representations for the PGF of the stationary FCTL queue andBSQ, and explain how both representations come with specific numerical challenges. In Section2 we discuss the PGFs in terms of complex-valued roots and in Section 3 we treat the PGFs interms of contour integrals. Section 4 presents a comparison between the complex-valued rootsrepresentations and contour integral representations when we want to obtain probabilities andmoments. We discuss the additional numerical challenges that come with transform inversion,calculating the delay distribution and tail probabilities in Section 5. Although much attentiongoes to the BSQ and FCTL queue, we show that generalizations and expansions are easily dealtwith, once having algorithms for the BSQ and FCTL queue. We show this in Section 6 and weconclude in Section 7.

2 Kernel method

We describe the traditional way of obtaining the PGF for the FCTL queue and BSQ. This strategyneeds complex-valued roots to be computed. We present one special case of the arrival processwhere we can explicitly determine these roots. Subsequently, we introduce a new and efficientway of finding these roots for general arrival processes.

2.1 Traditional PGF

Assume P(Y = 0) > 0, Y ′(1) < 1, and Y (z) to be analytic in a region |z| < R with R > 1 andR maximal. The key quantity in the mathematical analysis of the FCTL queue is the steady-stateoverflow queue, defined as X g = limn→∞ X g,n. Clearly, to have stability, and for X g to be welldefined we require,

cE[Y ]< g. (2.1)

Using the kernel method and transform techniques, the PGF of X g , denoted by X g(z) = E[zX g ] canbe obtained using a by now classical line of reasoning. Introduce two more PGFs Y (z) = E[zY ]and A(z) = E[zA] = E[zY ]c = Y (z)c . Then it can be shown that [24, 52]

X g(z) =(z− Y (z))

∑g−1k=0 qkzkY (z)g−1−k

zg − A(z). (2.2)

This expression still contains g unknowns q0, . . . , qg−1, which can be found by exploiting theanalytic properties of PGFs. With Rouché’s theorem, it can be shown that the denominator of

9

Page 11: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

(2.2) has g zeros on or within the unit circle |z| = 1. Because a PGF is analytic and well-definedin |z| ≤ 1, the numerator of X g(z) should also vanish at each of the zeros. This gives g equations.One of the zeros equals 1, and leads to a trivial equation. However, the normalization conditionX g(1) = 1 provides an additional equation, yielding (see e.g. [52])

g−1∑

k=0

qk =g − cY ′(1)1− Y ′(1)

:= η. (2.3)

The resulting system of equations is a Vandermonde system for which solutions can be obtainedvery efficiently. Following [52], we define ζ(z) = z/Y (z) and we define z1, ..., zg−1 as the roots ofzg − Y (z)c within the unit circle, the system of linear equations is

1 1 1 . . . 11 ζ(z1) ζ(z1)2 . . . ζ(z1)g−1

1 ζ(z2)2 ζ(z2)2 . . . ζ(z2)g−1

......

......

...1 ζ(zg−1)2 ζ(zg−1)2 . . . ζ(zg−1)g−1

q0q1q2...

qg−1

=

η

00...0

. (2.4)

The solutions for qk can then be used to determine (2.2) and read

q j = η(−1) j1

∏g−1k=1(ζ(zk)− 1)

1≤i1<i2<···<ig−1− j≤g−1

ζ(zi1)ζ(zi2) . . .ζ(zig−i− j). (2.5)

All ingredients to determine X g(z) are now present and we can obtain probabilities and mo-ment of the queue length distribution. The mean queue length is e.g.

E[X g] =cσ2

Y + (c− g)2µ2Y − g2(1−µY )2

2(g − cµY )−

σ2Y

2(1−µY )+

1−µY

2+(1−µY )2

g − cµY

g−1∑

k=0

kqk, (2.6)

where µY = Y ′(1) and σ2Y = Y ′′(1) + Y ′(1) − (Y ′(1))2. More generally the k-th moment can

be found by evaluating the k-th derivatives of X g(z) at z = 1, whereas for obtaining the k-thprobability of the queue length distribution we evaluate the k-th derivative at z = 0. In moredetail, we have the following relations

E[X g(X g − 1) · · · (X g − k)] =dk

dzkX g(z)

z=1(2.7)

P(X g = k) =1

k!

dk

dzkX g(z)

z=0(2.8)

2.2 Factorized PGF

An alternative strategy, recently exploited by [42, 6] is based on the g roots in the denominatorand the polynomial in Y (z)/z in the numerator of order g−1. We factor the polynomial in Y (z)/zin terms of the roots within the unit circle of the denominator to obtain

X g(z) = zg−1 g − A′(1)zg − A(z)

z− Y (z)1− Y ′(1)

g−1∏

k=1

Y (z)/z− Y (zk)/zk

1− Y (zk)/zk, (2.9)

10

Page 12: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

after normalization (i.e. requiring X g(1) = 1). So, there is no need to solve the system of linearequations (2.4), implying a possible reduction in computation time. From (2.9) we can deduce acontour integral representation (see [6]), which will be discussed in Section 3.

The two representations are closely related, as expanding the numerator of the product in(2.9) results in a polynomial in terms of Y (z)/z. We slightly rewrite (2.9) by extracting a Y (z)g−1

term, including the zg−1 term in the product term to obtain a polynomial in z/Y (z) and adjustthe root terms accordingly to obtain

X g(z) = Y (z)g−1 g − A′(1)zg − A(z)

z− Y (z)1− Y ′(1)

g−1∏

k=1

z/Y (z)− zk/Y (zk)1− zk/Y (zk)

(2.10)

= Y (z)g−1 g − A′(1)zg − A(z)

z− Y (z)1− Y ′(1)

g−1∏

k=1

ζ(z)− ζ(zk)1− ζ(zk)

.

The coefficients of the numerator in the product of (2.10), say x j , j = 0, ..., g−1 can be describedin the following way (very similar to what it is done in [56] for the BSQ)

x j = (−1) jS j , (2.11)

where

S j =1

∏g−1k=1(ζ(zk)− 1)

1≤i1<i2<···<ig−1− j≤g−1

ζ(zi1)ζ(zi2) . . .ζ(zig−1− j). (2.12)

We see that the x j , up to factors present in (2.10) are equal to the q j in (2.2). Indeed, the tworepresentations are equivalent.

The expected queue length can also be derived from (2.9) and yields

E[X g] =g−1∑

k=1

(µY − 1)1− Y (zk)/zk

+ g − 1+µY

2−

g(g − 1)− cµY (cµY − 1)2(g − cµY )

+(c− g)σ2

Y

2(1−µY )(g − cµY ).

(2.13)

Again, this expression is explicit in terms of the roots z1, ..., zg−1, not requiring solving a systemof equations.

2.3 BSQ

Turning towards the bulk service queue, we note that the arguments given for the FCTL queueremain almost the same. Starting from the same assumptions as in the FCTL queue, we can showthat the PGF of the queue length at dispatch moments, X b(z), is (see e.g. [5])

X b(z) =

∑g−1k=0 xk(zg − zk)

zg − A(z). (2.14)

To obtain the xk we use that there are g roots on or within the unit circle (again by Rouché’stheorem) and we denote the roots of the denominator within the unit circle by z1, ..., zg−1 andnormalization. The expressions for the xk are (following [56])

xk =g − A′(1)∏g−1

j=1 1− z j

(−1)g−k+1Sg−k, (2.15)

11

Page 13: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

where Sk for k = 1, ..., g is defined as

Sk =∑

1≤i1<i2<···<ik≤g

zi1zi2 . . . zik . (2.16)

These xk are again the solution of a Vandermonde system, as in the FCTL queue, but here thearguments are simpler.

Alternatively, we can directly use the fact that the numerator is a polynomial in z and donot have to solve a system of linear equations (so, just as in the FCTL queue, we have tworepresentations based on complex-valued roots). The factorized PGF for the BSQ yields

X b(z) =(z− 1)(g − A′(1))

zg − A(z)

g−1∏

k=1

z− zk

1− zk, (2.17)

where z1, ..., zg−1 denote the roots within the unit circle of the denominator.When comparing (2.14) and (2.17) we see that basically no differences exist between the two

representations. Expanding the product in (2.17) leads to the xk in (2.14), in a very similar wayas in the FCTL queue. The two representations for the BSQ are equivalent.

The mean queue length in case of the BSQ is:

E[X b] =σ2

A−µA(1−µA)− g(g − 1)2(g −µA)

+g−1∑

k=1

1

1− zk, (2.18)

where σ2A denotes the variance and µA denotes the mean of the arrival process between dispatch

moments in the BSQ.From above expressions we readily see that the BSQ is closely related to the FCTL queue. In

fact, the only difference between the two models is that in the BSQ no "during-cycle" departuresare allowed, whereas this is the case in the FCTL queue (see e.g. the FCTL assumption). Thisresults for the FCTL queue in the polynomial in Y (z)/z and the factor (z − Y (z))/(1 − Y ′(1))in (2.9), where Y (z) represents the number of vehicles that are allowed to depart the queueduring green slots when the queue length is 0. In the BSQ no departures are allowed duringthis green period (only at the end) and the PGF therefore reduces from Y (z) to 1. This resultsin a polynomial in terms of z and a factor z − 1, both present in (2.17), instead of Y (z)/z and(z− Y (z))/(1− Y ′(1)) in the FCTL queue.

We close this section with the remark that the BSQ and the FCTL queue are equivalent uponassuming that the FCTL queue has Bernoulli arrivals, i.e. at most one arrival in each slot. Thisway the FCTL assumption does not influence the system, as no vehicle can take advantage of itspredecessor in the same slot having zero delay. This way in both models at most g vehicles areallowed to depart and the FCTL queue reduces to the BSQ with binomial arrivals.

2.4 Poisson case

In order to be able to work with X g(z) and X b(z) we need to find the roots of the denominator inboth models, which is zg−Y (z)c = zg−A(z). The case where arrivals follow a Poisson distributionallows for exact solutions of the roots in terms of the Lambert W-function [55]. The Lambert W-function satisfies z =W (z)exp(W (z)), where z ∈ C, and we can therefore obtain fully analyticalresults in this case by taking the principal value of the Lambert W-function. So, in case of Poissonarrivals we do not need any root-finding, as we know the roots exactly. In both the FCTL queueand the BSQ we are therefore able to obtain probabilities and moments analytically.

12

Page 14: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Theorem 2 Assume that the arrival distribution in one slot in the FCTL model is a Poisson dis-tribution with parameter λ and that g and c are positive integer values. Then the solutions ofzg − Y (z)c = zg − exp (cλ(z− 1)) = 0, which we denote z1, ..., zg , are given by

zk =−g

cλW�

−cλ

ge2πik/g e−cλ/g

, (2.19)

where W (.) denotes the principal value of the Lambert W-function and i is the imaginary unit satis-fying i2 =−1.

Proof. We prove this relation in the following way, making use of the specific properties of theLambert W-function and of the fact that exp(2πik) = 1 for k ∈ Z.

Y (zk)c = exp

−gW�

−cλ

gge2πik/g e−cλ/g

− cλ�

=�

exp�

W�

−cλ

gge2πik/g e−cλ/g

���−g

e−cλ

=W�

− cλg

e2πik/g e−cλ/g�g

ecλ�

−−cλg

e2πik/g ecλ/g�g

=

− gcλ

W�

− cλg

e2πik/g e−cλ/g��g

ecλe−cλe2πik= zg

k .

�Using Theorem 2, we also obtain an expression for ζ(zk) in case of Poisson arrivals. It can

easily be verified thatζ(zk) = e−2πik/g Y (zk)

c/g−1, (2.20)

which we can use as input for the solution of the Vandermonde system (2.5).In general we do not have an explicit expression for the roots, which is why we present an

algorithm to obtain the roots numerically as well.

2.5 Root-finding algorithms

Several root-finding algorithms exist, see for example [4, 32], but none of these methods seemsto be working in full generality. We exploit one that finds all roots in all cases we consideredand does so very efficiently. This algorithm is particularly applicable when using computer alge-bra systems (CAS), which are capable of performing symbolic computations. One reason is thatwe will make use of a truncated Taylor series of A(z) (or Y (z)c). Software that is not capableof performing symbolic computations might still be used, because A(z) is a PGF and numericalinversion up to arbitrary precision of PGFs is possible, see e.g. [2] and Section 4.1 for more infor-mation. So as long as a software package is capable of performing arbitrary-precision arithmetic(APA) for all steps in the algorithms we present, we can use that software package. If this is notthe case and there is a maximum precision in finding the roots, we might run in trouble whenwe want very precise results. As Mathematica is a CAS and is APA software, we use Mathematicato perform the calculations. In Section 4.3.4 we shall make a sidestep to R and point out somedifficulties with working with systems that are not CAS or APA.

13

Page 15: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

The method we use to find the roots, boils down to making a Taylor expansion of the truncatedgenerating function of the arrival process A(z) and solve this (polynomial) equation for roots.We show in Propositions 3 and 4 that this is a good alternative to solving the actual equation.Then, we use these solutions as starting points to find the roots of the original equation wewanted to solve. The Mathematica functions NSolve and FindRoot both use multiple built-inmethods. Amongst those for the NSolve algorithm are the Jenkins-Traub method for root-findingof polynomials see e.g. [35, 38] and Aberth’s method for root-finding of polynomials [3] and forFindRoot a Newton-Raphson method. Numerical problems did not occur. We did not considerheavy-tailed distributions when testing above described strategy.

We first show two propositions, implying that the number roots we find by using the truncatedPGF of the arrival process is the same as the number of roots using the original PGF and thatthe roots obtained by both functions should be close to each other if the order of the Taylorapproximation is sufficiently high.

Proposition 3 Let D(z) = zg−A(z) and let Dn(z) := zg−An(z), where An(z) denotes the n-th orderTaylor approximation of A(z). Upon assuming that A(z) is a PGF; that A(z) is analytic in the disk|z| < 1+ δ for some δ > 0; and that g < A′(1), Dn(z) = 0 has as many roots on or within the unitcircle as D(z) (i.e. g).

Proof. Rouché’s theorem states that if f and g are analytic inside some region K with closedcontour ∂ K and if |g(z)| < | f (z)| on ∂ K , then f and f + g has the same number of zeros insideK .

The conditions that A(z) has to be analytic in |z|< 1+δ and g < A′(1) together imply

(1+ γ)g > A(1+ γ), (2.21)

for some γ ∈ (0,δ), see e.g. [24]. Assume |z|= 1+ γ. Then:

|z|g = (1+ γ)g

> A(1+ γ)

≥ An(1+ γ)

= An(|z|)≥ |An(z)|, (2.22)

where the strict inequality follows from (2.21) and the remaining inequalities from the fact thatA(z) is a PGF.

So we may apply Rouché’s theorem on f (z) = zg and g(z) =−An(z). As zg has g roots on orwithin the unit circle, Dn(z) will have g roots as well, just as D(z). �

Proposition 4 Let D(z) and Dn(z) be as defined in Proposition 3. Let z j , j = 1, ..., g be the roots ofD(z) on or within the unit circle. Then

|Dn(z j)| ≤∞∑

j=n+1

ak, (2.23)

for j = 1, ..., g, where ak = P(A= k).

14

Page 16: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Proof. We directly obtain from the definition of z j

|Dn(z j)|= |Dn(z j)− D(z j)|

=

zgj −

n∑

i=0

aizij − zg

j +∞∑

i=0

aizij

=

∞∑

i=n+1

aizij

≤∞∑

i=n+1

ai , (2.24)

because ai ≥ 0 and |z j| ≤ 1. �From Proposition 4 we see that if we let n tend to infinity, then Dn(z j) tends to 0. This implies thatthe roots obtained by using Dn(z) will be close to the actual roots of D(z) when n is sufficientlyhigh.

Having shown that our algorithm is worthwhile considering, we present the algorithm inpseudo-code.

Algorithm 1 Root-finding based on truncated Taylor series of zg − A(z).1: Input: A(z), g, where A(z) = Y (z)c .2: Define denominator: D(z) = zg − A(z).3: Compute n: max{100, 50+max{c, g}}.4: Compute Taylor expansion Dn(z) of D(z) of order n.5: Numerically solve Dn(z) = 0 in the upper half of the unit circle, including the real axis,

obtaining roots z1, ..., z j for some j ≥ g/2. Use, for example, a Jenkins-Traub method.6: Use z1, ..., z j as initialization for a method to find the roots of D(z) in the upper half of the unit

circle, including the real axis, obtaining roots z1, ..., z j . Use, for example, a Newton-Raphsonmethod.

7: Compute the conjugates of all complex-valued roots found and join this with the found rootsin the upper half of the unit circle to obtain z1, ..., zg .

8: Return z1, ..., zg .

Other possibilities that Mathematica provides, are (amongst others) an exact solver for theroots of zg−A(z) and a direct numerical solver. Especially the first method does not seem to workfor all distributions and both methods are often considerably slower than the above describedalgorithm.

Pioneering research devoted to root-finding in queueing theory has been conducted byChaudhry and several co-authors, see e.g. [13, 12, 19, 21, 15, 16, 17, 18, 20]. In [17], manyexamples of queueing models requiring (numerical) root-finding are discussed and the softwarepackage QPACK [15] is used intensively to find these roots. Our algorithm is an alternative toQPACK to find those roots. For all examples considered in [17] we were able to reproduce theresults using Algorithm 1 without any changes. Algorithm 1 is therefore a simple, yet extremelyefficient and accurate alternative to the root-finding procedures in QPACK to find the roots withinthe unit circle and can easily be used in any CAS or APA software package.

15

Page 17: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

2.6 Root-finding examples

We present five examples, where Mathematica is capable of providing solutions using the exactsolver, often resulting in solutions based on the Roots function of Mathematica. The first twoexamples are inspired by [32] and [51]. In [32] it is noted that their developed method is notapplicable to find all roots of zg − A(z). We show that we are able to compute the roots usingAlgorithm 1. The same holds for the second example taken from [51]. Next, we present oneexample with Poisson arrivals, where we can easily compare the true values of the roots (seeTheorem 2) and the numerical values obtained by Algorithm 1.

We start with an example that is applicable in the BSQ. We choose g = 20, c = 1 and Y tobe binomially distributed with parameters n and p, where n = 10 and p = 84/100. In [32] it isargued that the roots of zg − A(z) are not on a smooth Jordan curve and therefore the methodof the Fourier series representation [32] does not work. Our results can be found in Figure1. Also the second example aligns nicely with the BSQ. Here we assume g = 26, c = 1 and

A(z) =�

47(z2+ 1

2z+ 1

4)�4

. In [51] it is shown that, for the same reason as in the first example,it is not possible to compute the roots with the Fourier series representation. Our results can befound in Figure 2.

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0Im

Figure 1: roots within the unit circle ofthe equation z20 − A(z), where A is bino-mially distributed with parameters 10 and84/100, computed with Algorithm 1.

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0Im

Figure 2: roots within the unit circle ofthe equation z26 − A(z), where A(z) =(4/7(z2 + 1/2z + 1/4))4, computed withAlgorithm 1.

In Figure 1 and 2 we see that we computed all 20, respectively, 26 roots on or within the unitcircle. We compared the numerical results with the exact values and the numerical roots agreedwith the exact roots found by Mathematica’s Roots function up to the working precision (300digits) in which we determined the numerical results. Note that for these two examples D(z) isa polynomial of order lower than 100, so Dn(z) = D(z) in these two cases. In these two casesstep 6 of Algorithm 1 is therefore not necessary. As a final remark before turning to the Poissonexample, we note that Algorithm 1 completed in both examples within 0.1 seconds.

Now turning to the Poisson arrivals, we slightly adapt our algorithm to show the effect of using

16

Page 18: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

the Taylor series approximation of A(z), where we take A(z) = Y (z)c . We study one case were wechoose the order of the Taylor series to be 15 and one that is equal to max{100,50+max{g, c}},as in Algorithm 1. We compare the roots found by solving Dn(z) = 0 (denote them zi , i = 1, ..., g)for both n with the actual roots (denote those zi) found by solving D(z) = 0. We choose g = 18,c = 50 and the arrival intensity in each slot 3/10 (so Y (z) = exp(3/10(z − 1)). Using Theorem2 we are able to obtain the exact roots in terms of the Lambert W-function. Note that the orderof the Taylor approximation in the first case is lower than the number of roots we want to obtain(15 vs. 18).

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0

Im

Figure 3: zi for n = 15 (in red) and zi (inblue) for i = 1, ..., 18.

●●●

●● ●

●-1.0 -0.5 0.5 1.0

Re

-1.0

-0.5

0.5

1.0

Im

Figure 4: zi for n = 100 (in red) and zi (inblue) for i = 1, ..., 18.

We see in Figure 3 that the roots zi already closely match the actual roots when the orderof the Taylor approximation is slightly less than g (at least in this setting). We see that, asProposition 3 ensures us, indeed g roots are found (even if the order of the Taylor approximationis less than g). However, choosing a higher order approximation results in better estimations ofthe roots when comparing Figure 3 and 4. We also see that the minimum order of 100 for theTaylor series is sufficient in this example to obtain very good approximations for the actual roots.In both cases we found the roots of D(z) up to a very high precision in the subsequent steps ofAlgorithm 1.

To conclude this section, we consider an example where we combine two features we sawabove. One is that the roots are not on a closed Jordan curve, so the method of the Fourier seriesrepresentation in [32] does not work and that we truncate the arrival distribution when usingAlgorithm 1. In this example we choose g = 260, c = 40 and in each slot the distribution of thenumber of arrivals has PGF

Y (z) =4

7

z2+1

2z+

1

4

e1/100(z−1). (2.25)

In Figure 5 we show the solutions of zg − Y (z)40, found with Algorithm 1 an a working precisionof 300 digits.

17

Page 19: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0

Im

Figure 5: roots within the unit circle of the equation z260 − A(z), where A(z) = Y (z)40 andY (z) = 4/7(z2+ 1/2z+ 1/4)exp(1/100(z− 1)), computed with Algorithm 1.

Algorithm 1 computes the roots in Figure 5 in 95 seconds, showing that an increasing numberof roots and a high order Taylor approximation (here we choose to include 310 terms of theTaylor series of A(z)) increase the computation time. Nevertheless, the roots are found within avery reasonable amount of time and are very accurate.

3 Pollaczek contour integral representation

Under the same assumptions as in Section 2, we now turn to an alternative expression for X g(z).This result was recently obtained in [6].

There is an ε0 > 0 such that for all ε ∈ (0,ε0)

X g(z) = exp

1

2πi

|w|=1+ε

Y ′(w)w− Y (w)w− Y (w)

z− Y (z)wY (z)− zY (w)

ln�

1−A(w)wg

dw

!

, |z|< 1+ ε,

(3.1)with principal value of the logarithm (so we take the complex logarithm satisfying log(z) =log(|z|) + iArg(z)). Here ε0 can be defined as the minimum of two values: t0 and R0. t0 satisfies

t0 = sup{t ∈ (0, R)|Y ′(t)t − Y (t)≤ 0}, (3.2)

where R is the such that Y (z) is analytic for |z| < R and R maximal. R0 is defined as the smallest

18

Page 20: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

root in absolute value outside the unit circle of zg − A(z), which is on the positive real axis (seee.g. [14]).

We obtain a slightly different formula for (3.1) upon manipulation of the integrand usingpartial integration, using that

(wg − A(w))′

wg − A(w)=

g

w+

d

dwln�

1−A(w)wg

(3.3)

andd

dwln�

zY (w)−wY (z)Y (w)−w

=Y ′(w)w− Y (w)

Y (w)−w

Y (z)− z

zY (w)−wY (z), (3.4)

resulting in

X g(z) = exp

1

2πi

|w|=1+εln�

zY (w)−wY (z)Y (w)−w

(wg − A(w))′

wg − A(w)dw

!

, (3.5)

which is also shown in [6].All terms in the above expressions are input parameters and therefore we do not need root-

finding algorithms or linear equation solvers. However, we need numerical methods to computethe various integrals.

The mean stationary overflow queue EX g is given by X ′g(1) and takes the form

EX g =1

2πi

|w|=1+ε

Y (w)−wY ′(1)Y (w)−wY (1)

(wg − A(w))′

zg − A(z)dw. (3.6)

This result was recently obtained in [42] using a direct proof that converted the classical expres-sion for EX g in (2.6) in terms of roots into the integral expression (3.6).

In more generality, we are able to express all stationary moments in terms of contour integrals,using the relation

X (k)g (z)�

z=1=

dk

dzkX g(z)

z=1, (3.7)

similar to what we do in (2.7) when having the roots-based representation.We elaborate upon this and follow the reasoning in [6] starting from (3.5). We define

f (z) :=1

2πi

|w|=1+εg(w, z)

(wg − A(w))′

wg − A(w)dw, (3.8)

g(w, z) := ln�

zY (w)−wY (z)Y (w)−w

, (3.9)

hk(z) :=

(

1 k = 0,

hk−1(z) f ′(z) + h′k−1(z) k = 1, 2, . . .(3.10)

The moments E[X kg] then follow from differentiating the PGF, and these derivatives can be ex-

pressed as

X (k)g (z) :=dk

dzkX g(z) =

dk

dzkexp�

f (z)�

= hk(z)exp�

f (z)�

, (3.11)

19

Page 21: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

for k = 0, 1,2, . . . . X (k)g (z) can therefore be expressed in terms of the first k derivatives of f (z),denoted by f (1)(z), . . . , f (k)(z) with

f ( j)(z) :=∂ j

∂ z j

1

2πi

|w|=1+εg(z, w)

(wg − A(w))′

wg − A(w)dw

=1

2πi

|w|=1+ε

∂ j

∂ z j g(z, w)(wg − A(w))′

wg − A(w)dw. (3.12)

After substituting z = 1, we can express the first k moments of X g in terms of k contour integrals.Likewise, the stationary distribution of the overflow queue follows from

P(X g = k) =1

k!

dk

dzkX g(z)

z=0, (3.13)

again similar to what we do when having the roots-based representation (2.8). To obtain proba-bilities we can use the above described framework as the only difference in the above derivationis that we do not evaluate the contour integrals at 1, but at 0 and that we divide by a factorialfactor.

The BSQ has a very similar type of expression in terms of contour integrals, see e.g. [1, 33],

X b(z) = exp

1

2πi

|w|=1+εln�

z−w

1−w

(wg − A(w))′

wg − A(w)dw

!

, (3.14)

where we can deduce (3.14) from (3.5) by putting Y (z) = 1, as the PGF of the in-slot departuresin the BSQ is equal to 1, just as in the root-based representations. Also in this case we are able toobtain contour integrals for the mean and variance

E[X b] =1

2πi

|w|=1+ε

1

w− 1

(wg − A(w))′

wg − A(w)dw (3.15)

and more generally, moments for the BSQ can be obtained using the same reasoning as in (3.7)and the formulas thereafter with some straightforward adjustments and for probabilities we areallowed to use relation (3.13).

For completeness, we also give a slightly different version of (3.14) based on work in [33]

X b(z) = exp

1

2πi

|w|=1+ε

z− 1

(w− 1)(w− z)ln�

1−A(w)wg

dw

!

, (3.16)

which will be used later on in the various algorithms. As in the FCTL case we make use of partialintegration, using (3.3) and

d

dwln�

z−w

1−w

=z− 1

(w− 1)(w− z), (3.17)

to obtain (3.16) from (3.14).

20

Page 22: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

4 Further comparison

We start this section with general numerical inversion schemes of the PGF. Then, in order tocompare the root-finding based and the contour integration methods, we implement several al-gorithms and the numerical inversion schemes. Various choices can be made regarding the findingof the roots, how to compute probabilities/moments from the PGF and which numerical integra-tion strategy is used. Also the form of the PGF can influence the speed and outcomes of thealgorithms. We describe the considered algorithms to obtain moments and probabilities in moredetail. Finally, we will compare the algorithms regarding computation time, accuracy and robust-ness towards e.g. different arrival distributions and compare the most promising algorithms inheavy-traffic scenarios.

4.1 Numerical inversion of PGFs

Several numerical inversion algorithms for probability transforms exist. We discuss two: onefor probabilities which can be found in [2] and one for moments which is described in [22].We present both algorithms that give estimations for probabilities and moments, starting withthe algorithm to obtain probabilities followed by the algorithm to obtain moments. In bothAlgorithm 2 and 3 a parameter γ is included, which, together with the parameter l ′ in Algorithm3, determine the parameter r. This parameter r influences the accuracy of the outcomes and incase of Algorithm 2 can be used to derive a bound on the estimation error for the probabilitiesthat are given by Algorithm 2. We show this bound at the end of this section.

Algorithm 2 Inversion of the probability generating function to obtain probabilities.1: Input X g(z), which probability to obtain, say k, and γ.2: if k = 0 then3: Compute p0 = X g(0).4: else5: Put r = 10−γ/(2k).6: Compute pk =

h

X g(r) + (−1)kX g(−r) + 2∑k−1

j=1 (−1) jRe[X g(r exp(πi j/k))]i

/(2krk).

7: Output pk.

21

Page 23: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Algorithm 3 Inversion of the probability generating function to obtain moments.1: Input X g(z), which moment(s) one wants to compute, say k is the maximum of those mo-

ments, γ and l ′.2: Define X (α, n, l) = n!/(2nl rnαn)·,

X g(r) + (−1)kX g(−r) + 2∑ln−1

j=1 (−1) jRe(X g(r exp(πi j/(lk)))exp(−πi j/l))�

,

where r = 10−γ/(2nl).3: Put l = α= 1.4: Compute m1 = X (α, 1, l).5: Put α= 1/m1.6: Compute m2 = X (α, 2, l).7: Put l = l ′ and α= 2m1/m2.8: Recompute m1 and m2: m1 = X (α, 1, l) and m2 = X (α, 2, l).9: for n≤ k do

10: Compute α= (n− 1)mn−2/mn−1.11: Compute mn = X (α, n, l).12: Put n= n+ 1.13: Output (m1, ..., mk).

These two algorithms can be used to obtain probabilities or moments from any PGF. For thekernel form representations ((2.2) and (2.9) for the FCTL queue and (2.17) and (2.14) for theBSQ) we do not need these methods, because we have an explicit expression for the PGF (interms of roots) and can use this to form a Taylor series if we have a CAS software package.Because algorithms based on Taylor series generally perform faster than Algorithms 2 and 3, weuse the Taylor series approach when we have an explicit expression in terms of roots for X g(z) orX b(z). In the contour integral representations we do not have such explicit expressions and oneoption is to use algorithms that do not need symbolic computations, like Algorithms 2 and 3. Analternative is the derivative approach described in Section 3.

We give a bound on the error made by Algorithm 2, taken from [2]. We can express theprobabilities pk in the following way (with Cr a circle of radius r, less than unit length): pk =

12πi

Cr

X g (w)wk+1 dz. Using this relation and elementary calculations together with a trapezoidal ap-

proximation of the contour integral [2] shows that the error made by the estimation is boundedby r2k/(1− r2k), where r is chosen as in Algorithm 2.

Unfortunately we are not aware of the existence of a similar bound for Algorithm 3.In Algorithm 2 we have to choose γ and in Algorithm 3 we have to choose both γ and l ′. In

Algorithm 2 we choose γ = 10 and in Algorithm 3 we choose γ = 11 and l ′ = 2 following therecommendations in [22]. Unless otherwise stated, we will use these values for γ and l.

4.2 Algorithms

We start with presenting two enumerations, one for root-finding based algorithms and one forcontour-integration based algorithms. An algorithm to obtain probabilities is made by pickingone choice from each bullet in the enumeration. We present them only for the FCTL queue andonly for probabilities. The BSQ requires a only very slight adaptation of these algorithms (onlythe form of the PGF changes), and moments for the FCTL queue and BSQ can be constructed inan almost identical way.

22

Page 24: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

The root-finding based or kernel algorithms result in the following enumeration, where twochoices need to be made: how to compute the roots and which representation of the PGF to use.

• The roots of zg − Y (z)c can be computed using: Algorithm 1; an exact solver; a numericsolver; or the exact expression (in terms of the Lambert W-function) for the roots in caseY is Poisson (see Theorem 2). Upon the choice of computing exact solutions, we can useapproximate values for the roots in any of the the steps following the root-finding.

• We can use representation (2.2) or (2.9) to obtain X g(z).

When we have obtained X g(z) we compute the Taylor series expansion

X kg(z) =

k∑

i=0

pizi . (4.1)

of X g(z) up to the degree k and extract the probabilities from pi . This way we obtain the proba-bilities of the queue length distribution from 0 up to k. Obviously, if one wants to obtain e.g. onlythe probability that the queue length is say k, a slight modification can be made. In this case wedirectly obtain the Taylor series coefficient of zk instead of obtaining all coefficients, which bringsa little computational advantage.

We present the contour integration based algorithm in a similar way as the root-finding basedalgorithms. Again we only present it for the FCTL queue in case we want to obtain probabilities,as the BSQ and obtaining moments are straightforward adjustments. Here we have three choicesto make

• We can use representation (3.1) or (3.5) to obtain X g(z).

• We can use many methods to perform the numerical integration method in Mathematica.We consider two methods: the "MultiPeriodic" method, using a Trapezoidal approach, seee.g. [54], and the "DoubleExponential" method, see e.g. [49].

• We can use the derivative approach to obtain probabilities as described in Section 3 orAlgorithm 2.

Due to the structure of the derivative approach, upon computing the probability of a queue lengthk, we also have all ingredients to determine any queue length lower than k, as is the case in theroot-finding based strategy when computing the whole Taylor series. This is not the case for thealgorithms that use the numerical inversion scheme based on Algorithm 2. We will elaboratefurther upon this difference in Section 5.1.

We consider two test cases, one where g = 5 and c = 10, and one where g = 18 and c = 50. Inboth cases the arrival rate in each slot is 3/10. We consider five different types of arrival processin both test cases: Poisson, geometric, negative binomial, binomial and hypergeometric. Basedon these two test cases we select two algorithms, one based on the representation with rootsand one based on the representation of the contour integral in order to compare the root-findingstrategies and the contour integration based methods. We select regarding computation timeand robustness towards different values of g, c and different arrival distributions. In AppendixA all computation times for the various algorithms are presented, where we compute P(X g = i)(P(X b = i) for the BSQ) for i = 0,1, ..., 20 and the first four moments X g (and X b for the BSQ).

23

Page 25: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

The root-finding based strategy using Algorithm 1 together with representation (2.2) seems tooutperform all other root-finding based algorithms for the FCTL queue, with one exception: if thearrival process is Poisson, then we should make use of the fact that we know the exact solutionsfor zg − Y (z)c = 0 (in terms of the Lambert W-function). Note that the classical expression of(2.2) does not lead to a computational disadvantage in general compared to (2.9), despite havingto solve the system of linear equations to use representation (2.2). This is probably because ofthe product term in (2.9). In the Taylor series expansion we have to compute derivatives and thederivatives of the product term in (2.9) are more complicated than the sum in (2.10).

In case of the contour integration algorithms the "best" algorithm is not as straightforward todetermine as in the root-finding based algorithm case. The computation times clearly indicatethat the "MultiPeriodic" method is to be preferred, but which representation and whether to usederivatives or numerical inversion schemes seems to depend on the problem characteristics. Wechoose to use representation (3.5) and derivatives to compute probabilities and moments. Wefurther elaborate upon the latter choice in Section 5.1.

For the BSQ the root-finding based representations of the PGF when using Algorithm 1 seemsto be optimal except if we have Poisson arrivals (the Lambert W-function solution is also heremore efficient). In the BSQ case the difference in performance between the two representations(2.14) and (2.17) is less present, as the derivatives of the product term in the BSQ are muchsimpler (which is a polynomial in z) than in the FCTL queue (which is a polynomial in Y (z)/z).As the product based PGF seems to be performing slightly better, we will use this representation insubsequent sections. For the contour integration strategies in the BSQ the same observations holdas for the FCTL queue, which means that the "best" algorithm depends on problem characteristics.We will use the "MultiPeriodic" method using derivatives to compute probabilities and momentsfrom representation (3.14).

4.3 Computation time and accuracy

To compare the algorithms chosen in Section 4.2 we study several cases. The algorithm forthe root-finding based method is using Algorithm 1 to obtain the roots and representation (2.2)((2.17) for the BSQ), whereas the contour integration based method is using the "MultiPeriodic"integration method and obtains probabilities and moments by computing derivatives of repre-sentation (3.5) ((3.14) for the BSQ). We do this for both the FCTL and the BSQ and calculateP(X g = i) and P(X b = i) for i = 0, 1, ..., 20, and the first four moments. We compare the compu-tation time of both algorithms and the results that the algorithms give on accuracy. We will firststudy this for general arrival process and subsequently discuss what the effects are when havingexplicit formulas for the roots (in case of Poisson arrivals) and for performance measure (in caseof the mean queue length).

4.3.1 General arrivals

We start with the FCTL queue. In Table 1 we see the computation time of the probabilities andmoments for the root-finding algorithm and in Table 2 for the contour integration method. Wetake three combinations of red and green times, namely g = 5 and c = 10; g = 18 and c = 50;and g = 70 and c = 200 and vary the arrival distribution. A * in Table 1 and 2 indicates thatthe algorithm for that specific setting did not complete within 100 seconds and we aborted theevaluation. We also did the computations, using the same input parameters, for the BSQ. Theresults for the BSQ can be found in Appendix B, Tables 22 and 23. Note that we do not include

24

Page 26: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

the arrival intensity of 4/10 for the cases with g = 18 and g = 70, because these cases wouldviolate the stability condition.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.23 0.20 0.22 0.41 0.03

0.21 0.19 0.20 0.39 0.03g = 18, c = 50 0.28 0.26 0.29 0.31 0.37

0.29 0.28 0.29 0.30 0.33g = 70, c = 200 1.67 1.64 1.83 1.94 3.57

1.73 1.71 1.70 2.04 3.57

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.27 0.19 0.21 0.49 0.03

0.22 0.20 0.21 0.46 0.03g = 18, c = 50 0.25 0.23 0.25 0.27 0.28

0.25 0.23 0.22 0.25 0.27g = 70, c = 200 3.17 1.87 3.17 3.34 6.35

3.20 1.92 3.07 3.32 6.40

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.25 0.19 0.22 0.54 0.10

0.25 0.19 0.21 0.52 0.10

Table 1: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the root-finding based algorithm with a working precision of 80 digits.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 4.08 2.74 4.02 2.74 2.56

0.31 0.25 1.45 0.33 0.13g = 18, c = 50 4.39 3.24 3.30 16.4 2.96

0.46 0.56 0.62 12.9 0.25g = 70, c = 200 4.84 4.61 4.85 * 3.79

0.87 1.93 2.23 * 0.65

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 4.17 3.67 4.00 2.92 2.71

0.43 0.25 1.67 0.47 0.23g = 18, c = 50 4.42 3.76 3.43 15.7 2.78

0.46 0.55 0.63 12.8 0.25g = 70, c = 200 5.91 6.68 6.19 * 3.28

0.81 2.19 2.35 * 0.47

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 4.09 3.13 3.82 2.84 3.03

0.39 0.23 1.47 0.47 0.24

Table 2: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the contour integration based algorithm with a working precision of 80digits and a precision goal of 20 digits.

In general we see that the root-finding based algorithm is better regarding computation time.In some settings, the contour integration strategy performs a little better, but differences in thesecases are minor. These cases are typically the computation of the first four moments of the queuelength distribution. This phenomenon has its origin in the root-finding algorithm, as we have to

25

Page 27: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

find the roots, which can be, certainly in systems with large g and c, computationally expensive,as we show in Figure 6. Another case where the contour integral strategy is performing very well,is when g and c are increasing. The root-finding algorithms suffer more from increasing g and cthan the contour integration does (at least for several arrival distributions (see e.g. the Poissondistribution), but not all (see the binomial example)).

In Figure 6 we clearly see that the main part of the computational time in the roots-basedstrategies is not in determining the individual probabilities from the PGF. Once you have the roots,you can easily expand the probability generating function and find probabilities and moments atlow cost as long as those probabilities are not too far in the tail of X g or X b. This is also the causeof the only slight difference between the computation times in Table 1 between the finding of theprobabilities and the moments. This is in contrast with the contour integration based strategy,where there are considerable differences between the computation times of the probabilities andthe moments. In the contour integration based method we do not see a costly initialization as thefinding of the roots in the roots-based representations.

Derivatives

Roots

5 10 15 20k

1

2

3

4

5

Computation time

Figure 6: computation time to obtain all P(X g = i) for i ≤ k in case g = 70, c = 200 and Poissonarrivals with intensity 3/10 using the roots-based representation (2.2) and Algorithm 1 and thederivative approach using the contour integral representation (3.1).

Generally, the root-finding based strategy is preferable above the contour integration algo-rithm based on the experiments shown above regarding robustness to different settings. Theroot-finding method using Algorithm 1 is very robust with respect to the arrival distribution andany of the input parameters we considered (and is the only algorithm that is robust to all settingsamongst all algorithms we considered). The contour integration based algorithm can be a littlefaster in settings where e.g. the root-finding takes a long time or when only a few characteristicsof the queue length distribution have to be found. However, the contour integration takes indifferent settings a big amount of computation time more than the root-finding based algorithm,so this method is not robust to all settings.

For the cases with g = 5 and c = 10 we get exact results for both the FCTL queue and theBSQ (in terms of the Lambert W-function for Poisson arrivals and in terms of the Roots function inMathematica for the other cases) within the abortion time. For these cases, we can compute theperformance measures at arbitrary precision and compare the approximative methods with the

26

Page 28: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

exact solution. If we do so, we see that the roots-based algorithms all agree with the exact resultsfor as many digits as are returned in the roots-based algorithms. This means that all significantdigits given back by methods computing the roots approximatively, agree with the exact solution.For the contour integration based algorithms this is not the case, as we compute the contourintegral numerically, resulting in round-off errors. We see that the derivative approach generallygives results that are accurate up to at least 20 significant digits for the probabilities and momentsthat we calculate in the cases with g = 5 and c = 10. We obtain this accuracy with a precisiongoal of 20 digits for the integral. Upon choosing a higher precision goal, the results are moreaccurate.

When the values of g and c are higher, we do not obtain exact results anymore within theabortion time. However, we are able to compare the various methods we consider and due tothe very accurate results in the case g = 5 and c = 10 when approximating the roots, we thinkthat we have a good reference. Upon comparing all approximative roots-based strategies, wesee that they agree up to all significant digits that are provided. Comparing those strategieswith the derivative approach using the contour integral, for all arrival processes we see that theroots-based strategies and the derivative approach with contour integration agree upon at least20 significant digits.

Similar conclusions can be drawn for the BSQ. The results, as indicated before, can be seenin Table 22 and 23 in Appendix B. All conclusions drawn in the FCTL queue can also be drawn inthe BSQ.

4.3.2 Poisson arrivals

The root-finding based algorithm with roots found by Algorithm 1 is suboptimal regarding com-putation time in the Poisson arrival case, as we know the exact solution for the roots (in terms ofthe Lambert W-function, see Theorem 2). For this reason, we study this case separately using theLambert W-solutions. We make use of representation (2.2) and, after obtaining the roots exactlyin terms of the Lambert W-function, directly take numerical values for the roots. In the samecases as in Table 1 and 2, we get the results shown in Table 3. For the computation times in theBSQ we refer to Appendix B, Table 24

Arrival distribution Pois(1/10) Pois(3/10) Pois(4/10)g = 5, c = 10 0.04 0.04 0.04

0.03 0.03 0.03g = 18, c = 50 0.12 0.12 -

0.06 0.06 -g = 70, c = 200 1.43 1.47 -

0.18 0.17 -

Table 3: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using (2.2) and numerical values for the exact Lambert W-function solutions,with a working precision of 80 digits.

In Table 3 we clearly see that if we have an expression for the exact roots we should usethem. The computation time drops for higher values of g in comparison with the approach usingAlgorithm 1, which once more shows that this step is relatively expensive, computationally seen.

27

Page 29: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Because we want to present the algorithms as general as possible, we will not focus anymoreon the approach using the Lambert W-function solution, as it only functions in case of Poissonarrivals, but we will keep in mind that if we have knowledge about the exact value of the roots,we should use it.

In Appendix B, Table 24 we see that also for the BSQ a computational advantage is presentwhen using the Lambert W-solutions, if we compare the results of Table 24 with those of Table22.

4.3.3 Explicit performance measures

Another computational advantage can be found when using explicit formulaes for e.g. the meanqueue length (see e.g. (2.6) for the FCTL queue and (2.18) for the BSQ). Using this expression,we do not have to compute the entire PGF and invert it, yielding a (very small) computationaladvantage compared to Table 1. We show the computation times for obtaining the mean queuelength in Table 4, where we use expression (2.6) and Algorithm 1 to obtain the roots for theFCTL queue. We compare this method with the derivative approach using the contour integralexpression. A * in Table 4 indicates that the computation time was more than 100 seconds andthat we aborted the evaluation. We have also studied this in for the BSQ, see Appendix B, Table25.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.22 0.08 1.37 0.23 0.04

0.17 0.12 0.16 0.32 0.02g = 18, c = 50 0.28 0.39 0.46 12.7 0.05

0.24 0.20 0.20 0.22 0.28g = 70, c = 200 0.72 1.76 1.96 * 0.29

1.37 1.23 1.33 1.56 3.08

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.22 0.07 1.35 0.29 0.04

0.18 0.13 0.16 0.41 0.02g = 18, c = 50 0.30 0.41 0.51 14.6 0.05

0.19 0.14 0.15 0.19 0.22g = 70, c = 200 0.58 1.82 2.07 * 0.26

2.68 1.51 2.67 2.87 5.83

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.21 0.07 1.34 0.35 0.04

0.19 0.14 0.16 0.45 0.08

Table 4: absolute running times FCTL queue (in seconds) to calculate the mean queue lengthusing the derivative approach with contour integral representation (3.5) (first number in eachcell) with a working precision of 40 digits and a precision goal of 10 digits and expression (2.13)(second number in each cell) with a working precision of 40 digits.

In Table 4 we see that the expression with roots (2.6) is very efficient when we want toobtain the mean queue length. However, the derivative approach with the contour integrationis computationally attractive, because there is no need to determine the roots. As we see, thecontour integration strategy is on various occasions faster than using the explicit expression interms of the roots, but there are also cases where the contour integral is prohibitive. In general,when computing the mean queue length one should use the expression based on the roots andcompute the roots using Algorithm 1.

28

Page 30: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

In Appendix B Table 25 we see that similar conclusions holds for the BSQ.

4.3.4 Implementation in R

We make a little sidestep. As indicated before, we implemented the algorithms in Mathematica,but we also have an implementation in R. Although R is not a CAS (and therefore is not able tofind a Taylor series), we are able to use Algorithm 2 to obtain a Taylor series of Y (z)c , becauseY (z)c is a PGF. This implies that we can efficiently find roots of zg−Y (z)c with the aid of standardfunctions in R using Algorithm 1.

One complication that we were not able to solve yet is that R has limitations regarding themaximum working precision. There is a package (Rmpfr) that is turning R into APA software,but it does not align with some of functions that we use, so we are stuck with the maximumworking precision in R. This results in a slight modification of Algorithm 1, as we adjust the orderof the Taylor series expansion from max{100,50+max{g, c}} to 2g. The latter case is sufficientto obtain good results for the cases we consider, whereas the first gives sometimes more rootswithin the unit circle than there are (these extra roots are due to working at a too low precision).In Mathematica this would also be a problem if we would be working with the standard precision,but in Mathematica we are able to increase the accuracy. So, with the slightly adjusted Algorithm1 and numerical inversion schemes 2 and 3 (both with l = 2 and γ= 20) we generate Table 5. A** indicates that essentially all results obtained are unreliable or no results were obtained at all.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.03 0.05 0.03 0.03 0.05

0.03 0.03 0.03 0.03 0.05g = 18, c = 50 0.03 0.03 0.06 0.05 0.05

** ** ** ** **g = 70, c = 200 ** ** ** ** **

** ** ** ** **

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.04 0.04 0.04 0.04 0.04

0.03 0.03 0.03 0.03 0.04g = 18, c = 50 0.05 0.02 0.03 0.03 0.03

0.04 0.04 0.04 0.04 0.04g = 70, c = 200 ** ** ** ** **

0.06 0.06 0.06 0.08 0.06

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.04 0.04 0.04 0.04 0.04

0.03 0.03 0.03 0.03 0.03

Table 5: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using representation (2.9) for the implementation in R.

Accuracy and working precision are the main drawbacks of working with R in the respect ofthe FCTL queue. Typically, probabilities only agree up to 8 or 9 decimals with the exact values(in terms of the Lambert W-function for Poisson arrivals and in terms of the Roots function inMathematica for the other cases when g = 5) or approximative values found using Algorithm 1in Mathematica to find the roots (for the cases with g = 18 and g = 70). In many cases we aretherefore obtaining e.g. negative probabilities when P(X g = i) is of the order 10−10 or lower.Also the moments only agree upon at most a similar number of decimals. Not all ** are due

29

Page 31: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

to R, because Algorithm 3 attempts to compute X g(z) well outside of the unit circle (when themean queue length is very low). This problem is similar in spirit to some problems we will see inSection 5.1. One way of solving this problem, is increasing γ, but R is not able to handle thosehigher precisions.

Regarding computation time and when accuracy is not an issue, R seems to outperform Math-ematica. One reason for this might be that R is working with a (far) lower precision than Math-ematica is. But, when performing the calculations with the default working precision in Mathe-matica, the same adjustment to Algorithm 1 as we use in R and using a Taylor series expansionto obtain probabilities, we see that Mathematica tends to have a slightly longer computation timethan R has.

Summarizing, R can be used when obtaining very accurate results or when very precise inter-mediate steps are not needed (errors up to 10−8 are allowed). If one wants to use R, we see thatcomputation times are quite low in comparison with Mathematica.

4.4 Heavy-traffic scenarios

Heavy-traffic scenarios are typically difficult to deal with, as one needs high precision to get anaccurate result for queue length probabilities or moments, e.g. because roots of zg − Y (z)c tendto cluster and are therefore more difficult to distinguish. This can be seen in Figure 7 and 8. InFigure 7 and 8 the roots are shown where g = 50 and c = 100 for Poisson arrivals and geometricarrivals respectively. The roots in the heavy-traffic scenarios (Y ′(1)g/c = 0.99998) are blue,whereas the light-traffic (Y ′(1)g/c = 0.2) are red. We see that in the heavy-traffic case mainlythe roots with a negative real part and small imaginary part are close to each other. Obviously, theroots in light-traffic are much farther apart. Because the roots are much closer to each other inheavy-traffic (and relatively high g and c), we investigate these scenarios separately. For example,finding the roots might be more difficult in heavy-traffic than in light-traffic, because of this trendof clustering of the roots. Both the working precision and the order of the Taylor approximationin Algorithm 1 will have to be increased in order to ensure that the roots have the correct values.

30

Page 32: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

●●

●● ● ●

●●

●●

●● ● ●

●●

●●●●●●●●●●●●●●● ● ● ● ● ● ● ●

●●

●●●●●●●●●●●●●●● ● ● ● ● ● ● ●

●●

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0

Im

Figure 7: roots within the unit circle ofthe equation z50 − Y (z)100 where Y (z) isthe PGF of a Poisson random variable withmean 1/10 (red) and mean 49999/100000(blue).

●●

●● ● ● ●

●●

●●

●● ● ● ●

●●

●●●●●●●●●●●●

●●

● ● ● ● ● ● ●●

●●●●●●●●●●●●

●●

● ● ● ● ● ● ●●

-1.0 -0.5 0.5 1.0Re

-1.0

-0.5

0.5

1.0

Im

Figure 8: roots within the unit circle of theequation z50 − Y (z)100 where Y (z) is thePGF of a geometric random variable withmean 1/10 (red) and mean 49999/100000(blue).

The set-up of the remaining part of this section is very similar to that of Section 4.3 and westudy cases where g = 5 and c = 10; g = 25 and c = 50; and g = 100 and c = 200. Theload in all cases is Y ′(1)g/c = 0.99998. Again we study five different arrival distributions (theones we also considered in Section 4.3) and again want to obtain the first four moments of thequeue length distribution. Because larger queue lengths are more likely to occur, we increase thenumber of probabilities we calculate: P(X g = i) for i = 0, 1, ..., 40. We consider again the twoalgorithms found to be best in Section 4.2. In the roots-based strategy using Algorithm 1 andrepresentation (2.2), we choose a working precision of 110 digits (to which the first half of Table6 is devoted), whereas for the contour integration based algorithm using the derivative approachand representation (3.5) we choose a working precision of 50 digits and a precision goal of 20digits (to which the second half of Table 6 is devoted). A * in Table 6 means that the computationin that specific setting did not complete within 300 seconds.

31

Page 33: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Arrival distribution Pois( 49999100000

) Geo(100000149999

) NBinom(10, 10000001049999

) Binom(20, 499992000000

) Hypergeo(5, 49999, 50000)g = 5, c = 10 0.32 0.23 0.26 0.58 0.25

0.28 0.25 0.25 0.56 0.17g = 25, c = 50 0.29 0.26 0.35 0.31 0.92

0.29 0.26 0.27 0.31 0.76g = 100, c = 200 4.41 2.97 4.77 4.65 17.2

4.32 2.91 4.22 4.63 16.8

g = 5, c = 10 259 * 125 117 1354.69 * 12.0 4.69 4.98

g = 25, c = 50 258 * 137 144 1435.14 * 11.6 22.2 5.9

g = 100, c = 200 261 135 * * 1405.31 10.6 * * 8.06

Table 6: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, 1, ..., 40(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution. The first half of the table are computation times based on the root-findingstrategy with a working precision of 110 digits. The second half uses contour integration with aworking precision of 50 digits and a precision goal of 20 digits.

In Table 6 we see that the root-finding strategy, using Algorithm 1 performs very well andgenerally better than the contour integration based algorithm we consider. Upon choosing a highenough working precision, no problems occur in these two algorithms (although it slows downthe computation). As both algorithms agree up to many digits, accuracy does not seem to be aproblem if the working precision is high enough.

Similar observations can be made for the BSQ in this setting, for the computation times seeAppendix C Table 26.

5 Advanced analysis

In this section we consider more advanced properties of the queue length distribution X g(z) (orX b(z)). We start with the choice between differentiating X g(z) using (3.13) for probabilities or(3.7) for moments or numerical inversion as in [2] for probabilities or [22] for moments. Westudy the delay distribution for the FCTL queue, obtained by [52]. To close this section, weconsider the tail probabilities for the queue length distribution.

5.1 Differentiation versus transform inversion

We start with inspecting Algorithm 2 and 3 and subsequently compare those algorithms withthe derivative approach used until now to obtain probabilities and moments from the contourintegral representations of X g and X b.

A quick look on Algorithms 2 tells us that the way the algorithm is set up, we obtain individualprobabilities and are not able to reuse computations for obtaining other probabilities, contrastingwith the derivative approach where we can reuse obtained results. Algorithm 3 works in a differ-ent way. If we want to compute the k-th moment we start from the first moment and continue upto moment k, calculating the moments in an iterative manner. Therefore we obtain all momentsup to the k-th at once when running Algorithm 3.

The specific algorithm we consider in Table 7 is based on the numerical inversion Algorithms2 (for probabilities) and 3 (for moments). We use representation (3.5) for X g(z) (and (3.16) for

32

Page 34: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

X b(z)). We study the same cases as in Section 4.3, leading to the computation times in Table7. A * indicates that the algorithm did not complete within 100 seconds, whereas a ** indicatesthat Algorithm 3 did not complete, because the algorithm tried to compute X g(z) outside thevalidity rage of (3.5) which resulted in e.g. overflow errors or memory allocation problems (whichoccurred in some light traffic situations). The latter could be resolved by taking a (much) largervalue of γ in Algorithm 3. The *** indicates that the result that was obtained was not accurate,but upon increasing γ in Algorithm 3, we obtained good results with a negligible difference incomputation time.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 3.10 3.98 4.19 2.84 3.71

0.90 1.14 2.05 0.89 0.85***g = 18, c = 50 4.83 4.72 4.83 17.4 5.78

** ** ** ** **g = 70, c = 200 5.2 5.93 6.12 * 9.85

** ** ** ** *

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 4.57 3.98 5.53 4.39 4.15

1.44 1.21 2.63 1.53 1.03g = 18, c = 50 4.60 4.58 5.36 17.7 5.75

1.46 1.65 1.76 13.8 1.52g = 70, c = 200 5.07 5.95 6.35 * 5.54

1.90 3.30 3.50 * 1.89

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 4.62 4.21 5.58 4.29 6.24

1.48 1.30 2.53 1.52 1.74

Table 7: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the contour integration based algorithm with a working precision of 80digits and a precision goal of 20 digits.

Upon comparison of Table 7 with Table 2 we see that both algorithms are comparable (ifAlgorithm 3 finishes) with respect to computation time although the derivative approach seemsto be slightly faster. In some cases the numerical inversion method is faster, but in other cases thederivative approach is the one to be preferred. In the BSQ there is a stronger incentive towardsthe derivative approach, as can be observed when comparing Table 23 (Appendix B) and 27(Appendix D). This is probably due to the derivatives of the integrand being easier in the BSQcase as compared to the FCTL queue.

We note that the numerical inversion schemes for probabilities and moments are less accuratethan the other methods, both for the FCTL queue and the BSQ. In the cases where we are ableto obtain exact results (in terms of the Lambert W-function for Poisson arrivals and in terms ofthe Roots function in Mathematica for the other cases, when g = 5 and c = 10) we clearly see anaccuracy that is worse than any of the other methods we consider. The accuracy is good up to γdigits, where we have put γ = 10 for the probabilities and γ = 11 for the moments as suggestedby [22]. Upon choosing higher values for γ the results tend to be more accurate. There is onecase in Table 7 (g = 5, c = 10 and hypergeometric arrivals with mean arrival rate 1/10) wherewe did not obtain accurate results for the moments. Also in this case, increasing γ is sufficient toobtain more accurate results.

Also for the cases where we are not able to obtain exact results, we see that the difference

33

Page 35: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

between the roots-based strategies and the derivative approach is much smaller than between theroots-based strategies and the numerical inversion methods. The results for higher g and c arecomparable with the conclusions in the case g = 5 and c = 10.

Obtaining individual probabilities for the queue length distribution might influence the choiceof the algorithm, as Algorithm 2 is set up to individual probabilities, whereas in the other algo-rithms upon obtaining a probability k we can compute all queue length probabilities less thank. Therefore, we make slight changes in the algorithms to obtain one single probability. In thederivative approach and the numerical inversion methods using the contour integral we simplyrestrict ourself to computing one single probability, instead of all.

We compare both methods of inversion using the contour integral representation (3.5) in thecase where we use derivatives for inversion and (3.1) for the numerical inversion using Algorithm2 in the case where we obtain single probabilities. We consider two cases, one with g = 5 andc = 10 and one with g = 18 and c = 50, and in both cases the arrival rate is 3/10.

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0

2.5

3.0

3.5

Computation time

Figure 9: comparison of the derivative andnumerical inversion approach for obtainingP(X g = i), i = 0, ..., 20 (horizontal axis)with g = 5 and c = 10 regarding compu-tation time with a working precision of 80digits and a precision goal of 20 digits forPoisson arrivals.

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0

2.5

3.0

3.5

Computation time

Figure 10: comparison of the derivative andnumerical inversion approach for obtainingP(X g = i), i = 0, ..., 20 (horizontal axis)with g = 18 and c = 50 regarding compu-tation time with a working precision of 80digits and a precision goal of 20 digits forPoisson arrivals.

In Figures 9 and 10 we see that the numerical inversion method using Algorithm 2 computesindividual probabilities more efficiently than the approach using the derivatives. In the numericalinversion method we only have to compute a linear number of terms, whereas in the derivativeapproach, only determining the derivative requires a rapidly exploding number of computations.

Figures supporting this conclusion in case of a geometric arrival process can be found in Ap-pendix D, Figures 28 and 29. Also in the BSQ similar observations can be made, see Appendix D,Figures 30 and 31, although the increase in computation time in case of the derivative approachis much less prominent. This is probably due to the easier derivatives present in the BSQ incomparison with the FCTL queue.

34

Page 36: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

5.2 Delay distribution

The delay distribution for the FCTL queue is derived in [52] and is entirely expressed in terms ofX g(z) and directly related terms. The delay is defined as the number of slots an arriving vehiclehas to wait beginning from the first slot after the slot the vehicle arrived in, until the end of theslot in which the vehicle departs (this definition is the same as in [52]). In this section we focusonto the delay in the last green period of each cycle and we do this for the FCTL queue only, asthe BSQ does not have a similar type of delay.

We start with obtaining the PGF of the delay distribution for the FCTL queue and we do sofor the final green period Dg(z). Therefore, we recall (2.2) and (2.4). As Dg(z) is quite involved,we first introduce some definitions and results from [52].

Let X g−1(z) be the PGF of the queue length distribution at the end of slot g − 1, where theg-th slot is the final green slot. From [52] we obtain the expression

X g−1(z) = X g(z)Y (z)c−g(Y (z)z−1)g−1+ (1− Y (z)z−1)

g−2∑

i=0

qi(Y (z)z−1)g−2−i . (5.1)

We define Ug as the number of vehicles that depart before an arbitrary vehicle arriving in slot gcounted from the beginning of the green period and given that the vehicle is delayed. Following[52] we get

Ug(z) =X g−1(z)− qg−1

1− qg−1

1− Y (z)(1− z)Y ′(1)

zg−1. (5.2)

Now we are ready to find the PGF of the delay in last green slot Dg(z) and this PGF is given by

Dg(zg) = qg−1+ (1− qg−1)

z−(g−1)g

g

g−1∑

t=0

Ug(atzc)

1− (z−r a−t)g

1− z−r a−t , (5.3)

where a = exp(2πi/g).Another possibility to obtain the delay distribution is described in [6]. This method uses

the fact that the delay in a certain time-slot can be expressed in terms of the queue length justbefore that slot. At the expense of carefully taking into account the interrupted service duringthe red periods, we obtain a simpler expression than (5.3) from which we can obtain the delaydistribution. This expression reads

Dg(z) = qg−1+ (X g−1(z)− qg−1)1− Y (z)(1− z)Y ′(1)

, (5.4)

where X g−1(z) is defined in (5.1) and where we distinguish between Dg and Dg , as we need totake the red periods into account if we use expression Dg , whereas this is not the case when usingexpression Dg .

The intuition behind Dg(z) and Dg(z) is that both count the number of vehicles that are infront of a car that is arriving during slot g. Dg(z) immediately takes the red periods into account,whereas Dg(z) does not.

We describe how to take the service interruptions into account for the last green period inorder to use Dg(z). If we consider P(Dg = k) for some k, then we determine i := k mod c. Weassume that a cycle starts with green, so the slots numbered 1, ..., g are green slots and slots fromg + 1, ..., c are red slots. Therefore, if g + 1≤ k ≤ c, then

P(Dg = k) = 0. (5.5)

35

Page 37: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Otherwise we obtain the probability from Dg by

P(Dg = k) = P�

Dg = gbk/cc+ (k/c− bk/cc)c− c+ g�

. (5.6)

Hence, we can obtain the delay distribution both from Dg(z) and from Dg(z).Also moments can be obtained from both PGFs. For Dg(z) we can use the standard approach

by taking derivatives and evaluating those at z = 1, but for Dg(z) this is a little more complicated.We use the probabilities that we obtain from Dg(z) (say from 0 up to M) and determine the k-thmoment in the following way

E[Dkg] =

M∑

i=0

P(Dg = i)ik. (5.7)

Using (5.7) we will always underestimate the moment we compute, but upon choosing M highenough we will get a good estimation.

We will compare Dg(z) and Dg(z) in computation time when we calculate probabilities and mo-ments. In order to obtain any of the two transforms we need X g(z). One could use any methoddescribed. We choose to use the algorithm based on representation (2.2) and we find the rootsusing Algorithm 1. We obtain P(Dg = i) for i = 0, ..., 300 and calculate the first four moments,where in the case of using Dg(z) we choose M = 300. The largest probability that we do notinclude in determining (5.7) because of this choice, is of the order 10−8, which does not severelyimpact the mean delay. In Table 8 we see the computation times based on Dg(z), whereas in Table9 we see computation times based on Dg(z), where in Table 8 and 9 a * indicates a computationtime of more than 100 seconds (and we aborted the evaluation for these cases).

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 33.2 20.8 22.4 28.6 *

0.47 0.35 0.45 0.66 0.92g = 18, c = 50 * * * * *

1.10 1.04 1.17 1.26 18.3g = 70, c = 200 * * * * *

7.58 10.0 11.6 11.7 *

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 34.1 20.7 24.3 32.3 *

0.52 0.39 0.48 0.83 0.98g = 18, c = 50 * * * * *

1.29 1.24 1.33 1.46 17.5g = 70, c = 200 * * * * *

9.17 10.3 12.8 13.2 *

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 33.8 20.6 23.7 29.6 *

0.50 0.37 0.47 0.76 1.10

Table 8: absolute running times (in seconds) to calculate P(Dg = i) for i = 0, 1, ..., 300 (first num-ber in each cell) and the first 4 moments (second number in each cell) of the delay distributionusing Dg(z) with a working precision of 250 digits.

36

Page 38: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.78 0.51 0.64 0.98 0.79

1.66 1.12 1.25 1.63 2.71g = 18, c = 50 1.04 0.84 1.24 3.30 3.98

1.94 1.47 2.00 4.97 13.3g = 70, c = 200 4.87 5.03 20.4 * 73.7

5.93 5.91 25.3 * *

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.77 0.54 0.65 1.08 0.64

1.71 1.15 1.32 1.75 2.10g = 18, c = 50 1.04 0.88 1.23 3.46 3.35

2.02 1.50 2.10 5.34 10.6g = 70, c = 200 6.49 5.32 22.2 * 65.0

7.39 6.17 26.7 * 84.3

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.78 0.52 0.66 1.11 0.99

1.70 1.14 1.29 1.78 3.42

Table 9: absolute running times (in seconds) to calculate P(Dg = i) for i = 0, 1, ..., 300 (first num-ber in each cell) and the first 4 moments (second number in each cell) of the delay distributionusing Dg(z) with a working precision of 250 digits.

In Tables 8 and 9 we see that obtaining many probabilities for the delay distribution is moreefficiently done by the method based on Dg . The expression for Dg(z) is more complicated thanthe expression for Dg(z), and therefore, although we need to take the red periods into accountseparately for Dg , obtaining probabilities using Dg(z) is more efficient. We see that higher valuesof g and c rapidly increase the computation time for obtaining probabilities when we use Dg(z).This is due to the sum term over t in Dg(z), which results in many terms in e.g. the Taylorexpansion.

Dg(z) is not readily adapt for obtaining moments for the delay distribution, which is why weuse the approach described by (5.7). This means that we need to compute M = 300 probabilitiesbefore we are able to obtain an estimation of the delay. Dg(z) can directly be used and we see inTable 8 and 9 that the algorithm based on Dg(z) in general has a better computation time thanthe algorithm based on Dg(z), due to the high initial cost of obtaining those M probabilities. Oncewe have those probabilities, we can easily obtain many more moments using the approach withDg(z) (as long as the loss in precision due to neglecting P(Dg ≥ M) is not significant, otherwisewe should increase M leading to higher computation times), whereas in the algorithm based onDg(z) we will need more time to compute an additional term in the Taylor series of Dg(z).

5.3 Tail distribution

Tail probabilities are typically small and require a lot of computations. Upon computing P(X g = k)in the contour integration method with derivatives, we need to compute (a.o.) the k-th derivativeof the X g(z). For large k this is easily seen to be prohibitive. Also for the other algorithmsrelatively long computations are needed, because either we have to make a large Taylor series (inthe roots-based algorithms) or compute relatively many different values of X g(z) around zero (inthe numerical inversion algorithms).

In this section we use algorithms to obtain individual probabilities. In the roots-based algo-rithms we change from computing the Taylor series and obtain all coefficients of the Taylor series

37

Page 39: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

to obtain one single coefficient of the Taylor series. For the other algorithm based on contourintegration we use the same methods as described in Section 5.1.

In Table 10 and 11 we accordingly calculate each probability separately, with a maximumcomputation time of 100 seconds (a * indicates that this computation was exceeded and thecalculation was aborted). We consider the same two cases as in Section 4.2, where the arrivalintensity is 3/10. In one case we choose g = 5 and c = 10, whereas in the other case we chooseg = 18 and c = 50. Note that we include two different algorithms in Tables 10 and 11. Thefirst number in each cell of Tables 10 and 11 represents the root-finding based method usingrepresentation (2.2) and Algorithm 1 to find the roots; whereas the second number in each cellrepresents a numerical inversion scheme using Algorithm 2 and representation (3.1).

Arrival distribution P(X g = 50) P(X g = 100) P(X g = 150) P(X g = 200)Pois(3/10) 0.55 0.79 0.98 1.26

11.7 23.9 36.0 45.1Geo(10/13) 0.31 0.52 0.75 1.05

9.99 27.0 41.5 55.1NBinom(10,100/103) 0.45 0.69 0.79 1.18

12.0 22.6 31.8 40.0Binom(20,3/200) 0.97 0.89 1.06 0.97

10.6 20.2 29.0 37.1Hypergeo(5,3, 50) 0.09 0.23 0.46 0.78

11.0 22.6 32.2 41.6

Table 10: absolute running times FCTL queue (in seconds) to calculate P(X g = i) as indicatedin the column for g = 5 and c = 10 using the root-finding based algorithm (first cell in eachrow) with a working precision of 200 digits and the contour integration based algorithm withnumerical inversion (second number in each cell) with a working precision of 150 and precisiongoal of 60 digits.

Arrival distribution P(X g = 50) P(X g = 100) P(X g = 150) P(X g = 200)Pois(3/10) 0.97 1.77 2.20 3.21

20.9 45.0 65.8 84.0Geo(10/13) 0.76 1.69 2.12 2.99

18.7 39.3 77.2 *NBinom(10,100/103) 0.87 1.76 2.09 3.26

19.9 43.1 63.1 79.0Binom(20,3/200) 0.79 1.13 1.24 1.40

31.2 53.2 71.3 88.4Hypergeo(5,3, 50) 0.64 1.41 1.99 3.43

13.8 45.4 65.6 81.3

Table 11: absolute running times FCTL queue (in seconds) to calculate P(X g = i) as indicatedin the column for g = 18 and c = 50 using the root-finding based algorithm (first cell in eachrow) with a working precision of 200 digits and the contour integration based algorithm withnumerical inversion (second number in each cell) with a working precision of 150 and precisiongoal of 60 digits.

38

Page 40: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

When comparing the root-finding based algorithm and the numerical inversion method, weclearly see that the root-finding based algorithm is to be preferred above the numerical inversionscheme regarding computation time. The probabilities calculated by the two methods agree witheach other for at least 20 significant digits for all distributions, so accuracy does not seem to be aproblem.

We also investigated a third algorithm, based on taking derivatives and representation (3.5),but we did not include it in both tables, as in none of the cases, the algorithm finished withinthe abortion time of 100 seconds. We conclude that the derivative approach using the contourintegral is prohibitive if we want to obtain one single tail probability. However, upon obtaining atail probability k using the derivative approach, we have all ingredients to obtain all queue lengthprobabilities less than k.

For the BSQ similar observations can be made (see Appendix E, Tables 28 and 29 for thecomputation times) both regarding computation time and accuracy.

6 Extensions and generalizations

Several extensions and generalizations of the FCTL queue and BSQ are possible. A generalizationof both queues can be found in [42], but there only the mean is computed. We will prove a con-tour integral expression for this generalization exploiting the developed contour integration forthe FCTL queue in [6] to obtain full PGFs. We will show several models which can be representedusing this contour integral form, among which are BSQs with a random number of vehicles de-parting each cycle [31] and vehicle cancellation and holding strategies [45]; and random greentimes in the FCTL queue. We will also show two numerical examples.

6.1 Integral representation for generalizations of the FCTL queue and BSQ

We now turn to the generalized expression and obtain a contour integral representation for it.Denote the PGF of the generalized model as X (w). We start with introducing the assumptionsunder which we will work in this section and thereafter present the theorem.

Assumption 5 Assume that we can write a function X (z) with X (1) = 1 in the following form:

X (z) =

∑g−1k=0 xkzkB(z)g−1−k

zg − A(z)f (z), (6.1)

where B(z) and A(z) are PGFs and f (z) is a function satisfying f (1) = 0, f (zl) 6= 0, where zl 6= 1are the roots of zg − A(z) inside the unit disk. Assume moreover that B′(1) < 1; A′(1) < g; that forsome δ > 0 the functions A(z) and B(z) are analytic within the disk |w| < 1+ δ; X (z) is analyticinside the unit disk and continuous up to the unit circle; and that t0 > 1, where t0 = sup{t ∈R+|B′(t)t − B(t)≤ 0}.

Theorem 6 (Pollaczek integral for a generalization of FCTL and BSQ) Under Assumption 5there exists an ε0 > 0 such that for all ε ∈ (0,ε0)

X (z) = exp

1

2πi

|w|=1+εln�

zB(w)−wB(z)B(w)−w

(wg − A(w))′

wg − A(w)dw

!

1− B′(1)z− B(z)

f (z)f ′(1)

, (6.2)

for all |z|< 1+ ε, with principal value of the logarithm.

39

Page 41: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Proof. Starting from (6.1) and, using a reasoning similar to [6], upon rewriting, using the rootsof zg − A(z) within the unit circle, naming them z1, ..., zg−1, and using X (1) = 1, we arrive at

X (z) =(g − A′(1))zg − A(z)

f (z)f ′(1)

g−1∏

k=1

B(z)zk − zB(zk)B(zk)− zk

. (6.3)

Recalling (2.9) and slightly rewriting it, we have

X g(z) =g − A′(1)zg − A(z)

z− Y (z)1− Y ′(1)

g−1∏

k=1

Y (z)zk − zY (zk)Y (zk)− zk

. (6.4)

Upon noting that B(z) = Y (z), A(z) = Y (z)c and f (z) = z−Y (z) (cf. [42]), we see that (6.4) and(6.3) are the same. Using this, we see that we can express X (z) in X g(z)

X (z) = X g(z)1− B′(1)z− B(z)

f (z)f ′(1)

. (6.5)

Moreover we have (3.5) and we know that

X g(z) = exp

1

2πi

|w|=1+εln�

zB(w)−wB(z)B(w)−w

(wg − A(w))′

wg − A(w)dw

!

.

Combining the previous two results, we have that

X (z) = exp

1

2πi

|w|=1+εln�

zB(w)−wB(z)B(w)−w

(wg − A(w))′

wg − A(w)dw

!

1− Y ′(1)z− Y (z)

f (z)f ′(1)

. (6.6)

So we obtain (6.2), which concludes our proof. �

We note that the decomposition in (6.5) holds also when we use any of the root-finding algorithmswe discussed. In that sense, there is nothing special about the contour integration we used here,so we are also allowed to use this decomposition result using roots-based representations. Aslong as f (z) satisfies the conditions formulated in 5, i.e. f (1) = 0 and f (wl) 6= 0, where wldenote the roots of wg − A(z) within the unit circle there are no problems.

6.2 Applications

One set of applications is a generalization of the FCTL queue, as discussed in [42]. The decom-position result in (6.5) was shown by [42] for the FCTL queue with a one-vehicle assumption,which can be used to model right-turning traffic. This assumption states that at most one vehicleproceeds without delay in a slot. If at least two vehicles arrive during a slot, a queue is formed(even if there was no vehicle present at the start of the slot). This model can be written in theform of (6.1), with B(z) = Y (z), A(z) = Y (z)c and f (z) = (z−1)Y (0), and they show that, whereX one

g (z) denotes the PGF of the queue with the one-vehicle assumption,

X oneg (z) = X g(z)

(1− Y ′(1))(z− 1)z− Y (z)

= exp

1

2πi

|w|=1+εln�

zY (w)−wY (z)Y (w)−w

(wg − A(w))′

wg − A(w)dw

!

1− Y ′(1)z− Y (z)

(z− 1). (6.7)

40

Page 42: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Random green and red times in the FCTL queue are also shortly discussed in [42]. Thestability condition is (R+ G)Y ′(1) < G, where R and G denote the mean red period and greenperiod. Let θr,g be the probability that a cycle consists of r red slots and g green slots. Uponassuming that there exists a N such that

∑∞r=0

∑∞g=N+1 θr,g = 0 and choosing N maximal such

that∑∞

r=0 θr,N > 0, an expression for PGF of the overflow queue is found (denote this variableXG(z)). First we consider a cycle consisting of r red and g green slots and derive the PGF of thequeue length at the next time that a red period starts

XG(z)Y (z)g+r

zg +�

1−Y (z)

z

� g−1∑

k=0

pk,r,g

Y (z)z

�g−1−k

, (6.8)

where pk,r,g denotes the probability that the queue is empty at the start of the k-th interval whenhaving a cycle of with r red and g green slots. Using this, after several steps, the overflow queueis rewritten to

XG(z) =

∑N−1k=0 qkY (z)kzN−1−k

zN − A(z)(z− Y (z)), (6.9)

where qk =∑

r,g θr,g pg−1−k,r,g and A(z) =∑

r,g Y (z)g+rzN−g . Because θr,g = 0 for g > N , we seethat A(z) is a PGF and we can use the framework described in Theorem 6. We obtain

XG(z) = exp

1

2πi

|w|=1+εln�

zY (w)−wY (z)Y (w)−w

� (wg −∑

r,g θr,g Y (w)g+r wN−g)′

wg −∑

r,g θr,g Y (w)g+r wN−g dw

!

. (6.10)

We will in particular investigate a case where the cycle time is fixed, but the green times arerandom (taken i.i.d. for the green period in each cycle). So, if we denote the random green timeas G, then G ∈ 0, ..., c according to some distribution and the red period is c − G. Denote withV (z) the PGF of the distribution of G, then (6.10) simplifies considerably to

XG(z) =

∑N−1k=0 qkY (z)kzN−1−k

zN − zN V (1/z)Y (z)c(z− Y (z)) (6.11)

= exp

1

2πi

|w|=1+εln�

zY (w)−wY (z)Y (w)−w

(wN −wN V (1/z)Y (z)c)′

wN −wN V (1/z)Y (z)cdw

!

. (6.12)

We note that the roots of the denominator of (6.11) can also be found using Algorithm 1,as zN A(z)V (1/z) is a PGF (V (z) is a polynomial of maximum degree N , as P(V > N) = 0) andbecause we assume stability. As a consequence, we can also determine (6.11) by using our root-based algorithms and in particular using Algorithm 1.

Another application area is that of the BSQ. The ordinary version of the BSQ, with a fixed numberg of vehicles departing each cycle, can be analyzed using Theorem 6.2, as well as the BSQ withrandom dispatch sizes (i.e. random g) [31] and vehicle holding and cancellation strategies [45].

We obtain the usual version of the BSQ by putting B(z) = 1 and adjusting f (z) to z − 1accordingly. The integral representation version for the queue length distribution is

X b(z) = exp

1

2πi

|w|=1+εln�

z−w

1−w

(wg − A(w))′

wg − A(w)dw

!

, (6.13)

41

Page 43: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

so, indeed, we recover (3.14).The version of the BSQ with random g has the following stationary process description with

Qn denoting the queue length at the n-th departure, Vn the random number of departures at then-th dispatch moment and Yn the arrivals between the n− 1-th and the n-th dispatch moment.

Qn+1 =Qn− Vn+ Yn. (6.14)

We assume that Vn has a finite maximum, i.e. P(Vn ≥ g + 1) = 0, for some g ∈ N and that thesystem is stable, i.e. Y ′(1)< V ′(1). The stationary distribution for the queue length Q(z) has thetransform [31]

Q(z) =C(z)

1− Y (z)V (1/z)

=C(z)zg

zg − zg Y (z)V (1/z). (6.15)

where Y (z) denotes the PGF of the arrival process, V (z) the PGF of the random number ofdepartures and C(z) satisfies the following relation:

C(z) = z−g(V ′(1)− Y ′(1))(z− 1)g−1∏

i=1

z− zi

1− zi, (6.16)

where zi , i = 1, ..., g − 1 are the roots on the unit circle.We can use Theorem 6 (all conditions are met), by choosing B(z) = 1 and

A(z) = zg Y (z)V (1/z) and f (z) = z− 1. So we have

Q(z) = exp

1

2πi

|w|=1+εln�

z−w

1−w

(wg −wg Y (w)V (1/w))′

wg −wg Y (w)V (1/w)dw

!

. (6.17)

We note that the roots of the denominator of (6.15) can also be found using Algorithm 1, aszgA(z)V (1/z) is a PGF (just as in the random green period model for the FCTL queue). Moreover,the whole form of (6.15) is very similar to that in the FCTL queue (see (6.11)).

Also the vehicle cancellation or holding strategies for the BSQ (either with a fixed or randomg) [45] can be analyzed using Theorem 6. In these models we decide at each dispatch momentwhether or not to hold all vehicles in the queue or to cancel all departures. These strategies areof the form

Qvdn+1 =Qvd

n − Vn+ En+ Yn, (6.18)

where Qvdn denotes the queue length at the n-th dispatch moment (to avoid confusion with the

BSQ without vehicle dispatching strategies), Vn denotes the number of vehicles that may leave atthe n-th dispatch moment, Yn the number of vehicles arriving prior to the n-th dispatch momentand En a control variable. In the case of a cancellation strategy, where we cancel the dispatch ifthe queue length is less than M (the minimum load constraint), we define En in the followingway

En =

(

Vn if Qn < M ,

max{0, Vn−Qvdn } if Qn ≥ M .

(6.19)

42

Page 44: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

For all described strategies in [45] it is shown that there exists a decomposition of the BSQand a PGF describing the specific strategy (name this latter PGF S(z)). This S(z) is defined in thefollowing way:

S(z) =M−1∑

i=0

sizi , (6.20)

where the si satisfy a system of equations

[C2− X2X−11 C1]s= 0, (6.21)

M−1∑

i=0

si = 1. (6.22)

The Ci and X i , i = 1,2 are matrices, where X1 and X2 are defined as (write vi := P(V = i) andx i, j = P(Vn− En = j− i|Qn = j)− P(Vn = j− i))

X1 =−

vM 0 0 . . . 0vM−1 vM 0 . . . 0vM−2 vM−1 vM . . . 0

......

......

...v1 v2 v3 . . . vM

and X2 =

x0,0 x0,1 x0,2 . . . x0,g−1x1,0 x1,1 x1,2 . . . x1,g−1x2,0 x2,1 x2,2 . . . x2,g−1

......

......

...xM−1,0 xM−1,1 xM−1,2 . . . xM−1,g−1

.

(6.23)The C1 and C2 are given by

C1 =

c−g 0 0 . . . 0c1−g c−g 0 . . . 0c2−g c1−g c−g . . . 0

......

......

...cM−1−g cM−2−g cM−3−g . . . c−g

......

......

...c−1 c−2 c−3 . . . c−M

and C2 =

c0 c−1 c−2 . . . c−M+10 c0 c−1 . . . c

M+20 0 c0 . . . c

M+3...

......

......

0 0 0 . . . c0

,

(6.24)where ci , i =−g, ..., 0 are the coefficients in C(z) of z i , which is defined in (6.16).

Putting everything together, we obtain

Qvd(z) =Q(z)S(z), (6.25)

where Q(z) is as defined in (6.15) and S(z) as in (6.20). It is straightforward that our root-findingbased algorithm can be used to compute Qvd(z). Upon usage of the function f (z) = (z − 1)S(z),we are also able to write all strategies in the form of (6.1). Note that S(1) = 1 (as S(z) is a PGF),so f (1) = (1− 1)S(1) = 0 as required, and that the ci can be obtained via contour integrationas well. Concluding, one could both use methods entirely based on contour integration and onroots.

We will give some numeric results for two examples. The first will be for the FCTL queue with ran-dom green times and fixed cycle lengths and the second will be a BSQ with a vehicle cancellationstrategy.

43

Page 45: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

We start with the FCTL queue example. We choose c = 50 and the random length greenperiods follow a binomial distribution with parameters 15 and 1/2. The arrival process in eachslot is distributed as a geometric random variable with mean 12/100. In this case we obtainFigure 11 for the queue length distribution and the mean queue length is 2.0. These results arein accordance with simulation results.

5 10 15 20Queue length

0.1

0.2

0.3

0.4

0.5

Probability

Figure 11: queue length distribution forFCTL queue with random green times.

5 10 15 20Queue length

0.02

0.04

0.06

0.08

0.10

0.12

0.14

Probability

Figure 12: queue length distribution for theBSQ with a vehicle cancellation strategy.

As a second example we compute the PGF of a vehicle cancellation strategy in the BSQ witha random dispatch size, using the above described results from [45]. We choose an examplewhere the arrivals are Poisson distributed with parameter 4, the batch sizes are binomially dis-tributed with parameters 20 and 1/2 and we choose M = 5. Making calculations along the linesdescribed above, we get Figure 12 for the queue length distribution. The mean queue length isapproximately 5.3. Also these results are in accordance with simulation results.

7 Conclusion and discussion

We have presented several algorithms to compute probabilities and moments from the PGFs ofthe queue length distribution for the FCTL queue and BSQ and delay distribution for the FCTLqueue. The algorithms in R suffer from a lack of accuracy (so we decided not to pursue thisfurther), but in Mathematica the algorithms perform generally very well as Mathematica is botha CAS and APA software. There are some limitations to several of the algorithms. We are e.g.able to obtain exact expressions for both models in case g is low (i.e. g ≤ 10) often in termsof Mathematica’s Roots function, but for higher values of g exact computations are prohibitivedue to the complicated form of the PGFs. The computations to obtain tail probabilities using thederivative approach (in case we use the contour integration) is computationally inefficient, dueto the large expressions that are required. The numerical inversion schemes in combination withthe contour integration generally perform well, but tend to be less accurate then the derivativeapproach, although one could choose different parameters in Algorithms 2 and 3 to obtain moreaccurate results than we did.

Generally, the roots-based strategy with a numerical efficient algorithm to obtain the rootsof the zg − Y (z)c (e.g. Algorithm 1) is to be preferred. Of course, when additional informationis known, e.g. about the roots or the explicit expression for the mean queue length in terms ofroots, one should take advantage of this knowledge. In the cases where we are able to computeexact expressions, the exact results and the results using approximations of the roots agree upto the number of digits that are given as output in the latter case. Although we do not have

44

Page 46: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

exact expressions (using Mathematica’s exact solver) in all cases to compare the results with, wethink that the approximative roots give very reliable results. If these results are indeed reliable,accuracy can be as high as one wishes.

We presented several generalizations and extensions of the FCTL queue and BSQ. All PGFsthat satisfy the assumptions formulated in Assumption 5 can be analyzed using contour integra-tion, together with some multiplying factor. This strategy can also be used to obtain the PGF ofmore complicated systems, known as vehicle dispatching strategies [45], although one still needsto obtain the PGF related to the specific strategy (the S(z) term in (6.25)). This is possible bothusing the roots-based approaches and contour integration methods.

Applications of the FCTL queue, like in probe vehicle data for obtaining actual queue lengths[23] do not need to rely on simulations methods or approximating results. Also the BSQ andrelated vehicle dispatching strategies [45] can be analyzed by our methods, having applicationsin logistics, transportation of people (e.g. in busses) and production systems.

45

Page 47: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Part II

Platoon forming algorithms for self-organizedstreet intersections

Abstract

Modern technologies facilitate future street intersections where vehicles pass in a self-organized manner. This would replace traffic light signaling with intelligent platoon form-ing algorithms (PFAs) that by wireless communication make vehicles organize themselves inbatches. Like traffic lights, PFAs manage conflicting traffic flows by imposing switching pro-cesses of batches passing the intersection, but PFAs start batch forming long before vehiclesarrive at the intersection and can, therefore, significantly outperform traffic lights in capac-ity and delays. In [48] a PFA was introduced with the potential to double the capacity ofan intersection comparing to the nowadays capacity. We introduce several novel PFAs thatare shown to increase the capacity even further, while also guaranteeing low delays, fairnessand robustness in heavy-traffic conditions. These PFAs are based on enhanced adaptationsof polling models, which are queueing models, originally developed for processor sharing incomputer systems, but now fine-tuned for traffic intersections.

8 Introduction

Intersections are inevitable in urban traffic to divide capacity in a fair manner among vehiclesfrom conflicting flows. This desire for fairness means that (busy) intersections are typically man-aged by some switching process that gives access to batches of vehicles from the same flow in acyclic manner, imposing a constraint on the maximal batch size that can pass the intersection.

There is a natural tension between capacity and fairness. Completely fair switching meansthat vehicles should pass the intersection in order of arrival (on a intersection wide basis). Thisbecomes rapidly unsustainable, because each switch requires an additional clearance time, andeats away intersection capacity. In near-saturation conditions, when the flows together impose ahigh volume-to-capacity ratio, the loss of capacity due to switching will have a dramatic effect ondelays.

The traditional way of regulating the switching process is by installing traffic lights withstatic signaling, using timers [24, 48, 52], or dynamic signaling with sensor data of currentlyexisting traffic flows (e.g. [43]). Platoon Forming Algorithms (PFAs) provide alternatives for self-driving vehicles, no longer letting the traffic light dictate the switching process and hence batchforming, but letting the vehicles organize themselves in batches, well in advance of arriving atthe intersection. This way platoons or batches of vehicles that can pass the intersection togetherare formed.

Vehicles arriving at the intersection arrange themselves in platoons, not adapting their relativeposition but adapting their speed. The key feature is that cars while approaching the intersectionadjust their speeds and upon arrival at the intersection are at optimal (read: high) speed, access-ing the intersection for a minimum period of time. In this way, time bans still exist, to give wayto other traffic flows, but the platoons are processed in the quickest possible way. This is becausethe size and speed of the platoons, of all directions, are organized by the PFA.

PFAs are one particular example of the slower is faster effect [29, 30], where, perhaps counterintuitively, slowing down now results in less delay on average in the short-term future. This,

46

Page 48: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

moreover, results in environmental advantages as less braking-and-pulling-up-again is neededand cars reach their destination more quickly.

8.1 Main contributions

One of our main contributions is the creation of new PFAs. In [48] a PFA based on batch formingis considered, where batches are formed according to arrival time of cars and the batches have amaximum size in order to give way to all lanes in a fair manner. We consider new PFAs based onpolling models and most of these new PFAs result in reductions in delay compared to the PFA in[48].

In comparing the PFAs we do not only look at delay, but also to maximum capacity andfairness, where the latter is defined as the expected number of cars that are overtaking you (fromopposing lanes) normalized by the expected number of cars arriving after you [47]. Both delayand fairness are important characteristics, as they play a key role in perception of the PFA tousers.

Two by-products of our study are the observation that fairness seems to pose a solution to thehard problem of choosing certain parameter values in k-limited polling models and an extensionof the polling literature with novel policies, light traffic limits and approximations, similar to [9].

We introduce the PFAs in more detail in Section 9 and we analyze their performance in Section10 regarding fairness, capacity and mean delay. Approximations for the mean delay for severalalgorithms are discussed in Section 11 and we close with conclusions and discussions in Section12.

9 Platoon Forming Algorithms

In this section we will introduce our PFAs for two vehicle flows crossing a common intersection.Generalization to multiple flows are straightforward. We now turn to introducing some keynotions that will be used throughout the subsequent sections. One of these is the time in betweencars of the same platoon upon arrival at the intersection: the interval between cars (of the sameplatoon) measured in time we call B and, as vehicles are self-driving, we can choose this time asa fixed period B (as is argued in [48]). Taking into account e.g. safety reasons, [48] shows thatwe can take B = 1. We call the time between cars in different platoons, i.e. the time betweentwo cars from opposing lanes, S. We can see S as a clearance or switching time and in [48] itis argued that we can also take this value fixed upon assuming that all cars are self-driving andthat we can take S = 1.4713, after considering safety reasons. This value follows from safetyconsiderations and the aim to be efficient. The downside of these two assumptions is that weneed to regulate the speed of self-driving cars before arrival at the intersection, as vehicles haveto arrive at the intersection at high speed (e.g. because of this latter requirement vehicles shouldnot stop upon arrival at the intersection). This is possible and we elaborate upon this feature inSection 10.1.

9.1 Batch algorithm

As a benchmark we consider the batch algorithm from [48]. After some general introduction ofvariables and notation, we give an algorithmic description and then explain the batch algorithmheuristically. The batch algorithm consists of two parts of code. A parameter that we can chooseis N , determining the maximum size of a batch. If V is a vehicle, then let XV denote the arriving

47

Page 49: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

lane of V , where the lanes are numbered 1 and 2 and let atV denote the arrival time of V atthe intersection if it would not be delayed. We let C be some set of arriving cars in the future asinput of Algorithm 4 and the combined output of Algorithm 4 and 5 will be the access time at theintersection for the vehicles in C .

Algorithm 4 Batch forming algorithm.1: Let V0 be the first vehicle from C .2: Set access time and direction of the first vehicle: t l = atV0

, dl = XV0.

3: Set number of processed vehicles to 1: np = 1.4: while np < |C | do5: Let V be the (np + 1)-th vehicle in C .6: Set Tsep = B if X V = dl , B+ S otherwise.7: Set t l =max{t l + Tsep, at V }.8: Create batch Ba = {V ∈ C , at V ≤ atV ≤ t l}, with |Ba| ≤ N .9: Process batch Ba using Algorithm 5 with t f = t l .

10: Let Vl be the last vehicle processed in Ba.11: Set t l = tVl

, where Vl is the last vehicle processed by Algorithm 5, dl = XVl, np = np+ |Ba|.

Algorithm 5 Batch processing algorithm.1: Set access time for the next vehicle to t f = t l .2: Let X be the flow of the first vehicle in Ba.3: for all V in batch Ba with flow X do4: Set tV = t f .5: if V is the last vehicle from flow X then6: if there is a vehicle from flow Y 6= X then7: t f = t f + B+ S.

8: else9: t f = t f + B.

10: for all vehicles V in batch Ba with flow Y 6= X do11: tV = t f .12: if V is not the last vehicle form flow Y then13: t f = t f + B.

In Algorithm 4 platoons are formed at the moment that the first car of a batch is about toenter the intersection. Every car then present may join the batch, except if there are more thanN cars, then only the first N arrived cars are allowed to join the batch. Note that we also allowbatches of size one, if the first car of the batch is the only car present at the intersection. Insideeach batch we serve each lane sequentially: first all cars on the lane of the first car may leave theintersection at intervals of length B; and then, after a clearance time S, all cars on the opposinglane may leave at B-length intervals. Then, the next batch is formed based on the first arrivingcar after the current batch and so on. We note that cars on their own lane are served sequentially(so there is a first come first served policy on each lane).

48

Page 50: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

9.2 Polling inspired algorithms

We present three novel algorithms inspired by polling models. We start with the k-limited al-gorithm, followed by the exhaustive and the globally gated algorithm, where the latter mostlyserves as an approximation for the batch algorithm. Pseudo-code versions of the algorithms areincluded, as well as heuristic explanations. In all this pseudo-code algorithms T denotes sometime in the future, e.g. the maximum time in a simulation. All those algorithms will have asoutput a sequence of access times at the intersection for all arriving vehicles.

The k-limited algorithm is described by the following piece of pseudo-code.

Algorithm 6 k-limited algorithm.1: Set direction of the first vehicle V0: dl = XV0

, t = atV0.

2: while t < T do3: Set n1 = 0, n2 = 0.4: while there is a vehicle V with XV = dl , atV ≤ t and ndl

< Kdldo

5: Set t = t + B.6: The departure time of V is t.7: Set ndl

= ndl+ 1.

8: if there is a car V ′ on lane dm, where dm = 1 if dl = 2 and dm = 2 if dl = 1 with atV ′ ≤ tthen

9: Set t = t + S and dl = dm.10: else if there is a car V ′ on lane dl with atV ′ ≤ t then11: Set n1 = 0, n2 = 0.12: else13: Let V2 be the first arriving vehicle after t.14: if dV2

is not dl then15: Set t =max{t + S, atV2

}.16: Set dL = dV2

.

Algorithm 6 describes the k-limited algorithm. After each time we switch to lane i, i = 1,2a maximum of Ki vehicles is allowed to pass the intersection as one platoon. Note that not allvehicles of one platoon need to be present at the intersection upon the entrance of the first carat the intersection, as opposed to the batch algorithm. After the departure of the platoon, weswitch to the other lane if there are delayed vehicles there, or, if there are no delayed vehicles onthe opposing lane, we initiate a new platoon at lane i, but only if at lane i delayed vehicles arepresent.

The exhaustive discipline is a special k-limited policy: we put Ki =∞ for i = 1,2. This impliesthat, upon switching to the other lane, the current lane has no delayed vehicles anymore andthere are delayed vehicles on the opposing lane.

The exhaustive algorithm can be described by the following piece of pseudo-code:

49

Page 51: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Algorithm 7 Exhaustive algorithm.1: Set direction of the first vehicle V0: dl = XV0

, t = atV0.

2: while t < T do3: while there is a vehicle V with XV = dl and atV ≤ t do4: Set t = t + B.5: The departure time of V is t.6: if there is a car V ′ on lane dm, where dm = 1 if dl = 2 and dm = 2 if dl = 1 with atV ′ ≤ t

then7: Set t = t + S and dl = dm.8: else9: Let V2 be the first vehicle arriving after t: put d2 = XV2

.10: if d2 is not dl then11: Set t =max{t + S, atV2

}.12: Set dl = d2.

Pseudo-code for the globally gated algorithm can be written in the following way.

Algorithm 8 Globally gated algorithm.1: Set access time and direction of the first vehicle V0: t = atV0

, tgates = atV0and dl = XV0

.2: while t < T do3: for all vehicles V with XV = dl and atV ≤ tgates do4: Set t = t + B.5: The departure time of V is t.6: if there is a car V ′ on lane dm, where dm = 1 if dl = 2 and dm = 2 if dl = 1 with atV ′ ≤ t

then7: Set t = t + S and dl = dm.8: for all vehicles V with XV = dl and atV ≤ tgates do9: t = t + B.

10: The departure time of V is t.11: Let V2 be the first vehicle arriving after tgates: put d2 = XV2

.12: if d2 is not dl then13: Set tgates =max{t + S, atV2

}.14: Set dl = d2.15: else16: Set tgates =max{t, atV2

}.

Algorithm 8 is included because under certain conditions it is closely linked with the batchalgorithm (Algorithms 4 and 5). Also in the globally gated algorithm access to a platoon is re-stricted to arrival times, although slightly different than in the batch algorithm (see Appendix Ffor a thorough explanation) and the lanes are sequentially allowed to let vehicles depart. Themain difference between the globally gated and the batch algorithm is that in the latter a re-striction on the maximum batch size is put, namely N . The globally gated and batch algorithmperform similarly in case N is (almost) never reached, i.e. in the the limiting case where N tendsto infinity. If the maximum batch size N in the batch algorithm is reached frequently, then thetwo algorithms will behave differently.

50

Page 52: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

We note that our polling inspired algorithms are slightly different than the standard policiesused in polling models, mostly due to the behaviour when there are no cars present at the inter-section. Therefore, analytical results are not readily available and we will use simulations of andapproximations to the models for analyzing the various algorithms.

We note that vehicles do not overtake vehicles that are on the same lane in all polling typealgorithms we discussed.

9.3 FCTL algorithm

Besides the above mentioned algorithms, we also consider the FCTL queue [24, 52] with platoonforming in the sense that vehicles slow down before reaching the intersection and speeding upbefore the actual arrival at the intersection. In this algorithm we need to choose green times forboth lanes: g1 and g2. These green times correspond to the number of time slots used for lettingvehicles depart on each lane. In each time slot one delayed vehicle can leave and we assumethat if one lane at some moment during the green period empties, newly arriving vehicles do notexperience any delay, following the FCTL assumption. Each time g1 or g2 slots of length 1 sec(conform the choice of B) have elapsed, we switch to the other lane incurring a clearance timeof length S, implying that the total cycle length c satisfies: c = g1 + g2 + 2S. Also in the FCTLalgorithm it is not allowed to overtake vehicles that are on the same lane.

9.4 Comparable complexity

All algorithms have a comparable complexity. Besides the slowing down of the vehicles for thecreation of the platoons, the only task of the algorithms is to sort the vehicles in the right wayand give the vehicles their right access time. Next to the actual arrivals times of the vehicles, theonly variables to be taken into account are being in the batch or not (globally gated and batchalgorithm) and how many vehicles are allowed to depart from each lane during one visit (k-limited and batch algorithm). These conditions are easily dealt with and therefore all algorithmshave a comparable complexity.

10 Performance evaluation

In comparing the performance of the algorithms, we will consider fairness, maximum capacityand mean delay, but we start this section with explaining the relation between common queueingmodels and the setting of the platoon forming algorithms. We describe a way to regulate thearrivals in such a way that we can use PFAs. Using this regulation, we show that the PFAs areequivalent to ordinary polling model with service distribution B and switch-over distribution S.

10.1 Relation between standard queueing theory and platoon forming algorithms

In this section, we will describe the relation between PFAs and common queueing models. Wewill argue that e.g. the delay and queue length distribution are equivalent in the two models,upon having a good regulation of the arrivals of the cars at the intersection (i.e. in slowing downand speeding up of the cars). Our conclusion will be that we can evaluate the PFAs by commonqueueing theory.

In almost the same setting as [48], we consider vehicles that communicate their earliestarrival time to the intersection some time before their actual arrival to the intersection. The

51

Page 53: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

intersection then checks if the intersection will be free at that time. If this is the case, the car canenter the intersection at its earliest arrival time.

However, if this is not the case the vehicle, say V , will have to slow down (as speeding up isnot allowed, because we assume that vehicles drive at the maximum speed when they are drivingtowards an intersection). This will either be due to the fact that there is another car in front of Vand therefore V should slow down to avoid a collision, or to the fact that V is the first to arriveafter the intersection decided to give way to the other lane. We specifically look at the first car inthe next platoon, call this car V1 (all other cars behind V1 are able to adjust their speed to that ofV1), as the second vehicle can adjust its speed to its predecessor (and so on for the third vehicle,the fourth,...)

Now we describe some necessary elements of this regulation, as we need to ensure that ve-hicles, after slowing down, speed up again to the speed limit, to make sure that our choices forB and S are valid. A perhaps naive, but intuitively clear and simple way to regulate the brakingand speeding up of the vehicles is the following way: let V1 drive the maximum speed until it hasto decelerate some time before arriving the intersection (if V1 is delayed, this is necessary, other-wise V1 might not be able to achieve the speed limit anymore before entering the intersection).Depending on the communicated (in some cases lower bound of the) delay, V1 might have tostop completely. In this case V1 should stop timely, as V1 has to speed up to the maximum speedafterwards. If V1 does not have to slow down entirely, the intersection knows when V1 may accessthe intersection (because it knows that V1 does not have to stop) and the only thing V1 has to dois arrive at that time at maximum speed. All these steps in the regulation of the arrival of cars atthe intersection, lead to the following requirements for a good regulation.

Requirements. Upon assuming several characteristics about the cars (as listed below), we areable to formulate the following (minimum) requirements to the various algorithms in order toregulate the arrival of cars: send messages 5 seconds before a car has to decelerate to let it stop;send a message 7 seconds before a car needs to start accelerating; a minimum communicationrange of a little more than 140 meters; and the algorithm should be able to determine what willbe happening at the intersection during the next 7 seconds, so as to be able to send the messagesto incoming or delayed vehicles.

The assumptions about the vehicles that we made are the following:

• A maximum speed of 20 m/sec;

• A maximum deceleration of 6 m/sec2;

• A maximum acceleration of 3 m/sec2;

• Constant deceleration and acceleration while braking, respectively pulling up and an in-stantaneous switch from zero acceleration to the maximum deceleration or acceleration;

• Instantaneous message deliveries and instantaneous deciding whether or not a vehicle canaccess the intersection (one could easily account for this, as these are straightforward ad-ditions to the requirements we have now).

Using this regulation (one could think of many more), we will argue that a well-organizedversion of the platoon forming algorithm is equivalent to a polling model with service time B andswitch-over time S.

52

Page 54: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

In the PFA with a regulation as above, we have that cars arrive at the intersection at full speed.Inside each platoon of cars, cars enter the intersection at intervals of length B, implying that theservice time distribution is equal to B. As the last car of the platoon leaves the intersection at fullspeed and the next platoon of the opposing lane also arrives at full speed, the clearance time isequal to S, as is argued by [48]. Therefore, we can see the PFA as a polling model with servicetime B and switch-over time S.

From an analysis point of view it does not matter whether the vehicles arrive at full speedat the intersection, form a queue just in front of it if there are delayed and instantaneouslyaccelerate to full speed; or vehicles arrive adhering to the PFA with the above regulation, wheredelay is experienced while driving towards the intersection by not driving at the maximum speed.In the end, vehicles leave the intersection at the same moment, implying that their total delay isthe same in both models, and therefore the delay distribution is the same in both models. Thesame holds for the queue length distribution.

From now on we shall also use some vocabulary from queueing theory, e.g. volume-to-capacity ratio is generally named load in queueing theory, a queue being stable means that themaximum capacity is not exceeded, heavy-traffic conditions are conditions near saturation orhigh capacity-to-volume ratios, and so on.

10.2 Fairness

As a measure for fairness we take the measure defined in [47]: we look at 1 minus the expectationof the number of cars that arrive after you, but leave before you do, normalized by the meannumber of vehicles arriving after you, implying that a fairness of 1 is completely fair (this isequivalent to an intersection-wide first come first served policy) and a fairness of 0 is completelyunfair. More formally, the fairness is defined as:

F = 1−E[O]E[A]

, (10.1)

where O is the number of vehicles that overtake you while you are at the intersection (as we donot allow vehicles to overtake other vehicles at the same lane, all these overtakes are from theopposing lane) and A is the number of arrivals (on both lanes) in the period between your arrivalat the intersection and the time that you leave the intersection.

In Figure 13, we have chosen to put N = 100 in the batch algorithm and for the k-limitedpolicy and the FCTL policy we have chosen to put g1+ g2 = K1+K2 = 100 and g1/g2 = K1/K2 =λ1/λ2. Here we define λi , i = 1,2 as the arrival rate at the intersection from lane i. We defineλ = λ1 + λ2, the total arrival rate at the intersection. As arrival process we assume a Poissonprocess.

In Figure 13 we see that the exhaustive and k-limited disciplines are similar (so similar thatresults partly overlap), provided that Ki is high enough (which is not the case from λ = 0.9and higher in Figure 13). We investigate the influence of Ki on fairness in Figures 14 up to andincluding 16. The globally gated and batch algorithms perform very well considering fairness andalso behave similarly, due to the global gates that are put. The influence of N on the fairness inthe batch algorithm is investigated in Figure 17. Obviously the FCTL algorithm is worst in lighttraffic, due to the high g1 and g2 in the case of low loads. For well chosen values g1 and g2 theFCTL algorithm is similar to the exhaustive discipline.

Figure 14 shows that fairness in the k-limited discipline sensitively depends on both K1 andK2, allowing for optimization purposes, yielding values of Ki <∞ to be optimal (i.e. most fair).

53

Page 55: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

0.0 0.2 0.4 0.6 0.8 1.0

0.5

0.6

0.7

0.8

0.9

1.0

λ

Fair

ness

exhaustiveglobally gatedk−limitedbatchFCTL

Figure 13: fairness with λ1 + λ2 = λ,λ1 = λ2 (solid lines) and 3λ1 = λ2 (dashedlines).

0.80

0.85

0.90

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 14: fairness for varying Ki , k-limitedalgorithm, λ1 = 0.125 and λ2 = 0.375.

Please note that the fairness value in Figure 13 (0.88) is below the seemingly optimal value inFigure 14 of 0.92. Two more instances support the conclusion that values of Ki <∞ are optimalregarding fairness, as can be seen in Figures 15 and 16.

0.84

0.86

0.88

0.90

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 15: fairness k-limited algorithm withλ1+λ2 = 0.5, λ1 = λ2.

0.93

0.94

0.95

0.96

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 16: fairness k-limited algorithm withλ1+λ2 = 0.5, 9λ1 = λ2.

We will give a sketch of the intuition behind this phenomenon. If the values of Ki are toohigh, the k-limited algorithm performs similar to the exhaustive algorithm, implying that any justarrived car at the lane where cars are departing, may depart with the preceding vehicles as well.At the same time the just arrived car passes (possibly many) vehicles that already arrived at theother queue. This can be circumvented by ensuring that Ki is not too high. Then, switches occurmore often (but only if necessary), giving space to the other lane, which is more fair in our wayof thinking. If the values of Ki are too low, it will happen more often that cars are left upon theswitching of the intersection to serve the other queue. In this case long queue length are likely tooccur and situations wherein one queue is almost empty, while at the same time the other queueis facing a workload of e.g. 2Ki or even more cars, occur relatively frequently. In these casesrelatively many overtakes may take place, yielding a low fairness. Summarizing our reasonings,the Ki should neither be too high, nor too low, which is supported by our observations. Thispossibly poses a solution, also in the regular k-limited policy, to the non-trivial task of determiningthese parameters, see e.g. [10].

54

Page 56: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

In the batch algorithm a similar phenomenon as to the k-limited algorithm does not exist.In Figure 17, we see that choosing lower values for N leads to higher fairness and ultimately acompletely fair algorithm in case N = 1 or N = 2. If the amount of asymmetry increases, thedifferences between various batch sizes decreases, because of the first come first served in eachqueue.

1 2 3 4 5 6 7 8

0.95

0.96

0.97

0.98

0.99

1.00

N

Fair

ness

λ1 = λ2

3λ1 = 2λ2

7λ1 = 3λ2

3λ1 = λ2

4λ1 = λ2

9λ1 = λ2

Figure 17: fairness in the batch algorithm with varying asymmetry and varying N , λ1+λ2 = 0.5.

10.3 Maximum capacity

The stability region can be computed analytically for our newly designed algorithms, except thek-limited algorithm. For the batch algorithm an analytical expression exists, but two probabilitieshave to be computed, which are non-trivial to determine.

The stability condition for the exhaustive and globally gated algorithm is just ρ < 1, whereρ = λB, i.e. the mean offered work each time unit should not exceed 1 (see e.g. [46] and [11]).In the remaining algorithms we need additional conditions to ensure stability. In case of the FCTLalgorithm we need that λic < gi , cf. [52]. For the k-limited algorithm a sufficient condition is

ρ+λi2S

Ki< 1, (10.2)

see [26], but is not necessary due to the possibility of not switching after serving Ki cars at lanei. Including this feature, would give a slightly larger stability region.

In the batch algorithm we need, with p1 the probability of switching one time inside a batchand p2 the probability of switching twice inside a batch,

λ

NB+ p1S+ 2p2S< N , (10.3)

cf. [48] to ensure stability. Explicit expressions for p1 and p2 are not found to date (the ex-pressions in [48] are incorrect, due to the false M/G/1 queue assumption used there; successiveservice terms should be independent, but they are not).

These additional conditions in the k-limited, batch and FCTL algorithm arise because of theneed to switch (e.g. after serving K1 cars on road 1), which have to occur after a finite amountof time (opposed to the globally gated and exhaustive algorithm, where it can take an arbitraryamount of time before we switch again).

55

Page 57: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

40 50 60Batch algorithm x Ø Ø

k-limited algorithm x x ØFCTL algorithm x x Ø

globally gated algorithm Ø Ø Øexhaustive algorithm Ø Ø Ø

Table 12: Stability for the various algo-rithms for parameter values (if applicable)such that K1 + K2 = N = g1 + g2 is thesame as the value on top of the column,K1/K2 = g1/g2 = 1 and λ1 = λ2 = 0.475.

40 50 60Batch algorithm x Ø Ø

k-limited algorithm x x ØFCTL algorithm x x Ø

globally gated algorithm Ø Ø Øexhaustive algorithm Ø Ø Ø

Table 13: Stability for the various algo-rithms for parameter values (if applicable)such that K1+K2 = N = g1+ g2 is the sameas the value on top of the column, K1/K2 =g1/g2 = 1/3 and 3λ1 = λ2 = 0.7125.

We present some simulation results for the batch and k-limited algorithm regarding maximumcapacity. The results for the remaining algorithms are analytic.

We note that the globally gated and exhaustive algorithm are always stable when λ = 0.95.According to Tables 12 and 13, the k-limited algorithm has a stability region that is similar tothe stability regions of the FCTL algorithm, but this is not the case. If we namely choose g1 =K1 = 18 and g2 = K2 = 45, and take 3λ1 = λ2 = 0.7125, the FCTL algorithm is not stableanymore, whereas the k-limited algorithm is. This is due to the possibility to switch in the k-limited algorithm before Ki vehicles have departed, which is not possible in FCTL algorithm dueto the fixedness of the cycle. The batch algorithm has a slightly larger stability region than thek-limited and FCTL algorithms according to Tables 12 and 13, possibly due to less switches (inbetween batches) and less rigid bounds on the service limits on both lanes. The results in Tables12 and 13 are supported by simulation results, which can be found in Appendix G.

10.4 Mean delay

Also regarding this criterion, analytical results are lacking in most cases (except the FCTL algo-rithm and the approximation we developed, see Section 11). We remark that the analysis in [48]is incorrect, due to the generally false assumption that successive service times are independent,which is needed to be an M/G/1 queue. In case N = 1 or N = 2, a first analysis was made by[27] and further results are not available to the best of our knowledge. So, again we make use ofsimulation, and simulate with the same parameters as in Section 10.2.

As can be seen in Figures 18 and 19, in general the FCTL algorithm performs worst, exceptfor some heavily loaded and asymmetric configurations (and then only the queue that faces thehighest load). Due to the relatively high batch size, the batch and globally gated algorithm aresimilar (we reason why this statement is true in Appendix F). The relatively high Ki are causingthe same performance in case of the k-limited and the exhaustive policy (but only in case theload is not too high). The exhaustive policy seems to outperform all other policies regardingmean delay.

Varying N in the batch algorithm leads to Figure 20. We see that lowering N has a negativeimpact on the mean delay (opposed to the relation regarding fairness), which is explained by thefact that lower N implies more switches. Higher asymmetry leads to less switches (as it is morelikely that the next car is on the same lane), and hence to lower mean delay compared to moresymmetric loads.

56

Page 58: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

0.0 0.2 0.4 0.6 0.8 1.0

0

10

20

30

40

50

60

70

λ

EW

1

exhaustiveglobally gatedk−limitedbatchFCTL

Figure 18: mean delay queue 1 with λ1 +λ2 = λ, λ1 = λ2 (solid lines) and 3λ1 = λ2(dashed lines).

0.0 0.2 0.4 0.6 0.8 1.0

0

10

20

30

40

50

60

70

λ

EW

2

exhaustiveglobally gatedk−limitedbatchFCTL

Figure 19: mean delay queue 2 with λ1 +λ2 = λ, λ1 = λ2 (solid lines) and 3λ1 = λ2(dashed lines).

For the fairness in the k-limited algorithm we observed interesting behaviour when changingKi , as can be read in Section 10.2. For the mean delay there is no such behaviour. We study thesame cases as we considered when studying fairness. The influence of the choice of Ki on themean delay is shown in Figures 21 up to and including 23.

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

N

EW

λ1 = λ2

3λ1 = 2λ2

7λ1 = 3λ2

3λ1 = λ2

4λ1 = λ2

9λ1 = λ2

Figure 20: mean delay in the batch algo-rithm with varying asymmetry and varyingN , λ1+λ2 = 0.5.

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 21: mean delay for an arbitrary cark-limited algorithm with λ1 + λ2 = 0.5,9λ1 = λ2.

We see that lowering the values of Ki has a negative impact on the delay of an arbitrary car.Choosing them ever higher seems to result in less delay, and in the limiting case we have theexhaustive algorithm. We explain this in the following way: choosing a specific value for the Kiimpacts the number of times we switch between the two lanes. Choosing them low results inmany switches, whereas high Ki leads to a (relatively) low number of switches. This implies thatan arbitrary vehicle between its arrival at the intersection and its departure sees more switcheswhen Ki is low in comparison with the case where Ki is high, and therefore also experiences moredelay. So, from a mean delay point of view, we should choose the Ki as high as possible. This isin contrast with the optimal choice for Ki if we only consider fairness, as we should choose the Kinot too high in that case.

57

Page 59: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

2

4

6

8

10

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 22: mean delay for an arbitrary cark-limited algorithm with λ1 + λ2 = 0.5,3λ1 = λ2.

1.0

1.5

2.0

2.5

3.0

3.5

1 2 3 4 5 6 7 8

1

2

3

4

5

6

7

8

K2

K1

Figure 23: mean delay for an arbitrary cark-limited algorithm with λ1 + λ2 = 0.35,λ1 = λ2.

11 Mean delay approximation

In [9] an approximation is formulated for the mean delay in polling systems using light andheavy traffic limits. We will use this idea and adjust it to our setting (most of the limits have tobe changed), to understand the mean delay better. Because analytical results exist for the meandelay in the FCTL algorithm, we do not consider this algorithm in this section.

11.1 Light traffic

The light traffic limits for our PFAs are fundamentally different than those for classical pollingmodels, due to the specific operations of our algorithms in case no cars are present. First, wedefine ρi = λiB and ρ = λB. The light traffic limit for all algorithms is the same and can beunderstood in the following way: in light traffic the probability that an arriving car sees no othercar is of O (1− ρ); the probability that the car sees one single other car is of O (ρ); and moregeneral the probability of seeing i cars upon arrival is O (ρi). In light traffic (ρ ↓ 0), the two keysituations are of course the ones where no car or one single car is present upon arrival and inthese cases, all algorithms behave similarly. We note that O (λ) = O (ρ), because B is fixed.

Given these observations, we derive the light traffic limit. Consider an arriving car, what doeshe need to wait for? We will work this out for cars arriving on lane 1 (for lane 2 we should simplyswap the indices).

• A car that is in service, on the same lane. The probability that two cars are present is O (ρ2),so the car in service is the only car present with high probability. In this case we have towait on average:

∫ B

0

(B− t)λ1e−λ1 t d t = B+e−λ1B − 1

λ1= O (ρ1

B

2). (11.1)

• A car that is in service on the opposing lane. Again, this is the only car present with highprobability. In this case we have to wait on average:

∫ B

0

(S+ B− t)λ2e−λ2 t d t = B+(e−λ2B − 1)(1−λ2S)

λ2= O (ρ2

B

2+ρ2S). (11.2)

58

Page 60: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

• A residual switch over time to the lane of the car. Also in this case, this is the only sourceof delay with high probability. In this case we have to wait on average:

∫ S

0

(S− t)λ2e−λ2 t d t = S+e−λ2S − 1

λ2= O (λ2S

S

2). (11.3)

In these derivations we explicitly used the assumption that the service times and switch overtimes are deterministic. All other terms are at least of order O (ρ2), as one needs basically atleast two arrivals just before the considered arriving car. Any of the above phases are mutuallyexclusive, so we are allowed to combine equations (11.1), (11.2) and (11.3) resulting in thefollowing light traffic limit for queue 1.

E[W LT1 ] = ρ1

B

2+ρ2(

B

2+ S) +λ2S

S

2, (11.4)

which is in accordance with extensive simulation results.

11.2 Heavy traffic

Obtaining the heavy traffic limit is more involved than the derivation of the light traffic limit.For some of our enhanced algorithms the heavy traffic limit will be the same or very close to theheavy traffic limit in regular polling models, whereas for other algorithms the heavy traffic limitof the usual polling models is of no use.

The heavy traffic limit for the considered exhaustive algorithm is the same as the heavy trafficlimit in the usual exhaustive policy in polling models, as the only difference between the algo-rithms is when the system idles, which does not happen in heavy traffic. This heavy traffic limitsis derived in [50] and reads (where λi = λi/(λ1+λ2) and ρi = ρi/(ρ1+ρ2))

(1−ρ)E[W HT,exhi ] =

1− ρi

2

1

ρ1(1− ρ1) + ρ2(1− ρ2)+ 2S

. (11.5)

For the k-limited algorithm the heavy traffic limit differs slightly from the usual case, as thereis a positive probability that we do not switch at the usual end of service of the queue (i.e.after serving Ki cars). Therefore the result in [8] is an approximation, only valid under certainconditions (i.e. the probability that we switch to the other lane after serving Ki cars should be(close to) 1). The heavy traffic limit in [8] only holds for lanes that are asymmetrically loaded(i.e. λ1/K1 > λ2/K2, or vice versa). We assume without loss of generality that lane 1 is the"busier" queue, meaning that when increasing the load on the system, queue 1 is the first tobecome unstable (queue 2 will remain stable for some higher loads as well). Then we obtain [8]

(1− (ρ+2Sλ1

K1))E[W HT,K

1 ] =1

2(B+ 2SK1)

(1−ρ1)

B+ 2SK1

B2+λ2B2

. (11.6)

When queue 1 is not stable in the k-limited algorithm (assuming asymmetric loads on bothlanes), queue 2 will behave like a k-limited vacation model, cf. [8], which is analyzed in [36].This implies that we know what happens with queue 2 if queue 1 is unstable. The part whereboth queues are stable we still have to approximate though. We will use the value of the meandelay in the k-limited vacation model at the point where queue 1 destabilizes. We will denote themean delay for the stable queue at that point with E[W vac,K

i ] as "heavy traffic" limit.

59

Page 61: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

In case of the globally gated policy we cannot use the usual heavy traffic limit, as in heavytraffic a notable difference remains: in the usual policy we always switch at the end of a cycle, butin our version this is not necessarily the case. Also the heavy traffic limit for the batch algorithmis not known.

11.3 Mean delay curve

By connecting light and heavy traffic limits in the same way as in [9], we arrive at the followingapproximations for the mean delay for the exhaustive and k-limited algorithm. We first state thegeneral approximation formula [9]

E[Wi,approx] =K0,i + K1,iρ+ K2,iρ

2

1−ρ, (11.7)

for some constants K0,i , K1,i and K2,i for i = 1, 2, depending on the algorithm. We can immedi-ately use this formula in case of the exhaustive algorithm, but for the for the k-limited disciplinewe use a similar, but slightly different version of this formula for obvious reasons:

E[W Ki,approx] =

K0,i + K1,iui + K2,iui

1− ui, (11.8)

where ui = ρ+ 2Sλi/Ki denotes the utilization of queue i cf. [8].We impose three conditions on these approximations: the approach should match both the

actual value (1) and the derivative (2) of the light traffic limit and the approximation shouldmatch the heavy traffic limit (3), like in [9]. However, in case of the k-limited algorithm andthe queue with the lowest load, we impose that the approximation equals E[W K ,vac] at the pointwhere the busier queue destabilizes.

We show how this works for queue 2 in the k-limited algorithm (where we still assume thatqueue 2 is stable, while queue 1 is not). We need to solve the following set of equations, comingfrom respectively conditions (1), (2) and (3):

K0,2 = E[W LT2 ]|ρ=0 = 0,

K0,2+ K1,2 =d

dρE[W LT

2 ]|ρ=0 = ρ2B

2+ ρ1(

B

2+ S) + λ1

S

2,

K0,2+ K1,2u∗2+ K2,2(u∗2)

2 = (1− u∗2)E[WK ,vac2 ],

(11.9)

where u∗2 is denoting the load on queue 2 at the point where queue 1 destabilizes. This system iseasily solvable and with these values the approximation for the less heavily loaded queue in thek-limited algorithm is ready to use.

In Figures 24 up to and including 27, we compare the made approximations with resultsobtained from the simulation.

In general, we see that the approximation underestimates the true mean delay, but the meandelay curve is closely approximated, allowing for optimization purposes (cf. [8]).

In the exhaustive discipline (Figure 27) the largest relative error is in the case 3λ1 = λ2 andλ = 0.55, where the relative error is −35, 1%. The largest relative error in Figure 24 is −24, 7%(λ1 = 3λ2, λ = 0.45), for Figure 25 −48.1% (3λ1 = λ2 and λ = 0.8) and for Figure 26 −28.0%(λ1 = λ2, λ= 0.55). The fact that the relative errors are the highest for moderately to moderatelyheavily loaded queues, is because we use the heavy and light traffic limits in the approximation

60

Page 62: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

0.0 0.2 0.4 0.6 0.8

0

10

20

30

40

50

60

λ

EW

1

λ1 = λ2, K1 = 9, K2 = 10

λ1 = 3λ2, K1 = 14, K2 = 5

3λ1 = λ2, K1 = 5, K2 = 16

Figure 24: comparison of approximation ofmean delay for queue 1 in case of the k-limited discipline with varying λ = λ1 + λ2(dashed lines) and simulation results (solidlines).

0.0 0.2 0.4 0.6 0.8

0

5

10

15

20

25

30

λ

EW

2

λ1 = λ2, K1 = 9, K2 = 10

λ1 = 3λ2, K1 = 14, K2 = 5

3λ1 = λ2, K1 = 5, K2 = 16

Figure 25: comparison of approximation ofmean delay for queue 2 in case of the k-limited discipline with varying λ = λ1 + λ2(dashed lines) and simulation results (solidlines).

0.0 0.2 0.4 0.6 0.8

0

10

20

30

40

50

λ

EW

λ1 = λ2, K1 = 9, K2 = 10

λ1 = 3λ2, K1 = 14, K2 = 5

3λ1 = λ2, K1 = 5, K2 = 16

Figure 26: approximation of mean delayfor arbitrary cars for the k-limited algorithmwith varying λ= λ1+λ2.

0.0 0.2 0.4 0.6 0.8 1.0

0

5

10

15

20

λ

EW

1

λ1 = λ2

λ1 = 3λ2

3λ1 = λ2

Figure 27: approximation of mean delay atqueue 1 for the exhaustive discipline withvarying λ= λ1+λ2.

and force the approximation to match those constraints. This way the approximation yields verygood results in those limiting cases, but at the same time causing the approximation to be worsewhen loads are far from heavy and light traffic.

The approximation of the heavy traffic limit for the k-limited algorithm in Equation (11.6)seems to be good in the cases we used it, as the approximation seems to match the simulationresults quite well. We note that, in more asymmetric systems, the approximation of the heavytraffic limit for the k-limited algorithm is worse than the cases we looked at, due to the fact thatthe sufficient stability condition in these cases is "farther from necessary" than in the investigatedcases (i.e. the probability that the non-busy queue is empty cannot be neglected in some of themore asymmetric situations).

61

Page 63: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

12 Conclusion and discussion

Concluding, we have found alternatives to the batch algorithm that perform better regardingmean delay and have a larger stability region, showing that, however already promising, evenbetter alternatives exist than the batch algorithm, from a capacity and mean delay point of view.The exhaustive and k-limited (with sufficiently high Ki) algorithms perform best. In this respect,the FCTL algorithm generally performs worst and is sensitive towards tuning of the green peri-ods. The globally gated and batch algorithm are generally between the other algorithms and areperforming similarly, provided that N is high enough; otherwise the batch algorithm has a highermean delay. We formulated approximations for several algorithms, confirming these observations.

The maximum capacity is the highest in both the exhaustive and globally gated algorithm.Although asymptotically (growing Ki , N and gi) all algorithms have the same stability region, theFCTL, batch and k-limited algorithm will have a smaller stability region than the exhaustive andglobally gated policy in any realistic setting. This will to lead to a relatively high mean delay inheavily loaded queues in case of the FCTL, batch and k-limited algorithm in comparison with theexhaustive and globally gated algorithm.

Considering fairness we note that the green periods need to be chosen with care in the FCTLalgorithm, because they can have a severe impact on fairness. This is also the case in the k-limited algorithm, resulting in a byproduct of our study: in the k-limited policy, fairness is away to choose the parameters in a meaningful and practical way. In case of well chosen greenperiods in the FCTL algorithm, the exhaustive discipline and the FCTL algorithm will have acomparable fairness. The globally gated policy always performs good regarding fairness and is,under relatively high N , comparable with the batch algorithm. If a batch size of N is reachedregularly, the batch algorithm outperforms all other algorithms regarding fairness.

Altogether it is not evident which policy is best. Both mean delay (and hence capacity) andfairness are key features in perception of the algorithm by users, and are contradictory: a higherfairness generally leads to more delay and vice versa, which is explicitly visible in the choice ofthe Ki in the k-limited algorithm. Both features are considered in this study and will need toremain being considered to make an optimal choice in choosing the right PFA.

References

[1] J. Abate, G. L. Choudhury, and W. Whitt. Calculation of the GI/G/1 waiting time distributionand its cumulants from Pollaczek´s formulas. Archiv für Elektronik und Ubertragungstechnik,47(5/6):311–321, 1993.

[2] J. Abate and W. Whitt. Numerical inversion of probability generating functions. OperationsResearch Letters, 12(4):245–251, 1992.

[3] O. Aberth. Iteration methods for finding all zeros of a polynomial simultaneously. Mathe-matics of computation, 27(122):339–344, 1973.

[4] I. J. B. F. Adan and Y. Zhao. Analyzing GI/Er/1 queues. Operations Research Letters,19(4):183–190, 1996.

[5] N. T. J. Bailey. On queueuing processes with bulk service. Journal of the Royal StatisticalSociety, 16:80–87, 1954.

62

Page 64: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

[6] M. A. A. Boon, A. J. E. M. Janssen, and J. S. H. van Leeuwaarden. Pollaczek contourintegrals for the fixed-cycle traffic-light queue. arXiv preprint arXiv:1701.02872, 2017.

[7] M. A. A. Boon and J. S. H. van Leeuwaarden. Networks of fixed-cycle intersections. arXivpreprint: arxiv.org/abs/1611.02947, 2016.

[8] M. A. A. Boon and E. M. M. Winands. Critically loaded k-limited polling systems. In Pro-ceedings of the 9th EAI International Conference on Performance Evaluation Methodologiesand Tools, pages 95–102. ICST (Institute for Computer Sciences, Social-Informatics andTelecommunications Engineering), 2016.

[9] M. A. A. Boon, E. M. M. Winands, I. J. B. F. Adan, and A. C. C. van Wijk. Closed-form waitingtime approximations for polling systems. Performance Evaluation, 68(3):290–306, 2011.

[10] S. C. Borst, O. J. Boxma, and H. Levy. The use of service limits for efficient operation ofmultistation single-medium communication systems. IEEE/ACM Transactions on Networking(TON), 3(5):602–612, 1995.

[11] O. J. Boxma, H. Levy, and U. Yechiali. Cyclic reservation schemes for efficient operation ofmultiple-queue single-server systems. Annals of Operations Research, 35(3):187–208, 1992.

[12] G. Brière and M. L. Chaudhry. Computational analysis of single-server bulk-arrival queues:GIX/M/1. Queueing Systems, 2(2):173–185, 1987.

[13] G. Brière and M. L. Chaudhry. Computational analysis of single-server bulk-service queues,M/GY /1. Advances in Applied Probability, 21(1):207–225, 1989.

[14] H. Bruneel and B. G. Kim. Discrete-time models for communication systems including ATM,volume 205. Springer Science & Business Media, 2012.

[15] M. L. Chaudhry. QPACK software package. A & A Publications, 1989.

[16] M. L. Chaudhry, C. M. Harris, and W. G. Marchal. Robustness of rootfinding in queueinganalyses. Technical report, George Mason University, Fairfax, Va Dept Of Systems Engineer-ing and Operations Research, 1988.

[17] M. L. Chaudhry, C. M. Harris, and W. G. Marchal. Robustness of rootfinding in single-serverqueueing models. ORSA Journal on Computing, 2(3):273–286, 1990.

[18] M. L. Chaudhry and A. Hasham. Software package for the queueing system Mx/G/1. Oper-ations research letters, 6(4):195–196, 1987.

[19] M. L. Chaudhry, J. L. Jain, and J. G. C. Templeton. Numerical analysis for bulk-arrivalqueueing systems: Root-finding and steady-state probabilities in GIr/M/1 queues. Annalsof Operations Research, 8(1):307–320, 1987.

[20] M. L. Chaudhry, B. Madill, and G. Brière. Computational analysis of steady-state probabili-ties of M/Ga,b/1 and related nonbulk queues. Queueing systems, 2(2):93–114, 1987.

[21] M. L. Chaudhry and J. G. C. Templeton. A first course in bulk queues. 1983.

[22] G. L. Choudhury and W. Whitt. Computing distributions and moments in polling models bynumerical transform inversion. Performance Evaluation, 25:267–292, 1996.

63

Page 65: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

[23] G. Comert and M. Cetin. Queue length estimation from probe vehicle location and theimpacts of sample size. European Journal of Operational Research, 197(1):196–202, 2009.

[24] J. Darroch. On the traffic light queue. Ann. Math. Statist., 35:380–388, 1964.

[25] D. Denteneer, J. S. H. van Leeuwaarden, and J. A. C. Resing. Bounds for a discrete-timemulti-server queue with an application to cable networks. Teletraffic Science and Engineering,5:601–610, 2003.

[26] C. Fricker and M. R. Jaibi. Monotonicity and stability of periodic polling models. Queueingsystems, 15(1):211–238, 1994.

[27] D. P. Gaver. A comparison of queue disciplines when service orientation times occur. NavalResearch Logistics Quarterly, 10(1):219–235, 1963.

[28] L. T. Hagen and K. G. Courage. Comparison of macroscopic models for signalized intersec-tion analysis. Transportation Research Record, (1225), 1989.

[29] D. Helbing, I. Farkas, and T. Vicsek. Simulating dynamical features of escape panic. Nature,407(6803):487–490, 2000.

[30] D. Helbing and A. Mazloumian. Operation regimes and slower-is-faster effect in the controlof traffic intersections. The European Physical Journal B-Condensed Matter and ComplexSystems, 70(2):257–274, 2009.

[31] N. K. Jaiswal. A bulk-service queueing problem with variable capacity. Journal of the RoyalStatistical Society. Series B (Methodological), pages 143–148, 1961.

[32] A. J. E. M. Janssen and J. S. H. van Leeuwaarden. Analytic computation schemes for thediscrete-time bulk service queue. Queueing Systems, 50(2-3):141–163, 2005.

[33] A. J. E. M. Janssen and J. S. H. van Leeuwaarden. Spitzer’s identity for discrete randomwalks. arXiv preprint arXiv, to appear, 2017.

[34] A. J. E. M. Janssen, J. S. H. van Leeuwaarden, and B. W. J. Mathijsen. Novel heavy-trafficregimes for large-scale service systems. SIAM Journal on Applied Mathematics, 75(2):787–812, 2015.

[35] M. A. Jenkins and J. F. Traub. A three-stage variable-shift iteration for polynomial zerosand its relation to generalized rayleigh iteration. Numerische Mathematik, 14(3):252–263,1970.

[36] T. T. Lee. M/G/1/N queue with vacation time and limited service discipline. PerformanceEvaluation, 9(3):181–190, 1989.

[37] J. D. C. Little. A proof for the queuing formula: L= λW. Operations research, 9(3):383–387,1961.

[38] J. McNamee and V. Pan. Numerical Methods for Roots of Polynomials - Part II, volume 16 ofStudies in Computational Mathematics. 2013.

[39] D. R. McNeill. A solution to the fixed-cycle traffic-light problem for compound Poissonarrivals. J. Appl. Probab., 5:624–635, 1968.

64

Page 66: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

[40] S. Mukhopadhyay, M. Pramod, and A. Kumar. An approach for analysis of mean delay at asignalized intersection with indisciplined traffic. In Communication Systems and Networks(COMSNETS), 2015 7th International Conference on, pages 1–6. IEEE, 2015.

[41] G. F. Newell. Approximation methods for queues with application to the fixed-cycle trafficlight. SIAM Review, 7(2):223–240, 1965.

[42] A. Oblakova, A. Al Hanbali, R. Boucherie, J. Ommeren, and W. Zijm. Exact expected delayand distribution for the fixed-cycle traffic-light model and similar systems in explicit form.Memorandum Faculty of Mathematical Sciences University of Twente, (2056), 2016.

[43] M. Papageorgiou, C. Diakaki, V. Dinopoulou, A. Kotsialos, and Y. Wang. Review of roadtraffic control strategies. Proceedings of the IEEE, 91(12):2043–2067, 2003.

[44] W. B. Powell. Analysis of vehicle holding and cancellation strategies in bulk arrival, bulkservice queues. Transportation Science, 19(4):352–377, 1985.

[45] W. B. Powell and P. Humblet. The bulk service queue with a general control strategy: theo-retical analysis and a new computational procedure. Operations Research, 34(2):267–275,1986.

[46] J. A. C. Resing. Polling systems and multitype branching processes. Queueing Systems,13(4):409–426, 1993.

[47] G. Shapira and H. Levy. On fairness in polling systems. Annals of Operations Research, pages1–33, 2016.

[48] R. Tachet, P. Santi, S. Sobolevsky, L. I. Reyes-Castro, E. Frazzoli, D. Helbing, and C. Ratti.Revisiting street intersections using slot-based systems. PloS one, 11(3):e0149607, 2016.

[49] H. Takahasi and M. Mori. Double exponential formulas for numerical integration. Publica-tions of the Research Institute for Mathematical Sciences, 9(3):721–741, 1974.

[50] R. D. van der Mei and E. M. M. Winands. A note on polling models with renewal arrivalsand nonzero switch-over times. Operations Research Letters, 36(4):500–505, 2008.

[51] J. S. H. van Leeuwaarden. Queueing models for cable access networks. 2005.

[52] J. S. H. van Leeuwaarden. Delay analysis for the fixed-cycle traffic-light queue. Transporta-tion Science, 40(2):189–199, 2006.

[53] F. V. Webster. Traffic signal settings. Technical Paper 39, Road Research Laboratory, 1958.

[54] J. A. C. Weideman. Numerical integration of periodic functions: a few examples. TheAmerican mathematical monthly, 109(1):21–36, 2002.

[55] E. W. Weisstein. Lambert W-function. 2002.

[56] Y. Q. Zhao and L. L. Campbell. Equilibrium probability calculations for a discrete-time bulkqueue model. Queueing Systems, 22(1):189–198, 1996.

65

Page 67: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Appendix

A Computation times – a first comparison

We start with an overview of all algorithms we considered. These are algorithms based on theenumerations in Section 4.2 with specific choices for the various options in the algorithms. Afterthe method description we state an abbreviation within brackets, which will be used throughoutthis section indicating which algorithm is used.

• Contour integration, using (3.5) ((3.14 for the BSQ) and the derivative approach using(3.7) to compute moments and (3.13) to compute probabilities using the "MultiPeriodic"integration method (CiDerivativeM) or using the "DoubleExponential" integration method(CiDerivativeD).

• Contour integration, using (3.1) ((3.16) for the BSQ) and the derivative approach using(3.7) to compute moments and (3.13) to compute probabilities using the "MultiPeriodic"integration method (Ci2DerivativeM) or using the "DoubleExponential" integration method(Ci2DerivativeD).

• Contour integration, using (3.5) ((3.14) for the BSQ) and transform inversion by Algo-rithm 3 for moments and Algorithm 2 for probabilities using the "MultiPeriodic" integrationmethod (CiTransformM) or using the "DoubleExponential" integration method (CiTrans-formD).

• Contour integration, using (3.1) ((3.16) for the BSQ) and transform inversion by Algo-rithm 3 for moments and Algorithm 2 for probabilities using the "MultiPeriodic" inte-gration method (Ci2TransformM) or using the "DoubleExponential" integration method(Ci2TransformD).

• Series expansions by computing exact solutions for the roots using representation (2.2)((2.14) for the BSQ) (ExactS).

• Series expansions by computing exact solutions for the roots using representation (2.9)((2.17)) (ExactN).

• Series expansions by computing numerical solutions for the roots by directly using NSolveand using representation (2.2) ((2.14) for the BSQ) (NSolveS).

• Series expansions by computing numerical solutions for the roots by directly using NSolveand using representation (2.9) ((2.17) for the BSQ) (NSolveN).

• Series expansions by computing numerical solutions for the roots using Algorithm (1) andusing representation (2.2) ((2.14) for the BSQ) (ApproxRootsS).

• Series expansions by computing numerical solutions for the roots using Algorithm (1) andusing representation (2.9) ((2.17) for the BSQ) (ApproxRootsN).

• Series expansions by computing the Lambert W solutions for the roots and using representa-tion (2.2) ((2.14) for the BSQ) (LambertWES). This is a fully exact method, only applicableif the arrival process is Poisson.

66

Page 68: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

• Series expansions by computing the Lambert W solutions for the roots and using repre-sentation (2.9) ((2.17) for the BSQ) (LambertWEN). This is a fully exact method, onlyapplicable if the arrival process is Poisson.

• Series expansions by computing the Lambert W solutions for the roots, taking the numericalvalue of the roots and using representation (2.2) ((2.14) for the BSQ) (LambertWNS). Thismethod is only applicable if the arrival process is Poisson.

• Series expansions by computing the Lambert W solutions for the roots, taking the numericalvalue of the roots and using representation (2.9) ((2.17) for the BSQ) (LambertWNN). Thismethod is only applicable if the arrival process is Poisson.

All methods in this section have a working precision of 40 decimals when rounding or findingroots and a precision goal of 10 decimals for the integral (which is sufficient to obtain good resultsin this section), where the latter is only applicable for the contour integration algorithms.

Before showing the results, we state that a - means that the method is not applicable to thespecific arrival distribution and a * indicates that the (absolute) running time of the algorithmexceeded 100 seconds and we aborted the evaluation in Table 14 up to and including 21.

Method Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3, 50)CiTransformD 5.68 8.59 7.64 6.05 5.70CiTransformM 2.97 2.26 3.84 2.96 3.35CiDerivativeD 6.81 5.80 7.12 5.73 5.17CiDerivativeM 3.36 2.07 3.31 2.30 2.00Ci2TransformD 5.08 5.96 6.27 5.15 5.32Ci2TransformM 2.85 2.17 3.53 2.48 2.80Ci2DerivativeD 13.6 13.6 14.6 12.2 8.47Ci2DerivativeM 6.51 4.62 5.78 4.91 3.16

ExactS 1.91 9.08 20.0 68.5 10.8ExactN 2.51 20.9 7.42 29.2 0.45NSolveS 1.32 0.22 10.0 5.49 0.03NSolveN 0.18 0.08 9.44 5.21 0.03

ApproxRootsS 0.19 0.14 0.17 0.42 0.03ApproxRootsN 0.41 0.15 0.17 0.45 0.03LambertWES 1.6 - - - -LambertWEN 2.41 - - - -LambertWNS 0.03 - - - -LambertWNN 0.03 - - - -

Table 14: absolute running times (in seconds) to calculate P(X g = i) for i = 0, 1, ...20 withg = 5, c = 10 and the arrival distribution as indicated with a working precision of 40 digits and(whenever applicable) a precision goal of 10 digits for the contour integral.

67

Page 69: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 1.40 2.44 2.88 1.67 1.54CiTransformM 0.90 0.68 2.02 1.04 0.86CiDerivativeD 0.37 0.28 1.51 0.48 0.23CiDerivativeM 0.29 0.16 1.43 0.39 0.13Ci2TransformD 1.30 1.17 2.63 1.59 1.46Ci2TransformM 0.88 0.68 2.04 0.97 0.84Ci2DerivativeD 0.39 0.32 1.60 0.51 0.25Ci2DerivativeM 0.30 0.16 1.41 0.39 0.14

ExactS 1.57 1.16 3.03 15.5 0.66ExactN 0.48 0.42 2.09 11.5 0.09NSolveS 0.18 0.07 10.0 5.42 0.02NSolveN 0.16 0.07 9.47 5.27 0.02

ApproxRootsS 0.19 0.14 0.17 0.42 0.02ApproxRootsN 0.42 0.14 0.16 0.41 0.02LambertWES 1.45 - - - -LambertWEN 0.36 - - - -LambertWNS 0.06 - - - -LambertWNN 0.01 - - - -

Table 15: absolute running times (in seconds) to calculate the first four moments of the queuelength distribution for the FCTL queue with g = 5, c = 10 and the arrival distribution as indicatedwith a working precision of 40 digits and (whenever applicable) a precision goal of 10 digits forthe contour integral.

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 9.12 9.31 10.5 25.2 10.8CiTransformM 2.96 3.14 3.28 17.6 3.44CiDerivativeD 6.61 6.78 6.43 20.5 5.04CiDerivativeM 3.61 2.53 2.62 17.0 2.10Ci2TransformD 5.42 7.71 6.21 20.2 5.94Ci2TransformM 2.63 2.77 2.95 17.5 3.31Ci2DerivativeD 12.6 14.2 12.5 25.8 7.41Ci2DerivativeM 6.28 4.97 5.07 19.9 3.47

ExactS * * * * *ExactN * * * * *NSolveS 0.59 2.75 * * 6.58NSolveN 0.67 2.80 * 96.6 5.82

ApproxRootsS 0.22 0.16 0.18 0.21 0.23ApproxRootsN 0.26 0.22 0.22 0.28 0.27LambertWES * - - - -LambertWEN * - - - -LambertWNS 0.04 - - - -LambertWNN 0.11 - - - -

Table 16: absolute running times (in seconds) to calculate P(X g = i) for i = 0, 1, ...20 withg = 18, c = 50 and the arrival distribution as indicated with a working precision of 40 digits and(whenever applicable) a precision goal of 10 digits for the contour integral.

68

Page 70: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 1.47 2.98 3.59 16.5 3.17CiTransformM 0.95 1.08 1.18 15.6 0.90CiDerivativeD 0.51 0.73 0.80 15.2 0.38CiDerivativeM 0.37 0.47 0.58 15.4 0.16Ci2TransformD 1.44 1.95 1.90 16.2 1.56Ci2TransformM 0.88 1.06 1.16 15.6 0.84Ci2DerivativeD 0.54 0.69 0.78 16.0 0.47Ci2DerivativeM 0.38 0.51 0.59 15.2 0.18

ExactS * * * * *ExactN * * * * *NSolveS 0.59 2.86 * 97.2 5.72NSolveN 0.57 2.76 * 97.0 5.67

ApproxRootsS 0.19 0.17 0.17 0.20 0.23ApproxRootsN 0.22 0.15 0.15 0.19 0.22LambertWES * - - - -LambertWEN * - - - -LambertWNS 0.10 - - - -LambertWNN 0.05 - - - -

Table 17: absolute running times (in seconds) to calculate the first four moments of the queuelength distribution for the FCTL queue with g = 18, c = 50 and the arrival distribution as in-dicated with a working precision of 40 digits and (whenever applicable) a precision goal of 10digits for the contour integral.

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 4.45 7.23 6.74 5.25 4.97CiTransformM 2.54 2.53 3.73 2.64 2.75CiDerivativeD 2.81 2.10 3.53 2.30 2.12CiDerivativeM 1.96 0.91 2.26 1.19 0.98Ci2TransformD 3.32 4.67 5.21 3.93 3.85Ci2TransformM 2.17 1.95 3.34 2.04 2.09Ci2DerivativeD 2.98 2.22 3.43 2.19 2.16Ci2DerivativeM 2.01 0.99 2.20 1.14 0.94

ExactS 0.37 1.23 2.31 12.2 0.13ExactN 0.34 0.80 2.16 12.0 0.10NSolveS 0.20 0.07 9.52 5.40 0.02NSolveN 0.71 0.10 10.1 5.60 0.02

ApproxRootsS 0.18 0.15 0.16 0.43 0.02ApproxRootsN 0.21 0.14 0.16 0.44 0.02LambertWES 0.25 - - - -LambertWEN 0.23 - - - -LambertWNS 0.03 - - - -LambertWNN 0.03 - - - -

Table 18: absolute running times (in seconds) to calculate P(X b = i) for i = 0, 1, ...20 withg = 5, c = 10 and the arrival distribution as indicated with a working precision of 40 digits and(whenever applicable) a precision goal of 10 digits for the contour integral.

69

Page 71: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 1.24 1.21 2.58 1.58 1.50CiTransformM 0.79 0.65 1.95 0.91 0.84CiDerivativeD 0.33 0.21 1.49 0.45 0.19CiDerivativeM 0.25 0.14 1.41 0.37 0.11Ci2TransformD 0.99 0.97 2.33 1.27 1.12Ci2TransformM 0.68 0.54 1.88 0.82 0.64Ci2DerivativeD 0.30 0.21 1.44 0.41 0.16Ci2DerivativeM 0.25 0.13 1.39 0.35 0.10

ExactS 0.22 2.15 2.16 11.6 0.14ExactN 0.20 1.45 2.04 11.8 0.07NSolveS 0.17 0.07 9.61 5.39 0.02NSolveN 0.18 0.07 10.2 5.59 0.02

ApproxRootsS 0.19 0.14 0.18 0.43 0.02ApproxRootsN 0.22 0.14 0.17 0.45 0.02LambertWES 0.14 - - - -LambertWEN 0.09 - - - -LambertWNS 0.03 - - - -LambertWNN 0.03 - - - -

Table 19: absolute running times (in seconds) to calculate the first four moments of the queuelength distribution for the BSQ with g = 5, c = 10 and the arrival distribution as indicated witha working precision of 40 digits and (whenever applicable) a precision goal of 10 digits for thecontour integral.

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 7.12 8.76 10.6 26.7 10.3CiTransformM 2.66 2.93 3.06 18.0 2.97CiDerivativeD 3.08 2.75 2.87 17.5 2.36CiDerivativeM 2.16 1.32 1.40 16.1 1.04Ci2TransformD 3.59 6.41 4.88 19.4 4.42Ci2TransformM 2.15 2.47 2.46 17.9 2.29Ci2DerivativeD 3.51 2.92 2.90 18.4 2.30Ci2DerivativeM 2.29 1.38 1.49 16.7 1.11

ExactS * * * * *ExactN * * * * *NSolveS 0.59 2.94 * * 5.67NSolveN 0.62 2.89 * * 5.91

ApproxRootsS 0.19 0.15 0.16 0.20 0.23ApproxRootsN 0.17 0.15 0.16 0.21 0.23LambertWES * - - - -LambertWEN * - - - -LambertWNS 0.05 - - - -LambertWNN 0.05 - - - -

Table 20: absolute running times (in seconds) to calculate P(X b = i) for i = 0, 1, ...20 withg = 18, c = 50 and the arrival distribution as indicated with a working precision of 40 digits and(whenever applicable) a precision goal of 10 digits for the contour integral.

70

Page 72: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Method Pois(3/10) Geo(10/13) NBinom(10,100/103) Binom(20,3/200) Hypergeo(5, 3, 50)CiTransformD 1.36 2.91 3.30 16.7 3.05CiTransformM 0.90 1.12 1.23 16.2 0.90CiDerivativeD 0.43 0.67 0.72 15.5 0.33CiDerivativeM 0.34 0.49 0.57 15.7 0.13Ci2TransformD 1.17 1.64 1.58 16.2 1.23Ci2TransformM 0.75 0.92 1.02 16.2 0.72Ci2DerivativeD 0.42 0.63 0.67 17.3 0.28Ci2DerivativeM 0.33 0.46 0.55 16.9 0.15

ExactS * * * * *ExactN 3.32 * * * *NSolveS 0.56 2.77 * 99.3 5.81NSolveN 0.60 2.84 * 100 5.91

ApproxRootsS 0.19 0.15 0.16 0.21 0.23ApproxRootsN 0.21 0.15 0.15 0.19 0.22LambertWES * - - - -LambertWEN 2.77 - - - -LambertWNN 0.05 - - - -LambertWNN 0.04 - - - -

Table 21: absolute running times (in seconds) to calculate the first four moments of the queuelength distribution for the BSQ with g = 18, c = 50 and the arrival distribution as indicated witha working precision of 40 digits and (whenever applicable) a precision goal of 10 digits for thecontour integral.

B Computation times BSQ for general scenarios

In Table 22 we see the computation time to obtain the probabilities and moments of the queuelength distribution X b. We will use Algorithm 1 to find the roots and we use representation(2.17).

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.23 0.21 0.21 0.40 0.03

0.25 0.19 0.20 0.38 0.03g = 18, c = 50 0.32 0.27 0.27 0.32 0.35

0.29 0.26 0.26 0.30 0.35g = 70, c = 200 1.75 1.55 1.69 1.97 3.44

1.70 1.64 1.63 1.97 3.50

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.24 0.20 0.21 0.48 0.02

0.23 0.20 0.21 0.52 0.02g = 18, c = 50 0.24 0.22 0.22 0.26 0.28

0.23 0.21 0.21 0.26 0.27g = 70, c = 200 3.15 1.84 3.12 3.39 6.28

3.12 1.80 3.14 3.46 6.30

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.24 0.21 0.21 0.52 0.09

0.24 0.21 0.21 0.54 0.10

Table 22: absolute running times BSQ queue (in seconds) to calculate P(X b = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the root-finding based algorithm with a working precision of 80 digits.

71

Page 73: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

In Table 23 we see the computation time of the probabilities and moments for the contourintegration method using representation (3.14) and the derivative approach to obtain probabil-ities and moments. A * in Table 23 indicates that the algorithm for that specific setting did notcomplete within 100 seconds and we aborted the evaluation.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 2.19 1.23 2.51 1.28 1.23

0.30 0.23 1.43 0.32 0.12g = 18, c = 50 2.27 1.56 1.59 14.2 1.48

0.40 0.53 0.60 12.9 0.22g = 70, c = 200 3.03 3.31 3.34 * 1.79

0.82 1.99 2.25 * 0.62

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 2.17 1.34 2.44 1.47 1.34

0.34 0.19 1.56 0.45 0.19g = 18, c = 50 2.35 1.60 1.69 13.7 1.45

0.42 0.49 0.62 12.6 0.22g = 70, c = 200 3.04 3.87 3.73 * 1.67

0.77 2.16 2.30 * 0.44

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 2.23 1.23 2.37 1.40 1.34

0.367 0.22 1.46 0.45 0.22

Table 23: absolute running times BSQ queue (in seconds) to calculate P(X b = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the contour integration based algorithm with a working precision of 80digits and a precision goal of 20 digits.

In Table 24 we see the computation times when using Theorem 2 to obtain the roots in thePoisson arrival case, using representation (2.17) to obtain X b(z). A - indicates that the resultingsystem (arrival intensity, green period and red period) would not result in a stable system.

Arrival distribution Pois(1/10) Pois(3/10) Pois(4/10)g = 5, c = 10 0.03 0.04 0.03

0.03 0.03 0.03g = 18, c = 50 0.06 0.06 -

0.05 0.05 -g = 70, c = 200 0.17 0.15 -

0.17 0.16 -

Table 24: absolute running times BSQ queue (in seconds) to calculate P(X b = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using (2.17) and numerical values for the exact Lambert W solutions, with aworking precision of 80 digits.

We show the computation times for obtaining the mean queue length in Table 25, wherewe use expression (2.18) and Algorithm 1 to obtain the roots for the BSQ queue. We comparethis method with the derivative approach, using the contour integral expression (3.14) and us-ing a derivative approach to obtain the mean queue length. A * in Table 25 indicates that thecomputation time was more than 100 seconds and that we aborted the evaluation.

72

Page 74: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 0.17 0.08 1.35 0.22 0.02

0.17 0.14 0.16 0.33 0.02g = 18, c = 50 0.25 0.39 0.45 12.6 0.05

0.23 0.19 0.20 0.22 0.26g = 70, c = 200 0.71 1.80 2.07 * 0.28

1.39 1.29 1.34 1.61 3.10

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 0.21 0.07 1.36 0.29 0.03

0.19 0.15 0.16 0.41 0.02g = 18, c = 50 0.26 0.37 0.44 14.7 0.05

0.20 0.15 0.15 0.19 0.22g = 70, c = 200 0.58 1.96 1.99 * 0.25

2.72 1.53 2.65 2.98 5.77

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 0.22 0.07 1.29 0.34 0.04

0.19 0.15 0.16 0.45 0.08

Table 25: absolute running times BSQ queue (in seconds) to calculate the mean queue lengthusing the derivative approach with contour integral representation (3.14) (first number in eachcell) with a working precision of 40 digits and a precision goal of 10 digits and expression (2.18)(second number in each cell) with a working precision of 40 digits.

C Computation times BSQ in heavy traffic scenario

In Table 26 we see the computation times for the heavy traffic cases using the roots-based strategy(to which the first half of Table 26 is devoted), where we choose a working precision of 110digits; and using the contour integration based algorithm (to which the second half of Table 26is devoted), where we choose a working precision of 50 digits and a precision goal of 20 digits.The roots-based strategy is using Algorithm 1 and representation (2.17), whereas the contourintegration method uses representation (3.14) and the derivative approach. A * in Table 6 meansthat the computation in that specific setting did not complete within 300 seconds.

Arrival distribution Pois( 49999100000

) Geo(100000149999

) NBinom(10, 10000001049999

) Binom(20, 499992000000

) Hypergeo(5, 49999, 50000)g = 5, c = 10 0.50 0.22 0.23 0.51 0.21

0.27 0.22 0.26 0.52 0.18g = 25, c = 50 0.28 0.25 0.25 0.30 0.77

0.30 0.27 0.27 0.31 0.93g = 100, c = 200 4.02 2.71 3.82 4.36 16.6

4.06 2.66 3.88 4.28 15.6

g = 5, c = 10 176 * 59.6 53.1 57.23.63 * 11.0 3.50 4.04

g = 25, c = 50 177 * 64.3 70.7 61.03.7 * 10.4 21.1 5.05

g = 100, c = 200 174 60.0 * * 63.44.31 9.80 * * 6.88

Table 26: absolute running times FCTL queue (in seconds) to calculate P(X g = i) for i =0,1, ..., 40 first number in each cell) and the first 4 moments (second number in each cell) ofthe queue length distribution. The first half of the table are computation times based on the root-finding strategy with a working precision of 110 digits. The second half uses contour integrationwith a working precision of 50 digits and a precision goal of 20 digitss.

73

Page 75: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

D Computation times BSQ transform inversion

In Table 27 we see the computation times based on the numerical inversion schemes in Algorithm2 (for probabilities) and Algorithm 3 (for moments). We use representation (3.16) for X b(z). A* indicates that the algorithm did not complete within 100 seconds, whereas a ** indicates thatAlgorithm 3 did not complete, because the algorithm tried to compute X b(z) outside the validityrage of (3.16) which resulted in e.g. overflow errors or memory allocation problems (whichoccurred in some light traffic situations). The latter could be resolved by taking a (much) largervalue of γ in Algorithm 3.

Arrival distribution Pois(1/10) Geo(10/11) NBinom(10, 100/101) Binom(20, 1/200) Hypergeo(5, 3, 150)g = 5, c = 10 2.07 3.37 3.40 2.26 2.34

0.69 1.05 1.92 0.75 0.71g = 18, c = 50 3.46 3.85 4.11 17.6 4.34

** ** ** ** **g = 70, c = 200 3.96 5.29 5.53 * 7.97

** ** ** ** **

Arrival distribution Pois(3/10) Geo(10/13) NBinom(10, 100/103) Binom(20, 3/200) Hypergeo(5, 3,50)g = 5, c = 10 3.41 3.23 4.70 3.74 2.83

1.06 0.96 2.26 1.20 0.73g = 18, c = 50 3.31 3.62 4.43 16.1 4.34

1.13 1.38 1.46 13.2 1.22g = 70, c = 200 3.57 5.20 5.68 * 4.28

1.44 2.82 2.95 * 1.43

Arrival distribution Pois(4/10) Geo(10/14) NBinom(10, 100/104) Binom(20, 4/200) Hypergeo(5, 4,50)g = 5, c = 10 3.41 3.43 4.51 3.60 4.48

1.07 1.04 2.16 1.21 1.28

Table 27: absolute running times BSQ queue (in seconds) to calculate P(X b = i) for i = 0, 1, ..., 20(first number in each cell) and the first 4 moments (second number in each cell) of the queuelength distribution using the contour integration based algorithm with a working precision of 80digits and a precision goal of 20 digits.

In Figures 28 up to and including 31 we see the numerical inversion method using Algorithm2 to compute individual probabilities (using representation (3.1) for the FCTL queue and (3.16)for the BSQ) and the approach using the derivatives (using representation (3.5) for the FCTLqueue and (3.14) for the BSQ).

74

Page 76: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0

2.5

3.0

3.5

Computation time

Figure 28: comparison derivative and nu-merical inversion approach for obtainingP(X g = i), i = 0, ..., 20 (horizontal axis)with g = 5 and c = 10, a working preci-sion of 80 digits and a precision goal of 20digits for geometric arrivals.

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0

2.5

3.0

3.5

Computation time

Figure 29: comparison derivative and nu-merical inversion approach for obtainingP(X g = i), i = 0, ..., 20 (horizontal axis)with g = 18 and c = 50, a working preci-sion of 80 digits and a precision goal of 20digits for geometric arrivals.

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0Computation time

Figure 30: comparison derivative and nu-merical inversion approach for obtainingP(X b = i), i = 0, ..., 20 (horizontal axis)with g = 5 and c = 10, a working preci-sion of 80 digits and a precision goal of 20digits for Poisson arrivals.

Numerical inversion

Derivatives

0 5 10 15 20i

0.5

1.0

1.5

2.0Computation time

Figure 31: comparison derivative and nu-merical inversion approach for obtainingP(X b = i), i = 0, ..., 20 (horizontal axis)with g = 18 and c = 50, a working preci-sion of 80 digits and a precision goal of 20digits for Poisson arrivals.

75

Page 77: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

E Computation times tails of the BSQ model

In Table 28 and 29 we calculate each tail probability separately, with a maximum computationtime of 100 seconds (a * indicates that this computation was exceeded and the calculation wasaborted). We include two different algorithms in Tables 28 and 29. The first number in each cellof Tables 28 and 29 represents the root-finding based method using representation (2.17) andAlgorithm 1 to find the roots; whereas the second number in each cell represents a numericalinversion scheme using Algorithm 2 and representation (3.1).

Arrival distribution P(X b = 50) P(X b = 100) P(X b = 150) P(X b = 200)Pois(3/10) 0.49 0.49 0.43 0.48

7.38 15.0 21.5 27.6Geo(10/13) 0.27 0.26 0.30 0.30

8.73 21.6 34.0 44.8NBinom(10,100/103) 0.44 0.40 0.42 0.40

9.96 17.9 24.5 30.7Binom(20, 3/200) 0.73 0.75 0.81 0.77

8.00 15.5 22.4 28.4Hypergeo(5,3, 50) 0.06 0.09 0.16 0.26

9.45 17.9 25.6 32.6

Table 28: absolute running times BSQ (in seconds) to calculate P(X b = i) as indicated in thecolumn for g = 5 and c = 10 using the root-finding based algorithm (first cell in each row) witha working precision of 200 digits and the contour integration based algorithm with numericalinversion (second number in each cell) with a working precision of 150 and precision goal of 60digits.

Arrival distribution P(X b = 50) P(X b = 100) P(X b = 150) P(X b = 200)Pois(3/10) 0.50 0.44 0.44 0.45

13.8 28.7 40.9 53.0Geo(10/13) 0.40 0.40 0.35 0.38

16.6 32.5 63.2 90.8NBinom(10,100/103) 0.34 0.39 0.41 0.39

15.9 34.8 49.8 63.0Binom(20, 3/200) 0.43 0.48 0.49 0.60

27.0 44.7 58.4 71.5Hypergeo(5,3, 50) 0.53 0.58 0.78 1.27

11.2 35.5 52.1 68.1

Table 29: absolute running times BSQ (in seconds) to calculate P(X b = i) as indicated in thecolumn for g = 18 and c = 50 using the root-finding based algorithm (first cell in each row) witha working precision of 200 digits and the contour integration based algorithm with numericalinversion (second number in each cell) with a working precision of 150 and precision goal of 60digits.

Also for the BSQ none of the derivative approaches gave results within the abortion time forthe settings we consider in this section.

76

Page 78: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

F A stochastic domination result for the batch algorithm

We compare the globally gated algorithm and the batch algorithm with a maximum batch size Nsuch that N is actually never reached. We remark that in this case only the "putting of the gates"(i.e. the time before which vehicles have to be arrived to depart during the next cycle or batch)is different when comparing the two algorithms. This will not be the case if the batch sizes aresmaller, such that cars (occasionally) have to wait a whole batch (although they are already atthe intersection before the putting of the gates).

We explain the difference in the putting of the gates. In the globally gated algorithm onlythe vehicles arrived before the end of the previous cycle are allowed to depart, whereas in thebatch algorithm all vehicles may depart that are present at the intersection at the moment thefirst car of the next batch departs. This two moments might coincide, but this is not necessarilythe case. If we do not switch after the previous cycle/batch no difference exists in the putting ofthe gates. Otherwise, there is an S interval difference between the two algorithms. Therefore,possibly, more vehicles may depart during the next batch in the batch algorithm, compared to theglobally gated algorithm as the batch in the batch algorithm is formed later.

Now, we derive a stochastic domination result for the queue length distribution. We start from acase where the number of vehicles in each lane, say Ci , i = 1,2, are the same in both models andthe intersection was serving the same lane in both algorithms. We focus on the moment the nextbatch is formed. Will all cars be processed in the batch algorithm, also be served in the globallygated algorithm?

• If C1 = C2 = 0, we know the models behave similarly during service of the next batch andno differences occur.

• If C1 > 0 and/or C2 > 0, then:

– If no vehicles arrive in the interval between the putting of the gates in the globallygated algorithm and the forming of the batch (which is either 0 or S later (cf. ourreasoning)), then the platoon in both models is the same. Therefore no difference intime until the end of the batch occurs and the queue lengths are the same after thisplatoon.

– If vehicles do arrive in the interval between the putting of the gates in the globallygated algorithm and the forming of the batch, then differences may occur. Let Ldenote the number of vehicles in the interval between the putting of the gates and theforming of the batch. Then:

∗ If all L vehicles arrived in the same lane as the lane from which the last vehicle inthe batch departed (using the batch or globally gated algorithm), no differencesoccur.

∗ If at least one vehicle of those L did not arrive at the same lane as the last vehiclein the batch, then the number of times we switch in the batch algorithm is lessthan or equal to the number of switches we make in the globally gated algorithm(depends on the vehicles arrived after L). This results in an equal or longer timeneeded to serve all cars for the globally gated algorithm in comparison with thebatch algorithm.

77

Page 79: Eindhoven University of Technology MASTER The fixed-cycle … · UNIVERSITY OF TECHNOLOGY EINDHOVEN MASTER THESIS The Fixed-Cycle Traffic-Light queue – efficient algorithms and

Having inspected all possible continuations from the starting case, we see that the batch algorithmneeds less or the same time to clear vehicles from the lanes if we compare the batch algorithmwith the globally gated discipline. Therefore the queue length in the batch algorithm stochasti-cally dominates our version of the globally gated algorithm when the maximum batch size N isnever reached, resulting in

Qbatch algorithm ≤st Qglobally gated algorithm (F.1)

With Little’s law [37] we conclude that e.g. the following holds:

E[Wbatch algorithm]≤ E[Wglobally gated algorithm]. (F.2)

G Maximum capacity for the k-limited and batch algorithms

We support the claims made in Section 10.3 with simulation results in the case of the k-limitedand batch algorithm in Table 30. We note that if the values of Ki get lower the intersectioncannot become stable if the simulation with values Ki is already unstable. The results in Table 30therefore fully support the results in Table 12 and 13, as, if the simulation is stable, the lengthof the simulation (denoted in the column length in Table 30 (in seconds)) should not matter andvice versa.

Type N/K1, K2 length λ1 λ2 E[W1] E[W1]l b E[W1]ub E[W2] E[W2]l b E[W2]ub

Batch 40 106 0.475 0.475 1.3 · 103 1.2 · 103 1.4 · 103 1.3 · 103 1.2 · 103 1.3 · 103

Batch 40 107 0.475 0.475 1.2 · 104 1.2 · 104 1.2 · 104 1.2 · 104 1.2 · 104 1.2 · 104

Batch 50 106 0.475 0.475 89 87 91 89 87 91Batch 50 107 0.475 0.475 90 89 91 90 89 91Batch 40 106 0.2375 0.7125 3.5 · 103 3.4 · 103 3.6 · 103 3.5 · 103 3.4 · 103 3.6 · 103

Batch 40 107 0.2375 0.7125 3.4 · 104 3.3 · 104 3.4 · 104 3.4 · 104 3.3 · 104 3.4 · 104

Batch 50 106 0.2375 0.7125 142 137 148 131 126 136Batch 50 107 0.2375 0.7125 148 146 151 136 134 139

k-limited 25,25 106 0.475 0.475 3.2 · 103 3.1 · 103 3.4 · 103 3.4 · 103 3.2 · 103 3.5 · 103

k-limited 25,25 107 0.475 0.475 3.0 · 104 3.0 · 104 3.1 · 104 2.9 · 104 2.9 · 104 3.0 · 104

k-limited 30,30 106 0.475 0.475 168 154 181 164 150 177k-limited 30,30 107 0.475 0.475 169 164 173 166 161 171k-limited 16,39 106 0.2375 0.7125 27 27 28 2.8 · 103 2.7 · 103 3.0 · 103

k-limited 16,39 107 0.2375 0.7125 27 27 27 2.5 · 104 2.4 · 104 2.5 · 104

k-limited 18,45 106 0.2375 0.7125 30 30 30 196 180 212k-limited 18,45 107 0.2375 0.7125 30 30 30 198 193 203

Table 30: Mean delay and lower (l b) and upper bound (ub) of the 95% confidence interval forthe mean delay in queue 1 and 2 in case of the batch and k-limited algorithm, where lengthdenotes the simulation length in seconds.

78