Model for a vehicle in a traffic simulation.
Each vehicle has its own unique immutable id which is assigned when the vehicle is created.
A vehicle has a size, given by its length and width.
A vehicle has the kinematic attributes of position, velocity and acceleration. A vehicle's position is given by the position of the front of the vehicle on the road segment and also by the vehicle's lane.
A vehicle possesses two intelligence modules:
- a LongitudinalModel which determines its acceleration in the direction of travel.
- a LaneChangeModel which determines when it changes lanes.
Vehicles are quite frequently created and destroyed, so by design they have few allocated properties.