## 4 The Simulation Framework
### Driver Behaviour and Traffic Profiles  
Since its inception, one major design requirement for the simulator was that it should model realistic vehicle kinematics, especially in the way of how real drivers behave. To accomplish this, four different driving style dimensions were identified, which model the main aspects of driver behaviour. These dimensions are described as the following properties:  
* securityDistanceToObjectAhead: typical security distance that the driver keeps to the object ahead (other vehicle, traffic light) in meters.
* reactionTime: Typical reaction time of the driver, in seconds; an example is when a traffic light turns green or when a stopped car ahead starts moving. This property is crucial to mimic the inertial effect observed in a lane of stopped vehicles, when the first vehicle starts moving.
* driverAggressivity: A value from 0 to 1, which models the way of how the driver uses the performance capabilities of the car (acceleration and braking). A value of 1.0 means that the driver uses the full acceleration and braking power of the vehicle.
* speedLimitComplianceFactor: A value around 1 that represents how the driver respects the speed limits. A value of 1.0 means that the driver scrupulously respects the speed limit; 1.1 means that they exceed the limit by 10%; 0.9 means that they drive 10% below the speed limit.  
In a simulation, each vehicle can be associated with a different, unique driver profile. This profile can be created randomly within a normal distribution around a typical value, which results from the direct observation of typical driver behaviour at the intersection.  
This randomness, combined with the diversification of the vehicle's characteristics, means that the probability of having two vehicles exhibiting the same behaviour is kept very low. This uniqueness not only tries to replicate the randomness that is observed in real traffic, but also ensures that there are no unexpected simulation effects of having several vehicles exhibiting the same behaviour.  
To test and compare different routing strategies in the same conditions, the framework allows creating and testing traffic profiles. A traffic profile is a file associated with a lane, which defines when a vehicle enters that lane, its type and characteristics, and the driver profile as well.  
The traffic profile files are generated using a specific tool of the framework, which creates a profile file from a set of statistical characteristics obtained from the real traffic patterns observed at the intersection. The tool generates a random distribution of vehicles of different types, different characteristics, and a random driver profile for each vehicle. This randomness ensures that each vehicle has a unique, individual behaviour, thus avoiding the eventual unexpected effects of having a set of vehicles with the same behaviour in the lane. Moreover, the direct observation of the intersection revealed this kind of randomness in the real traffic.  
The tool that generates the traffic profiles requires the following parameters: estimated number of vehicles per hour, total time of the profile, average entry speed into the lane, and burstiness, which determines how the vehicles are distributed along time. Higher values of burstiness mean that the vehicles have a high probability to pack in groups of several vehicles. The tool also requires the probability for each type of vehicle, thus enabling the creation of profiles with a very different distribution of vehicle types.