public final class ConflictUtil extends Object
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
ConflictUtil.ConflictPlans
Holds the tactical plans of a driver considering conflicts.
|
Modifier and Type | Field and Description |
---|---|
static ParameterTypeAcceleration |
B
Comfortable deceleration.
|
static ParameterTypeAcceleration |
BCRIT
Critical deceleration.
|
static ParameterTypeDuration |
MIN_GAP
Minimum time gap between events.
|
static ParameterTypeLength |
S0
Stopping distance.
|
static ParameterTypeLength |
S0_CONF
Stopping distance at conflicts.
|
static ParameterTypeLength |
STOP_AREA
Area before stop line where one is considered arrived at the intersection.
|
static ParameterTypeDuration |
TI
Parameter of how much time before departure a bus indicates its departure to get priority.
|
static ParameterTypeDouble |
TIME_FACTOR
Multiplication factor on time for conservative assessment.
|
Modifier and Type | Method and Description |
---|---|
static Acceleration |
approachConflicts(Parameters parameters,
PerceptionCollectable<HeadwayConflict,Conflict> conflicts,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders,
CarFollowingModel carFollowingModel,
Length vehicleLength,
Length vehicleWidth,
Speed speed,
Acceleration acceleration,
SpeedLimitInfo speedLimitInfo,
ConflictUtil.ConflictPlans conflictPlans,
LaneBasedGTU gtu)
Approach conflicts by applying appropriate acceleration (or deceleration).
|
static boolean |
stopForAllStopConflict(HeadwayConflict conflict,
ConflictUtil.ConflictPlans conflictPlans)
Approach an all-stop conflict.
|
static boolean |
stopForGiveWayConflict(HeadwayConflict conflict,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders,
Speed speed,
Acceleration acceleration,
Length vehicleLength,
Parameters parameters,
SpeedLimitInfo speedLimitInfo,
CarFollowingModel carFollowingModel,
ParameterTypeAcceleration bType)
Approach a give-way conflict.
|
static boolean |
stopForPriorityConflict(HeadwayConflict conflict,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders,
Speed speed,
Length vehicleLength,
Parameters parameters,
ConflictUtil.ConflictPlans yieldPlans)
Approach a priority conflict.
|
static boolean |
stopForStopConflict(HeadwayConflict conflict,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders,
Speed speed,
Acceleration acceleration,
Length vehicleLength,
Parameters parameters,
SpeedLimitInfo speedLimitInfo,
CarFollowingModel carFollowingModel,
ParameterTypeAcceleration bType)
Approach a stop conflict.
|
public static final ParameterTypeDuration MIN_GAP
public static final ParameterTypeAcceleration B
public static final ParameterTypeAcceleration BCRIT
public static final ParameterTypeLength S0
public static final ParameterTypeLength S0_CONF
public static final ParameterTypeDouble TIME_FACTOR
public static final ParameterTypeLength STOP_AREA
public static final ParameterTypeDuration TI
public static Acceleration approachConflicts(Parameters parameters, PerceptionCollectable<HeadwayConflict,Conflict> conflicts, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, CarFollowingModel carFollowingModel, Length vehicleLength, Length vehicleWidth, Speed speed, Acceleration acceleration, SpeedLimitInfo speedLimitInfo, ConflictUtil.ConflictPlans conflictPlans, LaneBasedGTU gtu) throws GTUException, ParameterException
parameters
- parametersconflicts
- set of conflicts to approachleaders
- leading vehiclescarFollowingModel
- car-following modelvehicleLength
- length of vehiclevehicleWidth
- width of vehiclespeed
- current speedacceleration
- current accelerationspeedLimitInfo
- speed limit infoconflictPlans
- set of plans for conflictgtu
- gtuGTUException
- in case of an unsupported conflict ruleParameterException
- if a parameter is not defined or out of boundspublic static boolean stopForPriorityConflict(HeadwayConflict conflict, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Speed speed, Length vehicleLength, Parameters parameters, ConflictUtil.ConflictPlans yieldPlans) throws ParameterException
conflict
- conflict to approachleaders
- leading vehicles in own lanespeed
- current speedvehicleLength
- vehicle lengthparameters
- parametersyieldPlans
- set of plans for yielding with priorityParameterException
- if parameter B is not definedpublic static boolean stopForGiveWayConflict(HeadwayConflict conflict, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Speed speed, Acceleration acceleration, Length vehicleLength, Parameters parameters, SpeedLimitInfo speedLimitInfo, CarFollowingModel carFollowingModel, ParameterTypeAcceleration bType) throws ParameterException
conflict
- conflictleaders
- leadersspeed
- current speedacceleration
- current accelerationvehicleLength
- vehicle lengthparameters
- parametersspeedLimitInfo
- speed limit infocarFollowingModel
- car-following modelbType
- parameter type for considered decelerationParameterException
- if a parameter is not definedpublic static boolean stopForStopConflict(HeadwayConflict conflict, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Speed speed, Acceleration acceleration, Length vehicleLength, Parameters parameters, SpeedLimitInfo speedLimitInfo, CarFollowingModel carFollowingModel, ParameterTypeAcceleration bType) throws ParameterException
conflict
- conflictleaders
- leadersspeed
- current speedacceleration
- current accelerationvehicleLength
- vehicle lengthparameters
- parametersspeedLimitInfo
- speed limit infocarFollowingModel
- car-following modelbType
- parameter type for considered decelerationParameterException
- if a parameter is not definedpublic static boolean stopForAllStopConflict(HeadwayConflict conflict, ConflictUtil.ConflictPlans conflictPlans)
conflict
- conflict to approachconflictPlans
- set of plans for conflictCopyright © 2014–2018 Delft University of Technology. All rights reserved.