Currently the Travellers change their velocity at will. Accellaration should be implemented as a limit on their capacity to change their velocity in respective to their previous frame.
These changes can be effected by:
calculating the minimum distance the traveller may move (see addendum), and changing the Move() function so that the proposal’s minimum value matches this distance, and
changing the left to Move into an upper bound (see addendum for calculation)
Note that these changes make it possible for the traveller to be forced into collission. This is a failure state that may not be permitted to occur. (We are currently not modelling accidents. Accident modelling may be beyond the scale of this simulation.)
To that effect, the minimum movement distance may be ignored if it is necessary to prevent colliding with another traveller.
In order to create the illussion of minimal movement restriction being in effect, the travellers should aim to maintain sufficient separation between themselves and the traveller they may collide with. This separation distance should be calcualted to be the distance the traveller requires to come to a dead stop. Note that maintaining minimum separation distance should not reduce the proposed movement below the minimum distance. (This restriction does not apply to collissions, which may still reduce the proposal below the minimum distance.)
Note that even maintaining the separation distance does not guarantee that cars would never collide, because a car may “cut in” from a side-road into the separation distance.
Addendum:
The minimum distance moved be calculated as:
current velocity - deaccelerationRate*deltaTime
The maximum distance moved, (leftToMove) can be calculated as:
current Min(velocity+accelerationRate*deltaTime,maxVelocity).
Dependency: https://trello.com/c/XERQ3JC8
Currently the Travellers change their velocity at will. Accellaration should be implemented as a limit on their capacity to change their velocity in respective to their previous frame.
These changes can be effected by:
Note that these changes make it possible for the traveller to be forced into collission. This is a failure state that may not be permitted to occur. (We are currently not modelling accidents. Accident modelling may be beyond the scale of this simulation.)
To that effect, the minimum movement distance may be ignored if it is necessary to prevent colliding with another traveller.
In order to create the illussion of minimal movement restriction being in effect, the travellers should aim to maintain sufficient separation between themselves and the traveller they may collide with. This separation distance should be calcualted to be the distance the traveller requires to come to a dead stop. Note that maintaining minimum separation distance should not reduce the proposed movement below the minimum distance. (This restriction does not apply to collissions, which may still reduce the proposal below the minimum distance.)
Note that even maintaining the separation distance does not guarantee that cars would never collide, because a car may “cut in” from a side-road into the separation distance.
Addendum:
The minimum distance moved be calculated as:
The maximum distance moved, (leftToMove) can be calculated as:
Specified by: Zdenek Plesek
Implemented by: Zdenek Plesek
Validated by: Tomas Premoli
┆Issue is synchronized with this Trello card by Unito