A CA-Based Model for City Traffic Including Bicycles

Questions concerning the possible mechanisms and ultimate utility of a modal shift towards alternatives to motorised transport in the developed world represent an important topic within the context of the very current problem of ‘greening’ urban environments, in addition to their relevance with respect to health and social aspects of transportation. The study of physical properties of traffic through measurements and modelling is essential to forming a comprehensive view of a transportation system’s characteristics for any purpose, from day-to-day traffic management to long-term urban planning, and can play an important role in the planned inclusion of non-motorised traffic in cities. The focus of our work is on cycling in Dublin which is, like other old cities in Europe, characterised by relatively dense networks of narrow streets and little flexibility with regard to infrastructure. This chapter presents a simulation model suitable for the study of heterogeneous traffic on urban networks and its application to conditions similar to those present in Dublin, where bicycle traffic is sparse, road sharing with positional discipline is the most common form of bicycle-traffic inclusion and dedicated infrastructure and bicycle-related controls are absent.


Introduction
Questions concerning the possible mechanisms and ultimate utility of a modal shift towards alternatives to motorised transport in the developed world represent an important topic within the context of the very current problem of 'greening' urban environments, in addition to their relevance with respect to health and social aspects of transportation.The study of physical properties of traffic through measurements and modelling is essential to forming a comprehensive view of a transportation system's characteristics for any purpose, from day-to-day traffic management to long-term urban planning, and can play an important role in the planned inclusion of non-motorised traffic in cities.The focus of our work is on cycling in Dublin which is, like other old cities in Europe, characterised by relatively dense networks of narrow streets and little flexibility with regard to infrastructure.This chapter presents a simulation model suitable for the study of heterogeneous traffic on urban networks and its application to conditions similar to those present in Dublin, where bicycle traffic is sparse, road sharing with positional discipline is the most common form of bicycle-traffic inclusion and dedicated infrastructure and bicycle-related controls are absent.
The incorporation of multi-modality into traffic flow models, whether microscopic or macroscopic, theoretical or simulation-based, is a task of increased complexity in comparison to the mode-homogeneous case.This stems from differences in spatial occupation, speed, driver/rider behaviour and other transport mode properties.The concrete questions that arise are those of spatial representation, behaviour and inter-mode interaction modelling and all of these feature strongly where heterogeneity is due to the presence of bicycles.The predominantly urban setting of motorised/non-motorised traffic mixes adds to the modelling challenge, as intersection-based manoeuvres and interactions also need to be taken into account.
Bicycle and bicycle-motorised mixed traffic have a number of aspects that have been of interest to researchers.The characteristics of bicycle-only flow and related road capacities have been studied since the 1970s.This work, aimed at determining the bicycle flow fundamental diagram and defining levels of service, is reviewed in [3].The authors present a cellular automaton bicycle-only flow model of their own, verified by means of data collected by the authors.Another cellular automaton model of bicycle-only flows, with multiple occupancy of cells and slow/fast distinction between cyclists is presented in [5].Forms of heterogeneous flow that includes bicycles differ widely, depending on infrastructure and on locality-specific rules and customary behaviour.Corresponding models are, consequently, very diverse.The authors of [6] review a number of models aimed at representing the broadly heterogeneous traffic of Indian cities, all employing space-continuous simulation, either in a stretch-of-road or network context.Work described in [2] was aimed to develop a feature-rich lane-based network model using car-following rules, different for cars and bicycles.The model was validated in terms of volumes at multiple points in a sample real network.The authors introduce the idea of bicycle-motorised vehicle interaction event counters, but do not report on any conclusions drawn from such data.More recent models of highly mixed traffic flows [4,8] employ multi-cell occupancy cellular automata.These models, while not applied by the authors to traffic including pedal-cycles, do take into account motorcycles and three-wheelers and could easily include non-motorised traffic in the modelled mix.
Interactions between bicycles and motorised traffic can be classified into 'lateral interference' and 'cross-flow' interactions.The former occurs where bicycles and motor vehicles are moving side-by-side and affect each other in some way, primarily by inducing deceleration in the other type of vehicle.The latter refer to interactions arising, from bicycle flows intersecting with motorised flows, in circumstances created specifically by the presence of bicycles.A typical instance of this is the situation where cars turning off to the near side from the middle of a two way street 1 are in conflict with bicycles sharing the road and continuing straight ahead.The 'lateral interference' type of interaction is dealt with in [11], where an optimal velocity model is extended by the inclusion of a friction component, which accounts for the effect of pedestrians on cyclists and cyclists on motorised vehicles, each mode belonging to a distinct but spatially adjacent flow.In [1], spatially fine grained cellular automata are used to model interactions between a multi-lane bicycle stream and an adjoining car stream.The interference of bicycles with the car flow is expressed through a higher probability of cars slowing down when faced with 'friction' or 'blockage'.'Cross-flow' interactions are examined in [14].Here empirical data is used to quantify bicycle flow in a wide lane in terms of distribution, critical gap and follow-up times.A logit model is suggested for the derivation of right-turning car flows as a function of the bicycle arrival rate.In [7] that same scenario is investigated with the cellular automaton model of [5], where a single cell can be occupied simultaneously by multiple bicycles.While simulation updates here are synchronous in general, instances of conflict between flows are resolved using a sequential subgrouping of updates affected by the conflict: the update sequence is decided stochastically, using probability weighting that is an integral part of the behaviour model.The study of interactions between left turning bicycles and straight moving cars on a two-way street in [13] uses a two-dimensional optimal velocity model.In the combined forecasting model presented in [10], interactions are accounted for through link impedance functions whereby higher bicycle flows increase the impedance of motorised flows and vice versa, with dramatic effect in terms of general flows in the network.
The simulation model presented here is based on cellular automata (CA) and includes elements of interaction between bicycles and motorised vehicles of both the 'lateral interference' and 'cross-flow' type.These are represented using a general modelling framework, which we have defined for the systematic construction of network models with the one-dimensional CA space as basic building block.An intersection of two one-way streets is used as an example of the model's application and corresponding simulation results are presented in diagrams of a type that provides a comprehensive view of interactions between individual flows involved in the simulation scenario.
Section 2 describes the simulation model while Section 3 details the model's application to a scenario of bicycle-car road sharing on two intersecting one-way streets.The output of the scenario simulation is also discussed.Section 4 summarises model performance and insights gained and discusses directions for future work.

Model
The modelling of traffic has three immediately identifiable aspects: the spatial one, which represents the road network and it's occupancy by vehicles, that of traffic participant behaviour within the spatial context and, finally, the control aspect, which seeks to mimic traffic management features, introducing additional constraints for the behaviour model.Each of these aspects is described in a separate subsection.

Spatial model
The modelling framework has been described in [12] and rests on the idea of representing each network route of interest in the model, for any vehicle type, as a one-dimensional cellular automaton (CA) space or OCAS.Road network intersections can, consequently, be seen as a group of individual conflicts, each involving exactly two OCASes.From the point of view of representing heterogeneous traffic, this spatial model has two favourable features: (1) it allows the use of CA systems with differently sized cells, facilitating the representation of different vehicle types and (2) it defines an implicit topology based on vehicle routes, as opposed to infrastructure, which is important in the case of bicycles as these are often involved in cross-flows with motorised traffic on the same road.From the point of view of network traffic simulation, the model's spatial description language (convergence and divergence of OCASes) takes the form of network topological data, simplifying the network's description and the definition of navigation rules.
The spatial representation is built from a sketch of the modelled real space, including the routes for various vehicle types that are to be included in the model and their breakdown into cells.The description of the model is extracted from the sketch and formalised using the following set of constructs.
1. OCASes -one is defined in the model for each route taken by any type of vehicle.Each OCAS consists of a string of cells of equal size with the following associated properties: • cell size, which can differ between different OCASes in the model, depending on the vehicle types being accommodated • length (in cells) • turning points, each expressed as the index of the first cell of the OCAS section representing the turn or bend 2. 2-OCAS conflict -one is defined for each point where two routes meet, either to converge or to intersect.It is expressed through start and end cell indices in each of the two OCASes, demarcating two OCAS conflict sections.The last cell before a conflict section is that one beyond which a vehicle on the containing OCAS should not proceed without checking for vehicles approaching the conflict on the other OCAS, if it is to ensure no crash.A conflict section itself represents that part of the road that must be cleared to ensure that vehicles on the other OCAS in the conflict can move unimpeded.

81
A CA-Based Model for City Traffic Including Bicycles www.intechopen.com3. OCAS divergence -one is defined for each point where more than one OCAS "part ways".In many cases, OCASes will be identical over much of their route, but diverge at some point.A divergence can involve 2 or more OCASes.4. 2-OCAS behaviour-based relation -these are defined for pairs of OCASes whereby the behaviour of vehicles in one OCAS is affected by the presence of the other OCAS and its vehicle occupancy.The relation may be one-or bi-directional between the OCASes.An example of the latter is a two-lane road with lane changing allowed. 5. Cell overlap instances -each overlap between two cells in the natural-space sketch is recorded as part of the model.Apart from the case of superimposition between different OCASes, overlap of cells is allowed within a single OCAS and in that case is used to model the difficulty of a turn.

Example cases
Now the use of the spatial constructs described above will be demonstrated on the examples of a one-way street shared by bicycles and cars, shown in Figure 1, and an unsignalised intersection of two such one-way streets, shown in Figure 2. What follows are spatial model specifications corresponding to the pictures of the two elements.Stretch of road spatial specification: 1. OCASes: 2 (1 car OCAS and 1 bicycle OCAS, described in Table 1    The OCAS named in the heading of the corresponding column is the view owner, while the OCAS named in the heading of the corresponding row is the other OCAS in the conflict.The conflict view type and OCAS conflict section of the entry both pertain to the view owner OCAS.Conflict view types are "across from left" (AFL), "across from right" (AFR), "merge from left" (MFL), "merge from right" (MFR), "across cut left" (ACL) or "across cut right" (ACR).The cell range of the OCAS conflict section is given in the form <start cell index>-<end cell index>, where both indices are non-zero natural numbers, i.e. the first cell is numbered 1 etc.

Control model
Control, for the purposes of our model, is defined as any rule, device or object used to place a constraint on how traffic participants behave, generally with the aim of avoiding accidents and improving traffic performance.Control can affect a traffic system in diverse ways, thus being 'insertable' into the model in different places and in different forms.Of immediate interest, however, is control relating to conflict resolution.
The resolution of conflicts in the case of the intersection of two one-way streets can be realised by: (a) using traffic lights or (b) defining a priority rule.Giving full priority to the south-to-north flow and giving it to the east-to-west flow are two possibilities: these are not equivalent, which they would be in the case of homogeneous traffic that always travels straight ahead.

Participant behaviour model
The vehicle behaviour model is based on the Nagel-Schreckenberg (N-S) update rules [9].What follows is a formulation of those rules using a combined velocity-limiting value, since this limiting value is the focus of the modifications to N-S described herein.
0. Determine the combined velocity-limiting value: Table 5. Velocity limits on approach to turn/conflict/bicycle, chosen so as to allow vehicles to reach the velocity of 1 at the last cell before turn/conflict/bicycle, while decelerating, at most, by 1.The table is for maximal velocity, v MAX , of 3 for cars and 2 for bicycles.The numbers in the header row represent the number of steps ahead that would cause entry into turn or conflict or bring a car beside a bicycle.The infinity symbol is used to denote the particular factor does not limit the velocity at the given distance.
the velocity update rules (1-3) are applied to all vehicles in the simulation, then the position update rule ( 4) is applied to all the vehicles.
Our model is based on these rules, adapting them, as described in the following sections, to the spatial model definition method laid out in Section 2.1.

Three factors are added to contribute to the combined velocity-limiting value:
a) proximity of an intersection at which the vehicle is going to turn b) proximity of an unresolved conflict c) (in the case of cars only) the longitudinal proximity of a bicycle in an OCAS adjoining the car's OCAS The combined velocity-limiting value becomes: where d Ti is the distance from the i th vehicle to the nearest turn ahead, d Ci is the distance from the i th vehicle to the nearest unresolved conflict ahead, d Bi is the distance from the i th car to the nearest bicycle ahead in the adjoining bicycle OCAS and v LT (), v LC () and v LB () are the velocity limits respectively imposed by the three factors, as functions of the relevant distance.The values of v LT (), v LC () and v LB () for applicable distances are shown in Table 5.The conflict resolution methods depend on the control layer of the system, i.e. on the particular rules in place for a scenario, and are discussed in Section 3. 2. Instead of looking for the nearest vehicle ahead, a vehicle checks for cell impingement.
Because of the possibility of overlap between cells, particularly at intersections, a vehicle moving along an OCAS must check not only if a cell ahead of it is unoccupied but also if all the cells that overlap it are unoccupied.The number of unimpinged cells ahead of the i th vehicle is denoted d Ui .The implementation of this rule makes use of a cell overlap table, such as the one in Table 3, to look up cell overlap instances.3.While the previous two changes simply assign new meaning to variables used by the N-S rules, there is a need for the introduction of a new rule to handle network navigation: Rule 5: If a divergence lies ahead of the vehicle, at a distance at which slowing down for a turn would have to take place (see Table 5), the vehicle must decide which of the diverging routes it will take.
The decision method will depend on the simulation scenario.4. The rules are applied to both bicycles and cars.Each type of vehicle has a separate v MAX value.

Example simulation scenario and results
This section is organised into three sub-sections.The first one contains a description of the example scenario, while the other two discuss the result format and the actual results.

Simulation scenario
The simulation space consists of the intersection of two one-way streets, for which the model was derived from Figure 2, and four stretches of road, each modelled using Figure 1.The stretches of road are connected to the open ends of the intersection, all together forming the shape of a plus sign (+).In this way, each OCAS in the intersection part of the model is extended before and after, by 50 cells if it is a car OCAS and by 100 if it is a bicycle one.Vehicles enter the simulation space from the east and the south and leave it at the north and west, the direction of their movement through the intersection matching the arrows in Figure 2.
The insertion of vehicles into the scenario space is carried out as follows: at each time step, for each OCAS on the south and the east stretches of road a new bicycle(car) is created with probability p IB (p IC ).An attempt is made to insert it, with velocity v MAX − 1, at the farthest cell closer than v MAX to which the path is not obstructed (i.e. the farthest cell i < v MAX for which all cells in range [1,i] are unimpinged).If cell 1 (the first cell of the OCAS) is impinged, the vehicle is discarded.Vehicles arriving at the end of the north and west OCASes "fall off the edge" as if the OCAS were extended indefinitely and there were no vehicles on the extension.Fig. 3. Illustration of vehicle insertion method.Two numbers are shown in each cell: the cell's index (above) and an insertion ordinal number (below, in brackets).The arrow indicates the direction of insertion, which is first attempted onto cell with insertion ordinal number 1, then into cell with insertion ordinal number 2 etc.The picture also shows the cell range, which must be fully unimpinged for insertion onto position i, with ordinal number v MAX − i, to succeed.
With regard to control, two cases were simulated: where the priority is given to the south-to-north flow, by imposing the LHS rule (called this since it entails giving way to vehicles arriving from the left), and where priority is given to the east-to-west flow, by imposing the RHS rule.• The results used are the average flow values on each of the 8 OCASes for each simulation instance.A simulation instance was run for each combination of insertion probabilities and the applied values were 0.0 ≤ p IB ≤ 0.7 and 0.0 ≤ p IC ≤ 0.7, with step 0.2, for each OCAS2 .• Each simulation instance, based on its calculated R, is assigned to a 'slot', s V ∈ N 0 ,s u c h that 0.1s V ≤ R < 0.1(s V + 1).• The insertion probabilities for each OCAS are averaged over the simulation instances in each slot.• The diagram is drawn so that a column over each slot shows the corresponding average insertion probabilities calculated in the previous step.The column is divided into sections, one for each OCAS, and its depth of shading indicates the number of simulation instances assigned to the slot (darker for higher numbers).

Discussion
The general pattern of lower inputs resulting in better realisation holds, unsurprisingly, for all the diagrams.Also, when analysed visually, the diagrams show that, on average, bicycles fare better with the RHS rule, in that their flow realisation is higher than that for cars, while with the LHS rule the two types of vehicle have more similar average realisations.This can be concluded from the fact that the darker areas for bicycles in RHS rule simulations (Figure 4b) appear at higher realisations than for cars (Figure 4c) and at similar realisations (Figure 5b and c car flows are largely constant across all bicycle realisation values (Figure 4b), showing that bicycles are not affected by cars moving in the SW and SN directions.In the LHS rule case, SW car flows have a big impact on the overall and car flow realisation (Figure 5c) but not on that for bicycles (Figure 5b).An interesting piece of information that can be gleaned from the diagrams is that the very low realisations for cars and bicycles do not coincide in any of the simulation instances, as the diagrams in Figures 4a and 5a do not contain any realisation values below 0.14.

Conclusion and future work
This chapter has described a cellular automaton (CA) based framework for modelling heterogeneous traffic on networks.The main focus in the design of the framework was preservation of the simplicity of traffic participant behaviour rules used in CA models, even in the complex space of a road network traversed by heterogeneous flows.This has been achieved by placing the bulk of the problem's complexity in the specification of spatial relations between vehicle routes, which are in themselves simple (one-dimensional CA systems).This approach emulates the real life property of traffic participants whereby they are able to navigate networks unknown to them in advance, by looking around and reacting consistently to a number of streams of other traffic around them, as opposed to approaches that derive specific interaction rules for each road feature such as an intersection.
It also provides a method for systematic derivation of model data from the geometry of a network feature, allowing for extension facility, in spite of the complex nature of the modelled scenarios.Finally, it eases implementation maintenance, as the extensions to the model are simply in the form of data sets added to a catalogue of modules.The results of numerous simulations are summarised in diagrams showing insertion rate combinations, as a function of flow realisations, and are the outcome of a search for a clear way of providing a single overall view of an intersection's performance.Future work will be based around larger network scenarios, following the application of the modelling framework to additional network elements.Comprehensive network flow data, especially for combined bicycle-motorised traffic, is hard to obtain, hence the meaning of the results and their qualification with respect to model parameters will be predicated on a combination of available data and theoretical analysis.The ultimate aim is improved understanding as to how co-dependence between network topology/road geometry on the one hand and vehicle flows on the other can differ between the motorised only case and that of a heterogeneous mix including slower and more vulnerable participants, that is, bicycles.

Fig. 1 .
Fig.1.Spatial model graphical representation for a stretch of road which is wide enough for motorised/bicycle road sharing in the form of two side-by-side streams, with the assumption of positional discipline.OCASes to model the road stretch are drawn into its geometry for the Irish left-hand-drive rule, without loss of generality.The particular road example is 50(100) cells long for cars(bicycles).

Fig. 2 .
Fig. 2. Spatial model graphical representation for an intersection of two one-way streets, each wide enough for motorised/bicycle road sharing in the form of two side-by-side streams.OCASes to model the intersection are drawn into its geometry for the Irish left-hand-drive rule and can be named BSN, CSN, BEW, CEW, BSW, CSW, BEN and CEN (bicycle south-north, car south-north etc.) without loss of generality.The CSW and CEN OCASes are indicated with two different shades of gray.The division of OCASes into cells is shown for the BSW and BEN OCASes, with the use of different hatching patterns.

Fig. 4 .Fig. 5 .
Fig. 4. Overall input as a function of: (a) overall (b) car and (c) bicycle flow realisation (flow per input), for intersection of two one-way streets with east-to-west priority (RHS rule).

Table 1 .
OCAS descriptions for spatial elements shown in Figures1 and 2.

Table 2 .
Conflicts for two one-way street intersection.The table is a matrix in which each pair of entries at symmetrical positions are two different views (one from each involved OCAS) of the same conflict.Entry format is <conflict view type>(<cell range of the OCAS conflict section>).

Table 3
4. Vehicle motion: each vehicle is advanced v i cells where i is an identifying index of the vehicle to which the rules are being applied, v CL is the combined velocity-limiting value, v MAX is the maximal velocity for the vehicle type, d i is (1)ell overlap table for intersection of two one-way streets.Cell names take the form <B|C><two-letter direction><cell number>, where the first letter (B or C) indicates a bicycle or car OCAS, the two-letter direction is SN, SW, EW or EN and cell number is a non-zero natural number.Each cell in the spatial model is associated with a column and with a row.The table entries indicate whether the cell associated with its row and the cell associated with its column overlap(1)or not (0).The matrix corresponding to the table is, as expected, symmetrical.Divergence List

Table 4 .
List of divergences in intersection of two one-way streets.Each divergence is given an identifying number and is associated with the list of OCASes that diverge.The index of the cell at which the divergence occurs for each OCAS is given in parentheses.thenumber of free cells to the nearest other vehicle ahead of vehicle i and v i is the velocity of vehicle i.The variables are dimensionless: distance is measured in cells and velocity in cells per time step.The update is performed in parallel, which means that in each time-step Any vehicle giving way employs a 'soft yield'.This means that it inspects the conflicting OCAS for any arriving vehicles and if it deduces, based on the other vehicle's velocity, distance and the rules for vehicle behaviour, that the other vehicle cannot, in the next time step, reach a cell that overlaps with it's own path, it advances.The inspecting vehicle thus avoids crashes but does not attempt to clear the intersection quickly enough to ensure not to obstruct other vehicles.is the set of OCASes for which the realisation, R, is being calculated, o is an OCAS identifier, q o is the flow on OCAS o and p Io is the insertion probability for OCAS o.While this value does not have a physical meaning, it can aid the understanding of how successful a scenario is in serving the arriving vehicles.Higher values of R are, indeed, more favourable.Figures 4 and 5 each show three diagrams, one for each OCAS set of interest, those sets being: all OCASes, car OCASes and bicycle OCASes.What follows is a description of how a single diagram is produced.