-
Notifications
You must be signed in to change notification settings - Fork 29
6.1 VehicleStateRegimeVariables
smart-fm edited this page Nov 9, 2018
·
6 revisions
The status
variable keeps the information on the state of the vehicle regarding its LC regime. The function setStatus
resets the status
variable to account for the possibility of LC regarding the connectivity regarding the vehicle's path.
Flow chart for setStatus
The variable status
keeps the following state conditions:
- if the neighboring lanes are connected to the next link in the vehicles path (
STATUS_RIGHT_OK
,STATUS_LEFT_OK
), set in thesetStatus
function mentioned above; - if vehicle wants to change to the right or left lane (
STATUS_RIGHT
,STATUS_LEFT
), set inmakeLaneChangingDecision
function;- if vehicle is changing to the right or left lane (
STATUS_LC_RIGHT
,STATUS_LC_LEFT
), set inexecuteLC
function; - if a vehicle is in mandatory lane change state (
STATUS_MANDATORY
), set by thecheckForLookAheadLC
function; - the value of the acceleration regime. Although MITSIM only considers 3 types of acceleration status values (car-following, free-flowing and emergency regimes), SimMobility accounts of a total of 12 (see Section 5.1 for the variable categories);
- the target gap (
STATUS_STOPPED
) due to other factors besides traffic: bus stop, toll, drop off/pick up. Thestatus
variable is represented by a 32-bit hexadecimal variable and its default values defined in theConstants.h
file; e.g.:const UNIT STATUS_RIGHT =0x00000001
Furthermore, auxiliary functions are created to alter the correct bits in the status function (check classDriverUpdateParams
).
- if vehicle is changing to the right or left lane (
Along with the above status
variable, several flag variables are used internally to identify intermediate drivers states. Here, states are not integrated into a single variable as each state flag represents one individual variable:
- The mandatory lane change tag (
FLAG_ESCAPE
withFLAG_ESCAPE_RIGHT
andFLAG_ESCAPE_LEFT
), set in two functions:checkForLC
andcheckIfLookAheadEvents
. Furthermore, the flag dedicated to each of the (left and right) sides are also set in the auxiliary function:checkMandatoryEventLC
; - The discretionary lane change tag (
FLAG_AVOID
withFLAG_AVOID_RIGHT
andFLAG_AVOID_LEFT
) set in the same functions as the above mentionedFLAG_ESCAPE
; - Tag that keeps track of the last LC decision made (
FLAG_PREV_LC
withFLAG_PREV_LC_RIGHT
andFLAG_PREV_LC_LEFT
); - Tag for feasible nosing state (
FLAG_NOSING_FEASIBLE
) set inexecuteLaneChanging
; - Yielding state tag (
FLAG_YIELDING
withFLAG_YIELDING_RIGHT
andFLAG_YIELDING_LEFT
)executeLaneChanging
and (unset) incalcYieldingRate
of the acceleration models; - Nosing state tag (
FLAG_NOSING
withFLAG_NOSING_RIGHT
andFLAG_NOSING_LEFT
), set inexecuteLaneChanging
; - Tag a vehicle that reaches the end of his lane (
FLAG_STUCK_AT_END
), set bycheckNosingFeasibility
; - Tag a vehicle that fails a lane change (
FLAG_LC_FAILED
withFLAG_LC_FAILED_LEAD
andFLAG_LC_FAILED_LAG
) and set byexecuteLaneChanging
;