Notes and Links
CSIM is written in the object-oriented programming language Python™, which allows CAVWAY component functions and CAVs to be characterized in enough detail to reflect system design decisions. The underlying philosophy of CSIM is to maintain stable definitions, to the extent practical, of the classes which represent system components and functions, while achieving variability through parameters.
Clock and Scheduler
A simulation clock and an event scheduler are include in CSIM to transform it into a discrete-event simulation. Python includes an organic random-number generator which enables CSIM to schedule some events, such as malfunctions, at random times.
CSIM classes and objects are shown in the class table which may be viewed by clicking on the icon at right.
Care has been taken to separate the functionality of the various classes. For example, CC may determine that it is necessary for a CAV to change lanes, but the CAV decides when it is safe to do so.
The CSIM approach is to keep these classes stable as long as they continue to reflect a working view of CAVWAY and CAV functionality.
CSIM Parameters fall into these groups: scenario parameters, such as update intervals, which govern the running of scenarios; CAVWAY parameters, which describe the topology of CAVWAY locations, numbers of lanes, etc.; and events, both periodic and random (see discussion at right).
Graphical User Interface
Classes and Objects
During operation, CSIM first performs the current event(s) and then advances the simulation clock to the time of the next scheduled event.
Periodic events are repeated at constant time intervals. During one periodic event, traffic updates performed at intervals (set by a parameter), CAVs move forward to reflect the distance traveled since the previous update, move from their current lane to an adjacent lane if called for by a lane-change protocol, etc. The great majority of CSIM events are periodic.
Random events are performed one time. Although they are specified by parameters (which indicate the type of event), CSIM uses Python-supplied random-number computations to schedule them at random times.
Objects are instantiations of classes; a class comprises attributes (data) and methods (functions) and gives structure and functionality to the objects of that class.