-
Notifications
You must be signed in to change notification settings - Fork 29
6.2 LaneChoiceModel
The target lane model uses a multinomial logit (MNL) structure. Important variables that affect lane choices include the distance to the point where the driver must be in specific lanes in order to follow the path, the number of lane changes required to be in these lanes, the attributes of the various lanes (e.g. average speed and density of the lane, lane cost/toll), and variables that capture the conditions in the immediate vicinity of the vehicle such as the relative speeds and spacing from lead vehicles, the presence of heavy vehicles and characteristics of the driver (e.g. aggressiveness, network familiarity). If the target lane is different from the current lane, a lane change is required. Drivers then search for an acceptable gap to complete the lane change.
One of the main factors affecting lane choice is the need to follow the travel path. The implementation of path awareness (i.e., when do drivers become aware and begin to respond to path-following constraints) impacts the simulation results. The path awareness model in SimMobitlity ST assumes that drivers are aware of the path-plan up to a certain distance downstream of their current position. They will react to any path-following constraints that arise within a “look-ahead” distance and ignore those that are further downstream. The look-ahead distances are characteristics of the driver and are assumed to be randomly distributed in the driver population. This approach overcomes the excess weaving and merging maneuvers arising from late lane changes that occur when the awareness is based on the network structure (i.e. drivers are only aware of the next link(s) on their path), particularly in urban networks that are characterized by short links and paths that may require frequent turning movements.
The function makeLaneChangingDecision
represents the main function of the lane changing model. It sets bits 4-7 of the variable status
described above. The fourth and fifth bit indicate current lane change status, and the bits should be masked by:
- 8=
STATUS_RIGHT
- 16=
STATUS_LEFT
- 24=
STATUS_CHANGING
It returns a non-zero value if the vehicle needs a lane change and 0 otherwise.
Flow chart for makeLaneChangingDecision
The epsilon is a predefined variable in the XML configuration file for the minimum speed to consider for a moving vehicle. timeSinceTagged
computes the time since the vehicle has been tagged for LC for the first time for that maneuver. It is compared to a predefined variable t0 set in the XML configuration file.
The lane change model is then differentiated for vehicles with and without a predefined path. This differentiation is carried out using the funciton path()
. If a vehicle has a predefined path, the LC model is defined by checkForLC
whereas for vehicle with paths, three different functions are used: checkIfLookAheadEvents
, checkForLookAheadLC
and checkMandatoryEventLC
. Finally, the variable status is updated accordingly depending on the current, left or right LC preference, using the output of the above mentioned functions.
The function checkForLC
defined the LC decision when a vehicle has a predefined path. Determine if this driver will start a mandatory lane change or stay in the correct lanes. This function will update bit 6-7 of status variable if necessary. This two bits indicate mandatory lane change or "suggested/required" lane changes, i.e.:
- 32 = STATUS_MANDATORY
- 64 = STATUS_SUGGESTED
The function also returns TRUE if the above mandatory flag has been turn on, or FALSE otherwise. It determine to which lane a vehicle in a mandatory status will change to. It returns the direction of the change (-1=left, 1=right) or zero if no change.
At the top of the function, to check if there is an event ahead, the function isThereBadEventAhead
is used by checking if there is a critical downstream control device or event (see [Section 6.4] (https://github.com/smart-fm/simmobility-prod/wiki/6.4-AuxiliaryFunctions)).
The setMandatoryStatusTag
function sets the variable status with the tag STATUS_MANDATORY
and updates the mandatory lane change probability to 1.
If this vehicle has to get out of current lane (STATUS_MANDATORY
or !STATUS_CURRENT_OK
), the mandatory lane change logic (MLC) comes into play, and the lane choice is based on the minimum number of lane changes to an open lane (either to the left or right). If there is open lane on both sides with the same number of LC, the choice is random.
If the vehicle is not tagged with a mandatory state, the discretionary lane change logic (DLC) comes into play. The utilities of each lane are initialized as zero, and computed only if a set of rules are verified regarding DLC tagging:
- if the potential target lane exists and is available for the subject vehicle: lanes rules, no incident event, and variable message signs (VMS) and lane rule signs (LRS).
- if the time tagged in the same direction is higher than
dlcMinTimeInLaneSameDir
; - if the time tagged in a different direction is higher than
dlcMinTimeInLaneDiffDir
.
Flow chart for checkForLC
dlcMinTimeInLaneSameDir
and dlcMinTimeInLaneDiffDir
are predefined parameters in the XML parameter configuration file. If the available conditions are met, the (exponential of the) utility of the potential target (left, right or current) is computed using the functions LCUtilityLeft
, LCUtilityRight
or LCUtilityCurrent
, respectively. These functions are detailed in see see [Section 6.4] (https://github.com/smart-fm/simmobility-prod/wiki/6.4-AuxiliaryFunctions). In general, the probability of choosing each lane is given by:
where _EUi_is the exponbential of the expected utility for lane i.
The calculated probabilities are then compared to a generated random to compute the choice: -1 for left lane, 1 for right lane and 0 for current.
Finally, the FLAG_ESCAPE
or FLAG_AVOID
are replaced by its directional counterparts (FLAG_ESCAPE_LEFT
, FLAG_AVOID_LEFT
or FLAG_ESCAPE_RIGHT
, FLAG_AVOID_RIGHT
) before the function returns its binary output.
For vehicles with pre-defined paths, three different functions are used: checkIfLookAheadEvents
, checkForLookAheadLC
and checkMandatoryEventLC
. All these functions are detailed in the next section.
MITSIMLab awareness model that overcomes the limitations of the one-link awareness has been implemented in SimMobility. The model assumes that a driver is aware of the path-plan up to a certain distance downstream of the current position. The driver will react to any mandatory conditions that arise within this “look-ahead” distance and ignore any such considerations beyond that distance. The look-ahead distance is a characteristic of the driver, and may depend on factors such as familiarity with the path and spatial abilities. Look-ahead distances are assumed to be randomly distributed in the population of drivers. For the default implementation in SimMobility, the look-ahead distance is uniformly distributed between minimum and maximum values specified as input parameters.
The critical operation in the implementation of the look-ahead model is mapping the lane connectivity from the vehicle’s position to the look-ahead distance downstream. This is required in order to determine whether a mandatory lane change is required and, if so, in which direction. This operation is a double pass process:
- Forward pass. Starting at the position of the vehicle, the next segments on the path are accumulated up to the look-ahead distance. The lanes in the last segment within the look-ahead distance are labeled as the target lanes. The driver will want to be in a lane that is connected to any of these lanes.
- Backward pass. Starting from the target lanes and moving backwards on the path, a list of lanes connected to the target lanes is built. Next, the lanes on that list become the target lane, and the process is repeated until the connected lanes in the current segment are identified.
The list of connected lanes in the current segment is used to determine whether a mandatory lane change is required. If the vehicle’s current lane is connected, no lane change is needed. Otherwise a mandatory lane-change in the direction of the connected lanes is triggered.
Flow chart for checkIfLookAheadEvents
checkIfLookAheadEvents
checks for bad events that will override the lookahead distance and will set the mandatory lane change status. This function will update bit 6-7 of status variable if necessary. This two bits indicate mandatory lane change or "suggested/required" lane changes, i.e.:
- 32 = STATUS_MANDATORY
- 64 = STATUS_SUGGESTED
Flow chart for checkMandatoryEventLC
The checkMandatoryEventLC
function determines the lane changing that a lookahead vehicle will try if it is constrained by an event. This function is very similar to the checkForLC
function described above. It determines to which lane a vehicle in a mandatory status will change to. It returns the direction of the change (-1=left, 1=right) or zero if no change.
Flow chart for checkForLookAheadLC
In case the checkIfLookAheadEvents
does not return a mandatory LC status, the checkForLookAheadLC
function is called to check for discretionary LC. This function gives the LC direction when the driver is constrained by the lookahead distance.
The difference to the previous model is that the discretionary lane change utilities are conditioned by the number of lane changes computed for the look ahead distance instead of the number of lane changes to the next link alone (as given by isWrongLane
in the previous model). It first gets the list of connected lanes in the current segment and then computes the lane utilities.
The utilities of each lane are initialized as zero, and computed only if a set of rules are verified regarding DLC tagging:
- if the potential target lane exists and is available for the subject vehicle: lanes rules, no incident event, and variable message signs (VMS) and lane rule signs (LRS).
- if the time tagged in the same direction is higher than
dlcMinTimeInLaneSameDir
; - if the time tagged in a different direction is higher than
dlcMinTimeInLaneDiffDir
.dlcMinTimeInLaneSameDir
anddlcMinTimeInLaneDiffDir
are predefined parameters in the XML parameter configuration file. If the available conditions are met, the (exponential of the) utility of the potential target (left, right or current) is computed using the functionsLCUtilityLeft
,LCUtilityRight
orLCUtilityCurrent
, respectively. Also, these functions are detailed in [Section 6.4] (https://github.com/smart-fm/simmobility-prod/wiki/6.4-AuxiliaryFunctions). In general, the probability of choosing each lane is given by Eq. 25:6.2_Eq25
.
The calculated probabilities are then compared to a generated random random to compute the choice: -1 for left lane, 1 for right lane and 0 for current.
Finally, the FLAG_ESCAPE
or FLAG_AVOID
are replaced by its directional counterparts (FLAG_ESCAPE_LEFT
, FLAG_AVOID_LEFT
or FLAG_ESCAPE_RIGHT
, FLAG_AVOID_RIGHT
) before the function returns its binary output.