0% found this document useful (0 votes)
34 views

A Linear Time and Space Algorithm For Optimal Traffic-Signal Duration at An Intersection

A Linear Time and Space Algorithm for Optimal Traffic-Signal Duration at an Intersection by Sameh Samra, Ahmed El-Mahdy, and Yasutaka Wada

Uploaded by

naumanhaider007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

A Linear Time and Space Algorithm For Optimal Traffic-Signal Duration at An Intersection

A Linear Time and Space Algorithm for Optimal Traffic-Signal Duration at an Intersection by Sameh Samra, Ahmed El-Mahdy, and Yasutaka Wada

Uploaded by

naumanhaider007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, VOL. 16, NO.

1, FEBRUARY 2015 387

A Linear Time and Space Algorithm for Optimal


Traffic-Signal Duration at an Intersection
Sameh Samra, Ahmed El-Mahdy, and Yasutaka Wada

Abstract—Finding an optimal solution for traffic-signal control exploits a phase, rather than a time interval, to eliminate many
duration is a computationally intensive task. It is typically O(T 3 ) unnecessary computations, reducing both computation time
in time and O(T 2 ) in space, where T is the length of the control and memory space requirements. As a result, the proposed
interval in discrete-time steps. In this paper, we propose a linear
time and space algorithm for the traffic-signal control problem. algorithm achieves more than 2700 times speedup (determined
The algorithm provides an efficient dynamic programming formu- experimentally) against the original COP algorithm for T =
lation of the state space that prunes nonoptimal states early on. 1024. We choose T to be the nearest powers of two to the
This paper proves the correctness of the algorithm and provides maximum typical traffic time-horizon prediction of 15 min
an initial experimental validation. This paper also conducts a (900 s), with 1-s units [2], [3].
simulation study comparing with other typical control methods.
The results show significant improvement in the average waiting Large cities contain thousands of traffic intersections. Each
time metric with respect to all other methods. constantly needs to compute the optimal control duration for
the real-time traffic load, for every small amount of time
Index Terms—Dynamic programming, optimization, traffic-
signal control. (a maximum of 15 min). Therefore, the computation cost is
substantially high.
I. I NTRODUCTION Another important aspect is the control performance of the
algorithm. Generally, most modern traffic control algorithms

A S the population in large cities increases, the traffic


problem becomes more serious. A classical traffic control
problem is finding the optimal traffic phase duration for an
rely on machine learning, neural networks, and genetic algo-
rithms to decrease the computation requirements of classical
optimal optimization methods. Therefore, we study both the
intersection to ensure the smooth and safe passage of vehicles. computational performance and control performance of our
A classical algorithm for handling this problem is the con- new algorithm.
trolled optimization of an intersection (COP) algorithm [1]. The This paper is organized as follows. Section II discusses
algorithm utilizes dynamic programming to find the optimal related work, and Section III introduces the traffic control prob-
duration for changing real-time traffic patterns. However, the lem. Section IV introduces the new proposed algorithm, and
algorithm achieves a time complexity of O(T 3 ) and a space Section V validates the proposed algorithm. Section VI presents
complexity of O(T 2 ), where T is the length of the control and discusses the experimental results for both the compu-
interval in discrete-time steps. tational performance and the control performance. Finally,
In this paper, we propose a novel algorithm that tackles the Section VII concludes this paper and discusses future work.
same problem while reducing the time and space complexities
into O(T ). The algorithm utilizes an efficient dynamic pro-
gramming formulation of the traffic problem. The formulation II. L ITERATURE R EVIEW
There are many strategies to solve the traffic control problem
efficiently. Asthana et al. [4] surveyed these strategies; they in-
Manuscript received December 16, 2013; revised April 1, 2014 and June cluded dynamic programming, neural networks [5], multiagent
17, 2014; accepted June 19, 2014. Date of publication August 6, 2014; date of systems [6], Petri nets [7], genetic algorithms [8], and fuzzy
current version January 30, 2015. This work was supported in part by an IBM
Ph.D. Fellowship Award. The Associate Editor for this paper was Z.-H. Mao.
logic control [9].
S. Samra is with the Smart City Facility and the Department of Computer The strategies can be characterized by the number of con-
Science and Engineering, School of Electronics, Communications and Com- sidered traffic intersections and how they model the traffic
puting, Egypt–Japan University of Science and Technology (E-JUST), 21934
Alexandria, Egypt (e-mail: [email protected]).
demand and response [10]. A control strategy can produce time
A. El-Mahdy is with the Parallel Computing Laboratory, the Smart plans for a single or multiple interactions, i.e., isolated and
City Facility, and the Department of Computer Science and Engineering, coordinated strategies, respectively. The traffic demand can be
School of Electronics, Communications and Computing, Egypt–Japan Uni-
versity of Science and Technology (E-JUST), 21934 Alexandria, Egypt, on statically determined (offline) using historical demands and is
leave from the Department of Computer and Systems Engineering, Faculty used to produce fixed-time traffic control response strategies.
of Engineering, Alexandria University, 21526 Alexandria, Egypt (e-mail: Alternatively, the demand can be dynamically determined using
[email protected]).
Y. Wada is with the Graduate School of Information Systems, The University real-time measurements to produce adaptive traffic response
of Electro-Communications, Tokyo 182-8585, Japan (e-mail: [email protected]. strategies. Combining these two characteristics, we get four
ac.jp). possible categories of traffic control strategies.
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org. Isolated/Fixed-Time Strategies: This category of algorithms
Digital Object Identifier 10.1109/TITS.2014.2336657 computes the optimal time plan for a single intersection using
1524-9050 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
388 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, VOL. 16, NO. 1, FEBRUARY 2015

the historical estimation of the traffic demand. SIGSET and


SIGCAP are the most famous algorithms in this category.
Isolated/Traffic-Responsive Strategies: This category uses
real-time measurements (via detectors) and predicts the traffic
arrival plan for vehicles to produce an adaptive control time
plan. Miller is an example of these strategies; it constantly
answers the question of whether the green time switching
should happen then or should be postponed to a next time step.
This question is repeated every fixed interval of time. COP [1]
is another example; it uses dynamic programming to find the
optimal solution and is possibly utilized to generate fixed-time
plans for a static input.
Coordinated/Fixed-Time Strategies: This category consid-
ers multitraffic intersections and generates fixed-time control
plans; it is suitable for urban traffic control. MAXBAND and Fig. 1. Example phases at a traffic single intersection.
TRANSYT are examples of this category.
Coordinated/Traffic-Responsive Strategies: This category is Due to the high time and space complexities of dynamic
the most useful for cities; these strategies manage many in- programming strategies, approximate or adaptive dynamic
tersections and use real-time measurements; there are many programming strategies emerged and were used to manage
algorithms and subcategories that belong to this category; multiple intersections. Cai and Le [15] used linear function
these include the Split-Cycle Offset Optimization Technique approximation to reduce computations through transitions be-
(SCOOT), Optimized Policies For Adaptive Control (OPAC), tween states, and reinforcement learning was used to enhance
and the Real-time Hierarchical Optimized Distributed Effective the approximation. The action-dependent heuristic dynamic
System (RHODES). programming (ADHDP) strategy [16] makes use of reinforce-
Dynamic programming is used, generally, to solve optimiza- ment learning and dynamic programming to produce a near-
tion problems, including the traffic control problem. There are optimal solution for multiintersections.
many traffic control strategies that use dynamic programming;
OPAC, Programming Dynamic (PRODYN), and Urban Traffic
III. T RAFFIC C ONTROL P ROBLEM
Optimization by Integrated Automation (UTOPIA) are exam-
ples of these strategies. However, in their current versions, A road intersection can be considered a limited resource.
they generally use approximate strategies [11] to decrease the The traffic control problem at one intersection is how to assign
computation complexity. RHODES [11] is an exception, as it time for each traffic-flow direction to optimize a performance
uses the dynamic programming algorithm COP to get an inter- metric while maintaining a safe passage of vehicles over a time
mediate solution for each single intersection before generating horizon T . Typical optimization metrics include the total num-
a global solution for all target intersections, trading computa- ber of stops, the waiting time, and queue lengths.
tion speed for control accuracy. Adaptive Limited Look-Ahead Fig. 1 shows an example for a traffic intersection. The
Optimization of Network Signals–Decentralized (ALLONS-D) intersection consists of two crossing roads with eight possible
[12] and Adaptive Dynamic Programming Algorithm for Sig- directions, which are numbered from 1 to 8. The combinations
naling (ADPAS) [13] are other algorithms that make use of of nonconflicting directions are called phases, e.g., directions
the dynamic programming methodology. They use decision 2 and 6 construct a phase, as we can give the right-of-way to
trees to get the optimal solution. However, the time and space these two directions at the same time without breaking safety.
complexities of these algorithms are exponential, even with tree Generally, we refer to the set of all possible phases as P and the
pruning. number of phases as |P |.
The closest algorithm to our paper is that proposed by Fang A solution for the traffic control problem is a sequence of
in her Ph.D. thesis [14]. Her algorithm uses a time-oriented phases with a time duration assigned to each phase to maximize
dynamic programming approach. However, the algorithm is a certain performance parameter while taking into consider-
designed for the specific case of three-phase dual intersections ation noncontradicting phases and by assigning a minimum
for two close intersections on a freeway (a diamond inter- duration, i.e., γ, for each phase. This sequence is called the
change). The generalization is left for future research. Her signal time plan. Additionally, after the change of each phase,
implementation is based on selecting one phase as a starting we have a clearance interval r that gives a safe passage chance
phase. Fang’s algorithm and our proposed algorithm use the to the vehicles already crossing the intersection itself. Table I
same concept for selecting dynamic programming states, but shows one example of a traffic-signal time plan after assigning
our new algorithm is general for any number of phases. More- symbols to phases such that directions 2 and 6 are phase A,
over, the new algorithm does not need a supposed phase to start directions 1 and 5 are phase B, directions 3 and 7 are phase C,
from. In addition, Fang’s algorithm does not consider having directions 4 and 8 are phase D.
a clearance interval and a minimum green time, which are The solution depends on the input traffic flows. The assump-
typically required in real-world traffic control systems, such tion here is that the future can be predicted using current and
as RHODES. historical data. Therefore, the input to the algorithm is the
SAMRA et al.: LINEAR TIME AND SPACE ALGORITHM FOR TRAFFIC-SIGNAL DURATION AT INTERSECTION 389

TABLE I TABLE II
E XEMPLAR S IGNAL T IME P LAN A RRIVAL DATA P LAN

number of vehicles arriving to each phase at specific future


times.
More formally, the optimization problem can be formulated
as follows. Define a timing plan Ω to be sequence (p0, t0), where the value of ρ is constrained to prevent a sudden change
(p1, t1), . . . , (pi , ti ) such that in traffic flows without a clearance interval, such that
• pi ∈ P ; 
{0, p}, p = 0
• 0 ≤ i ≤ T; ρ∈ (3)
P, p = 0.
• ti ≥ γ;
• Σi (ti + r) = T . “◦” in (2) is a commutative operator such as sum or maxi-
In addition, define V (Ω) to be the cost function of using mum, depending on the cost function; typical cost functions in-
timing plan Ω. The optimization can be stated as clude maximum vehicle queue lengths and accumulated waiting
time [1]. The optimal cost plan at time t + 1 is therefore
Minimizek V (Ωk )
V (t + 1) = min V (p, t + 1). (4)
p∈P
where we seek to find the timing plan Ωk that gives the
minimum cost function V (), which is indexed by k. It is worth noting that, generally, computing the cost func-
tion, i.e., C(), requires having a predicted vehicle arriving plan.
A typical plan consists of the number of arrival vehicles on each
IV. P ROPOSED A LGORITHM
phase, which is indexed with time (see Table II). Additionally,
We use the dynamic programming (pi , ti ) formulation to find C() needs the queue lengths of the previous state in the case of
an optimal timing plan Ω. For the sake of simplicity, we start minimizing the queue length or the waiting time.
by setting the clearing duration, i.e., r, to 1 and the minimum The cost function is defined as
green time duration, i.e., γ, to 1, and then, we generalize. We 
also extend the traffic phase definition to include the clearance C (S(w, t − 1), p, t) = qi (w, t − 1)
phase, i.e., “0,” where no traffic flows. i

+ (Ai (t)) − min (qp (w, t − 1 + Ap (t), frp )) (5)
A. Base Algorithm i

The time plan can be expressed as sequence p1 , p2 , . . . , where Ap (t) is the number of arrivals in phase p at time t, and
pt , . . . , pT , where pt is a traffic phase for a unit duration frp is the flow rate of phase p per unit of time.
occurring at discrete time t. In other words, the plan defines for At time t = 1, we have no previous state (w = ‘ − ’). There-
each time unit the active phase, including the clearance phase. fore, the queue lengths at this moment will be zeros (or given as
Define V (p, t) to be the cost of the optimal time plan ending initial conditions). From (5), we can deduce that computing cost
at time t and phase p; define C(S(w, t − 1), p, t) to be the cost function C() requires scanning all phases, which is O(|P |).
for operating phase p at time t when the previous phase is w, Dynamic programming thus proceeds in serial stages cor-
and S(w, t − 1) defines the traffic status that is necessary to responding to successive values of time t (serial monadic
compute a corresponding cost metric, such as the queue length dynamic programming [17] with forward recursion). Thus, at
at phase w and time t − 1. The queue length for the phase stage t, we compute V (p, t) for all possible phases p. The
is the sum of all the queue lengths of lanes belonging to the optimal solution requires a final backtracking step to find an
directions of the current phase. S(w, t − 1) can be the queue optimal sequence. We need to keep the S() values for the direct
length of vehicles currently existing in each phase for state w at previous stage only and neglect the other stages due to the in-
time t − 1. Thus herent serial nature of the dynamic programming formulation;
  thus, the computations of current stage states only depend on
S(w, t) = qA (w, t), qB (w, t), . . . , q|P | (w, t) (1) the previous stage states. Therefore, we only need the O(|P |2 )
space to keep the values of S().
where qi (w, t) is the queue length of phase i at currently active To illustrate the core algorithm, we consider three active
phase w at time t. phases (without loss of generality), as depicted in Fig. 2. The
The optimal solution at a specific phase p and time t + 1 can phases are labeled A, B, and C. Each node represents a current
be computed as active phase at a time instance of the traffic intersection, except
 for clearance interval state “0,” where it represents a no-active
C(−, p, 1), t=0 phase. The directed edges between nodes show the possible
V (p, t + 1) =
minρ V (ρ, t) ◦ C (S(ρ, t), t + 1) , t>0 next phases for a current phase. At t = 1, we cannot start with
(2) clearance phase “0,” but any active phase would suffice. At
390 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, VOL. 16, NO. 1, FEBRUARY 2015

TABLE III
E XTENDED P HASE NAMING N OTATION

Fig. 2. Graph representation for a three-phase problem, where |P | = 3, V (A, 3)|ρ=A = 6. We select the minimum cost and set the
r = 1, and γ = 1. predecessor state to be “0.”
Finally, at the last stage when t = T , we have two states
with the same minimum cost, where V () = 4. By applying the
backtracking starting from p = ‘0’, we get (5, “0”). From the
same state, the source phase is B, which gives (4, B), and so
on, to get the whole time plan, which is C, C, ‘0’, B, ‘0’. If
we start from the other optimal state B, we get the time plan of
C, C, ‘0’, B, B, which is also optimal.
The dynamic programming thus requires visiting every phase
at each time unit, computing the associated cost for each
predecessor, and storing the minimum cost. We thus require
3|P | cost computations for every row; the cost computation is
generally O(|P |), and since we have T rows, thus, the total time
complexity is O(|P |2 T ). For each phase, we need to store the
best predecessor phase. Thus, for each row, we store |p| + 1
values and one row of S(), which is O(|P |2 ); hence, the total
space complexity is O(|P |2 T ).

B. General Algorithm
To generalize our algorithm for any value of r and γ, we
expand the number of phases to include the timing constraints.
In particular, we classify the phases into “unconstrained” and
“constrained” phases. Unconstrained phases represent phases
that satisfy the minimum green and clearance constraints and
Fig. 3. Dynamic programming algorithm details for a three-phase problem,
where |P | = 3, r = 1, and γ = 1. are therefore free to change at the next time steps. Constrained
phases are constrained by the minimum duration and thus have
to repeat a corresponding fixed number of times. Phases are
t = 2, we can either keep the same phase or transition to the further classified into active and clearance phases, as in the
clearance phase. At t = 3, a clearance phase can be followed previous case. Table III lists the four possible groups of phases
by any active phase, and each predecessor active phase can and the labeling notation we adopt. Unconstrained clearance
transition into the clearance phase or keep its current phase, and active phases are labeled as “0” and ‘A’, ‘B’, . . ., as before.
and so on. The solution would be finding a path from the first Constrained phases are prefixed by a counter, indicating the
row (t = 1) and ending at the last row (t = T ) such that the number of successive times the phase has repeated so far.
associate cost is minimum. It is worth noting that the total number of phases we use is
To clarify the cost of the optimal time plan computation, we γ|P |r, where r ≤ γ.
explain the following example, where |P | = 3, r = 1, γ = 1, The minimum green time imposes the constraint that at least
and T = 5, as shown in Fig. 3. Moreover, the arrivals are given a phase has to be active for γ units of time. The phase is
in Table II. Each status keeps the values of S(), C(), V (), thus prefixed by a count of the number of time units since the
and predecessor phase ρ. V () expresses the total waiting time clearance phase, and the maximum count value is γ − 1 in time
for all vehicles until that moment. For example, at time = 3 units. A prefix with a value less than γ − 1 indicates that at
and phase = A, there are two predecessors, i.e., phase “0” the next time unit, the phase cannot change; therefore, a next
and the same phase A (circled in Fig. 3). Phase “0” has phase would have the same phase name but with a prefix count
V (‘0’, 2) = 1 and C(S(‘0’, 2), A, 3) = 2, where S(‘0’, 2) = increased by one (or removed if it reaches γ). A phase with no
(0, 0, 1); therefore, V (A, 3)|ρ= 0 = 3. On the other hand, prefix can stay the same or change to the clearance phase at the
phase A has V (A, 2) = 3 and C(S(A, 2), A, 3) = 3; therefore, next time unit.
SAMRA et al.: LINEAR TIME AND SPACE ALGORITHM FOR TRAFFIC-SIGNAL DURATION AT INTERSECTION 391

TABLE IV
P REDECESSOR C ONSTRAINTS

Fig. 5. Supporting variable r and γ values per phase.

be set to the maximum value of rs; 2) for each phase, the


corresponding states will be set with its own γ; and 3) the
preceding state for state “1” phase_name will be the clearance
state with value r associated with its phase.
Fig. 5 shows one example of this situation where r1 = 2,
r2 = 3, r3 = 1, γ1 = 2, γ2 = 3, and γ3 = 1. The dotted arrows
indicate the change we explained earlier.
Another extension to the algorithm is for supporting fixing
the order of the phases. Thus, the algorithm cannot neglect one
phase from the sequence even if it has no vehicle. Such feature
allows for predictable phase change behavior for vehicles.
Algorithms that are phase oriented (such as the COP algorithm
[1]) can support this feature by constraining the phase duration
to be nonzero. For our algorithm, we still support this feature
by simply constraining possible state transitions such that a
previous phase at a clearance interval is to be aware of the next
phases according to the fixed sequence.
For the general problem of having a fixed arbitrary sequence,
it can be formulated as separate problems for each possible
order. The same extension can be applied to phase-oriented
algorithms (such as COP [1]); however, the computation com-
plexity will be multiplied by (|P | − 1)! for generating all
possible fixed sequences.
Fig. 4. General graph representation for |P | = 3, r = 2, and γ = 3.

Our dynamic programming formulation essentially stays the V. VALIDATION OF THE P ROPOSED A LGORITHM
same, with only requiring redefining ρ according to Table IV.
We have conducted a set of experiments comparing the
The table essentially gives the possible predecessor phases for
solutions obtained by the new algorithm and COP; the results
a given phase p.
indicate that our generated sequences have exactly the same
Fig. 4 shows the corresponding graph when |P | = 3, r = 2,
cost as those obtained by COP. However, for generality, we
and γ = 3. The gray nodes in the first level are the initial
develop a correctness proof for our method. We iteratively con-
phases. The transitions between phases follow Table II. The
struct optimal sequences with increasing lengths; we therefore
target algorithm searches for the optimal solution through a
need to prove that, if we have an optimal time plan of length
matrix of dimensions T by γ|P | + r. This is O(|P |T ), as γ
j, then it includes the optimal sequence of length j − 1. It
and r are constants.
then follows by induction that the method generates optimal
Backtracking searches for the phase with the minimum cost
sequences.
in the last stage, with the condition that the phase must be
Let Ψ(j) denote phase sequence p1 , p2 , . . . , pj . Let op-
an unconstrained phase. Then, using the predecessor phases,
erator “ ” be the sequence concatenation operator, which is
recursively, we get the optimal path upon reaching the initial
defined as
stage.
 
Ψ(i) Ψ
(j) = p1 , p2 , . . . , pi , p
1 , p
2 , . . . , p
j . (6)
C. More Supported Features
Theorem: Given Ψ(j) = Ψ(j − 1) pj , if Ψ(j) is an optimal
In the previous two sections, we set r = 1 and γ = 1, and sequence of length j, Ψ(j − 1) is an optimal sequence of
r = 2 and γ = 3, respectively. Although these values of r and length j − 1.
γ are constant for all phases in the current intersection, our new Proof: We prove, by contradiction, that it is not possible to
algorithm also supports variable values for each phase. There- construct an optimal sequence of length j that does not contain
fore, we can have many values of r and γ, i.e., r1 , r2 , . . . , r|P | an optimal sequence of length j − 1.
and γ1 , γ2 , . . . , γ|P | , each associated with a phase. Assume that it is possible to find a sequence Ψ(j) such that
For supporting this feature, we require the following changes subsequence Ψ(j − 1), ending with phase pj−1 , is not an opti-
to our base algorithm: 1) the number of clearance states will mal sequence. Designate Ψ∗ (j − 1) to be an optimal sequence
392 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, VOL. 16, NO. 1, FEBRUARY 2015

Fig. 6. COP’s execution time with curve fitting. Fig. 7. New algorithm’s execution time with curve fitting.

ending with p∗j−1 = pj−1 . Therefore, we can construct a new about 2700 times speedup when T = 1024. The growth rate is
sequence Ψ∗ (j) = Ψ∗ (j − 1) pj , ending with the same phase largely linear for the proposed algorithm and is cubic for COP.
as Ψ(j). Since Ψ∗ (j − 1) has a lower cost than Ψ(j − 1) and Table V summarizes the time and space complexities for both
since they share the last phase (with the same cost), then Ψ∗ (j) algorithms, which were obtained analytically (see Appendix A
has a lower cost than Ψ(j), which is a contradiction as Ψ(j) is for derivation details).
an optimal sequence. Therefore, sequence Ψ(j − 1) has to be The rationale behind the difference in performance among
an optimal sequence.  the two algorithms is worth discussing. Although COP uses dy-
namic programming to obtain the optimal sequence of phases,
it uses phases, rather than time, as stages in dynamic program-
VI. E XPERIMENTS AND R ESULTS ming. The COP algorithm explores the search space in a phase-
In this section, we evaluate two “performance” aspects of our oriented manner, exploring for each phase all possible time
proposed algorithm. Since dynamic programming approaches durations. This imposes a particular (cyclic) phase order and
are generally computation intensive, we study the computation results in a possible (linear) increase in the number of stages,
performance in our system in comparison to COP [1]. As e.g., as the worst case, a reverse phase sequence for phases C,
more recent methods that rely on artificial intelligence and B, and A could result in tripling the number of explored phase
machine learning have emerged to significantly decrease the cycles (e.g., A, B,C, A, B, C, and A, where the underlined
computation complexity, we study the difference on the con- stages are the sought stages, and the other stages would have
trol performance of our method in comparison to such recent time deltas of zero).
methods.
B. Control Performance
A. Computation Performance This set of experiments aims to compare the new algorithm
To evaluate the actual performance (in terms of execution with modern algorithms that implement other methodologies
time) of our algorithm, we have implemented it and the COP such as reinforcement learning, genetic programming, and neu-
algorithm. The implementation is done in C and experimented ral networks.
on an Intel Core2 Duo © 2.10-GHz personal computer with For having a unified methodology to study the control perfor-
2 GB of random access memory. mance, we decided to implement our algorithm into the Green
The traffic control problem, as formulated, has the following Light District (GLD) system [18]. The GLD is a well-known
parameters: the number of phases |P |, the size of the control open-source simulator for traffic-signal control. The system
interval in discrete-time steps T , and the traffic load. For a provides implementation of various traffic control algorithms
single intersection, the discrete-time steps parameter is the and has been used in many earlier studies [19]–[21].
limiting factor in the performance as the number of phases is We used the average junction waiting time to compare be-
constant, and the traffic load has no effect on the algorithm’s tween different control traffic algorithms. The metric expresses
time complexity. the total waiting time over the total passed vehicles over one
We have two sets of experiments. In the former set, we used intersection. We considered two configurations, i.e., one with
the same traffic parameters as the original COP algorithm [1]; three phases and the other with four phases.
we set the number of phases to three, and we used the same We compare the proposed algorithm with the following
traffic load. For scaling T , we change its value in powers of algorithms.
two to be 8, 16, 32, . . ., 4096. • The random method. It is a simple algorithm that assigns
We study the total program execution time against varying random values to each phase regardless of the traffic load.
the discrete-time steps T . Figs. 6 and 7 show the execution time • GenNeural. It is a genetic algorithm for finding neural-
in seconds for COP and the proposed algorithm, respectively. network controllers for the traffic lights. For each traffic
Our algorithm clearly improves the execution time, reaching light, a neural network is encoded in a genetic string. Each
SAMRA et al.: LINEAR TIME AND SPACE ALGORITHM FOR TRAFFIC-SIGNAL DURATION AT INTERSECTION 393

TABLE V
T IME AND S PACE C OMPLEXITIES OF COP AND THE N EW A LGORITHM

TABLE VI
M EAN (μ)AND COV OF THE AVERAGE J UNCTION WAITING T IME
FOR A LL E XPERIMENTS

Fig. 8. Intersections studied using the GLD simulator.

string has a chance to live a certain period, and then, it


reproduces, eventually evolving into better solutions.
• ACGJ3. It is another genetic algorithm. However, it differs
from GenNeural as it directly optimizes the waiting time
instead of generating neural controllers.
• TC1. It is a reinforcement learning algorithm, which min-
imizes the waiting time at a traffic intersection.
The comparison between the aforementioned algorithms is
constructed by monitoring the value of the average junction
waiting time when the experiments’ total cycles equals 900.
We choose 900 as it is reasonably predictable [2], [3]. Fig. 8
shows the two simple maps that were used by the simulator Fig. 9. Average junction waiting time (by cycles) for the three-phase
intersection.
to study. Fig. 8(a) shows a one-intersection configuration with
three phases. Fig. 8(b) shows a one-intersection configuration
with four phases.
For generating traffic, we considered two scenarios. The first
has a “heavy” traffic load, where we set the vehicle spawning
rate to be 0.4. Rates greater than 0.4 result in the system
being unstable. The value is consistent with that reported by
Wiering et al. [20]. We choose another scenario with a “light”
traffic load, setting the spawning rate to 0.25. Such load does
not stress the control algorithms, and it serves to show a rather
simple control problem, thereby testing the other extreme on the
controller’s performance. The vehicles are randomly spawned
with the corresponding rates, as aforementioned. Each exper-
iment is repeated five times. Table VI lists the mean (μ) and
coefficient of variation (COV) of the average junction waiting Fig. 10. Average junction waiting time (in cycles) for the four-phase
time for all experiments run on the GLD. The COV of the new intersection.
algorithm is low in all cases compared with the other algorithm;
thus, the variation does not affect our comparison. Fig. 10 shows the average junction waiting time for the four-
Fig. 9 shows the average junction waiting time for the three- phase intersection example [see Fig. 8(b)]. The average junction
phase intersection example shown in Fig. 8(a). The results waiting time enhancement is better than TC1 by about three
indicate that the new algorithm is superior to other algorithms, times. Although the results are significantly better for our new
particularly in heavy-load experiments, as expected. Although algorithm, we should take into consideration that we assume
the results of the light-traffic-load mode does not have signifi- a perfect traffic forecast. Therefore, the results serve as an
cant enhancement, the average junction waiting time of the new upper bound on the performance. For prediction methods, the
algorithm in the heavy-traffic-load cases is better than the best reader can consult corresponding prediction methods elsewhere
of another algorithm (TC1) by about 2.7 times. [22]–[24].
394 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, VOL. 16, NO. 1, FEBRUARY 2015

complexity is O(|P |(T − γ)). Hence, the total time complexity


of the original algorithm is O(|P |2 T (T − r)(T − γ)).
Fig. 12 shows the main matrix of our new algorithm. For
each cell in the matrix, we generally require at most O(2|P |)
computation steps, as indicated in Table V. However, for the
cell corresponding to state “10”, which has |P | source states,
we require O(|P |2 ) computation steps. By amortized analysis
[25], we can put one credit with each phase to be O(3|P |) and
reduce the computation time complexity of the “10” state to be
O(|P |). Thus, the total time complexity of the new algorithm is
O((γ|P | + r)T |P |).
Fig. 11. Main matrix of COP. The COP and new algorithms’ space complexities are
O(|P |T (T − r)) and O((γ|P | + r)T ), respectively, which are
the sizes of the corresponding matrices.

R EFERENCES
[1] S. Sen and L. Head, “Controlled optimization of phases at an
intersection,” Transp. Sci., vol. 31, no. 1, pp. 5–17, Feb. 1997.
[2] L. Head, “Event-based short-term traffic flow prediction model,” Transp.
Res. Rec., vol. 510, no. 1510, pp. 45–52, Jul. 1995.
[3] B. L. Smith and M. J. Demetsky, “Short-term traffic flow prediction
models-a comparison of neural network and nonparametric regression
approaches,” in Proc. IEEE Int. Conf. Syst., Man, Cybern., Humans, Inf.
Technol., Oct. 1994, vol. 2, pp. 1706–1709.
[4] R. Asthana, N. J. Ahuja, M. Darbari, and P. K. Shukla, “A critical review
on the development of urban traffic models and control systems,” Int. J.
Fig. 12. Main matrix of the new algorithm. Sci. Eng. Res., vol. 3, no. 1, pp. 1–6, Jan. 2012.
[5] M. Saito and J. Fan, “Artificial neural network-based heuristic optimal
traffic signal timing,” Comput.-Aided Civil Infrastruct. Eng., vol. 15,
VII. C ONCLUSION AND F UTURE W ORK no. 4, pp. 293–307, Jul. 2000.
[6] B. Chen and H. Cheng, “A review of the applications of agent technology
This paper has presented a new dynamic programming al- in traffic and transportation systems,” IEEE Trans. Intell. Transp. Syst.,
gorithm to find an optimal phase duration sequence for the vol. 11, no. 2, pp. 485–497, Jun. 2010.
traffic-signal control problem at an intersection. The proposed [7] Y. Huang and T. Chung, “Modeling and analysis of urban traffic lights
control systems using timed CP-nets,” J. Inf. Sci. Eng., vol. 24, no. 3,
algorithm achieves linear time and space complexities; it pp. 875–890, May 2008.
achieves O(T 2 ) performance and O(T ) space enhancements [8] H. Ceylan and M. G. Bell, “Traffic signal timing optimisation based
over the well-known COP algorithm that solves the same on genetic algorithm approach, including drivers’ routing,” Transp. Res.
problem optimally. Consequently, it reduces the computation Part B, Methodological, vol. 38, no. 4, pp. 329–342, May 2004.
[9] M. Trabia, M. Kaseko, and M. Ande, “A two-stage fuzzy logic controller
time and the power, allowing for more scalability for real-world for traffic signals,” Transp. Res. Part C, Emerging Technol., vol. 7, no. 6,
applications. The algorithm improves time and space complex- pp. 353–367, Dec. 1999.
ities by not abiding with a strict (cyclic) phase order and by [10] M. Papageorgiou, C. Diakaki, V. Dinopoulou, A. Kotsialos, and Y. Wang,
“Review of road traffic control strategies,” Proc. IEEE, vol. 91, no. 12,
exploring the solution space in a time-oriented fashion, pruning pp. 2043–2067, Dec. 2003.
many nonoptimal states early on. This paper has provided a [11] P. Mirchandani and L. Head, “A real-time traffic signal control system: Ar-
correctness proof and an experimental evaluation. chitecture, algorithms, analysis,” Transp. Res. Part C, Emerging Technol.,
vol. 9, no. 6, pp. 415–432, Dec. 2001.
Future research includes the integration of our algorithm [12] I. Porche and S. Lafortune, “Adaptive look-ahead optimization of traffic
with coordinated/traffic-responsive strategies such as RHODES signals?” J. Intell. Transp. Syst., vol. 4, no. 3/4, pp. 260–264, 1999.
[11] and parallelizing the algorithm to provide for multiple [13] C. O. Kim, Y. Park, and J.-G. Baek, “Optimal signal control using adap-
tive dynamic programming,” in Proc. ICCSA, vol. 3483, Lecture Notes
intersections control. Moreover, we are currently exploring an in Computer Science, O. Gervasi et al., Ed., Jan. 2005, pp. 148–160,
optimization for enhancing the cost function computation time Springer Berlin Heidelberg.
to O(1) instead of O(|P |) for each dynamic programming state. [14] F. Fang, “Optimal adaptive signal control for diamond interchanges us-
ing dynamic programming,” M.S. thesis, Pennsylvania State Univ., State
College, PA, USA, 2004.
[15] C. Cai and T. Le, “Approximate dynamic programming controller for
A PPENDIX multiple intersections,” in Proc. 12th World Conf. Transp. Res., Lisbon,
Portugal, 2010, pp. 1–23.
Here, we derive the computation complexities for our new [16] T. Li, D. Zhao, and J. Yi, “Adaptive dynamic programming for multi-
algorithm and the COP algorithm. intersections traffic signal intelligent control,” in Proc. 11th IEEE ITSC,
Oct. 2008, pp. 286–291.
Fig. 11 shows the main data structure (matrix) of the COP
[17] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to
algorithm. The matrix dimensions are (T − r) and j, where Algorithms, 2nd ed. Cambridge, MA, USA: MIT Press, 2001.
j depends on the stopping criterion [25], which is |P |T in [18] Arnekoopman, Caezonne, Marcowier and Stsnel, “GLD.” [Online].
the worst case. Each cell of this matrix examines (T − γ) Available: http://sourceforge.net/projects/stoplicht
[19] M. Wiering, J. Van Veenen, J. Vreeken, and A. Koopman, “Intelligent
cells from a previous stage; each previous stage cell requires traffic light control,” Inst. Inf. Comput. Sci. Utrecht Univ., Utrecht,
O(|P |) computation time. Thus, the current cell computation The Netherlands, Tech. Rep. UU-CS-2004-029, 2004.
SAMRA et al.: LINEAR TIME AND SPACE ALGORITHM FOR TRAFFIC-SIGNAL DURATION AT INTERSECTION 395

[20] M. Wiering, J. Vreeken, J. Van Veenen, and A. Koopman, “Simulation Ahmed El-Mahdy received the B.Sc. and M.Sc.
and optimization of traffic in a city,” in Proc. IEEE Intell. Veh. Symp., degrees from Alexandria University, Alexandria,
Jun. 2004, pp. 453–458. Egypt, in 1995 and 1998, respectively, and the Ph.D.
[21] S.-B. Cools, C. Gershenson, and B. D’Hooghe, “Self-organizing traffic degree from University of Manchester, Manchester,
lights: A realistic simulation,” in Advances in Applied Self-Organizing U.K., in 2001.
Systems. New York, NY, USA: Springer-Verlag, 2008, pp. 41–50. He is an Associate Professor with, and the act-
[22] M. Ben-Akiva, M. Bierlaire, H. Koutsopoulos, and R. Mishalani, “Dy- ing Chair of, the Department of Computer Science
naMIT: A simulation-based system for traffic prediction,” presented and Engineering, School of Electronics, Commu-
at the Proc. DACCORS Short Term Forecasting Workshop, Delft, nications and Computing, Egypt–Japan University
The Netherlands, 1998, Citeseer. of Science and Technology (E-JUST), Alexandria,
[23] C. Liu, B. Lu, and J. Wang, “Traffic flow prediction based on wavelet Egypt, on leave from the Department of Computer
analysis, improved genetic algorithm, BP neural network,” in Proc. ASCE, and Systems Engineering, Faculty of Engineering, Alexandria University. He
2014, vol. 10, pp. 1126–1133. participated in the research and development of one of the first research
[24] Z. Sun and G. Fox, “Traffic flow forecasting based on combination of multicore processors, Jamaica. He has been a Visiting Scientist with the
multidimensional scaling and SVM,” Int. J. Intell. Transp. Syst. Res., IBM Center for Advanced Studies, Cairo, Egypt, where he holds six U.S.
vol. 12, no. 1, pp. 20–25, Jan. 2014. patents, with many other patents filed. He is currently the Chair of the
[25] S. Samra, A. El-Mahdy, W. Gomaa, Y. Wada, and A. Shoukry, “Efficient Parallel Computing Laboratory (http://labs.ejust.edu.eg/pcl) and the Smart
parallel implementations of controlled optimization of traffic phases,” in City Facility, E-JUST, carrying out many research projects related to high-
Proc. 11th Int. Conf. ICA3PP Algorithms Archit. Parallel Process. Part I, performance computing cloud and compilation in collaboration with Japanese
Melbourne, Vic., Australia, Oct. 24–26, 2011, pp. 270–281, Springer. and French institutes. He has also established a research cloud prototype at
E-JUST. His research interests include multicore architecture and program-
ming, analytical performance modeling, and computer graphics.
Dr. El-Mahdy is a member of the Association for Computing Machinery.
He was a Co-organizer of the first conference on multicore technologies in
the region [International Forum on Next-Generation Multicore/Manycore Tech-
nologies (IFMT) in 2008]. He was also invited to serve on the Technical Pro-
gram Committee of Architecture of Computing Systems (ARCS) conferences.
His projects are/have been funded by many funding bodies including IBM,
Amazon, Information Technology Industry Development Agency, and The
Egyptian Academy of Science and Research.

Yasutaka Wada received the B.S. and M.S. de-


grees in electrical engineering and the Ph.D. degree
Sameh Samra received the B.Sc. and M.Sc. degrees in computer science and engineering from Waseda
from Alexandria University, Alexandria, Egypt, in University, Tokyo, Japan, in 2002, 2004, and 2009,
2004 and 2010, respectively. His Master’s degree respectively.
was about the accuracy enhancement of the multi- From 2006 to 2009 he was a Research Associate
ple sequence alignment algorithm (ClastalW). He is with the Department of Computer Science and Engi-
currently working toward the Ph.D. degree in the neering, Waseda University, where he was a Junior
Department of Computer Science and Engineering, Researcher with the Advanced Multicore Processor
School of Electronics, Communications and Com- Research Institute from 2009 to 2010 and an Assis-
puting, Egypt–Japan University of Science and Tech- tant Professor with the Graduate School of Funda-
nology (E-JUST), Alexandria, Egypt. mental Science and Engineering from 2010 to 2012. From 2010 to 2012 he was
He is working in intelligent traffic control systems also an Associate Professor with the Egypt–Japan University of Science and
under the umbrella of the Smart City Facility, E-JUST. Moreover, he was a Java Technology (E-JUST), Alexandria, Egypt. Since 2012 he has been an Assistant
Developer for six years, mainly in two large national projects, i.e., Smart Port Professor with the Graduate School of Information Systems, The University of
Automation, which manages Alexandria and Adabia maritime ports in Egypt, Electro-Communications, Tokyo, Japan. His research interests include parallel
and the Egyptian National Railways, which is responsible for tickets booking. processing and applications, parallelizing compilers, and multicore processor
His research interests include parallel processing, dynamic programming, and architecture.
bioinformatics. Dr. Wada is a member of the Institute of Electronics, Information and
Mr. Samra has successfully obtained the prestigious IBM Ph.D. Fellowship Communication Engineers, the Information Processing Society of Japan, the
for three consecutive years. IEEE Computer Society, and the Association for Computing Machinery.

You might also like