Road Traffic Simulation on a Small Computer

M. H. Beilby
1972 Computer journal  
This paper describes the design of a computer program package to simulate road traffic movement. Because it requires speed and versatility of operation it is written in a machine language on a small computer. A number of techniques have resulted that cope with searches of a moving store pattern, interpretation of stored information, and operation of a package for a wide range of alternative programs. (Received June 1971) Simulation of traffic movement has already received much attention in the
more » ... ontext of road traffic engineering. The approaches vary mainly on account of the choice of the basic model of vehicle behaviour and the task the simulation performs. From the point of view of computing they can be divided according to (a) whether the structure is based on the formation of vehicle queues at road junctions or on the mechanics of driver-behaviour at every point along the road and (b) whether the vehicles are identified or treated uniformly. The queueing approaches have been tackled using high-level software (Story, 1970) and special purpose hardware (Hartley and Green, 1965) while a compact bit representation of road vehicles has provided simulation of driver-behaviour on uniform vehicles (Codd and Fuehrer, 1967) . However, the representation of driver-behaviour on identified vehicles does present practical problems of operation speed and information storage that tend to restrict it to particular road situations, as have been listed in a review article by Fox and Lehman (1967) . The present paper discusses how it is possible to exploit the mechanism of a small computer to construct a general program package for this type of simulation. The basis of the simulation will be a model that links movements of vehicles along the road. There are a number of theories about driver-behaviour that help do this. They usually relate current acceleration of a particular vehicle to the recent history of speeds and positions of those vehicles geographically in front, to the parameters associated with the vehicle itself and to those describing the surrounding road. An example is a driver on a single lane road who chooses his acceleration according to the distance separating him from the vehicle ahead. When he is a considerable distance behind, his aim might be to accelerate as quickly as the vehicle's performance and the road speed limit allow, while, when very close, he would be expected to brake to avoid a collision. For the intermediate distances he could well be satisfied with 'cruising' along on the basis of relative speeds, and the full behaviour summarised as when d 2 > s n > d v min O^ -wj, a 2 (l 2 -wj] when s n > d 2 with s n+ 1 = s n + v n -u n where u n and v n are the speeds of the current vehicle and the one ahead at the «th update interval, s n is the distance separating the two vehicles, m the reaction lag for the driver and b, k, a u a 2 , /, and l 2 are constants representing maximum braking, the sensitivities of the driver to relative speeds, the ability of the vehicle to accelerate, and the speed limits for the road and vehicle. The calculations are relatively simple but must be systematically repeated for each vehicle as the simulation proceeds. The program involves a cyclic scan round the road. It searches for vehicles, collects information and, at the same time, updates variables associated with each vehicle according to the formulae. The difficulties lie in quickly finding the moving vehicles and extracting the appropriate information for the calculations. To place the problem in perspective, consider an example of the simulation of a 1 mile length of four-lane road. The road would typically contain representations of intersections, parked vehicles, bus stops and an average 300 moving vehicles at any one time. Studies of traffic flow might be required over a 30 minute period. As such, operation time of the program will have to be of the order of real time to prove a practical exercise in terms of computer usage. This is particularly important when it is recognised that a number of repetitions are usually required of the simulation. Now, to represent driver-behaviour, the update time will be centred on the driver-reaction lag, about 1 second, and the calculations will require the continued storage of positions, speeds and accelerations. Appreciable error effects from discontinuities of the simulated movement and roundingoff in the variables are only avoided if scans are made at least every $ second and position recorded to an accuracy of \ ft. Therefore the design target of the program must be to find and operate on each vehicle within a run time of the order of i/300 sec. = 800^i sec. and carry position variables with each vehicle to an accuracy of at least £ ft in 4 x 1 miles, i.e. 1:85,000 approximately. It becomes apparent that the practicality of tackling this category of traffic simulation hinges upon the design of the software to reduce run-time and pack information into limited storage space. Fig. 1 shows a road intersection that can be considered as part of a larger street network. The scan is shown passing along a main road lane collecting information and operating on vehicles. The diversions down the side lanes collect turning vehicles and record the positions of the vehicles on the intersecting road for the driver-behaviour formulae. Representation of road vehicles
doi:10.1093/comjnl/15.2.134 fatcat:lnb4vsm2qbboddesoqid6qxqxa