public class ToledoPerception extends LaneBasedAbstractPerceptionCategory implements LaneBasedPerceptionCategory
InfrastructureCategory that forwards all methods except for infrastructure lane change info.
These methods determine and return infrastructure information of type InfrastructureLaneChangeInfoToledo, which
includes split number.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION| Constructor and Description |
|---|
ToledoPerception(LanePerception perception) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<RelativeLane> |
getCrossSection()
Returns a set of relative lanes representing the cross section.
|
SortedSet<InfrastructureLaneChangeInfoToledo> |
getInfrastructureLaneChangeInfo(RelativeLane lane)
Returns infrastructure lane change info of a lane.
|
Length |
getLegalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Returns the distance over which a lane change remains legally possible.
|
Length |
getPhysicalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Returns the distance over which a lane change remains physically possible.
|
SpeedLimitProspect |
getSpeedLimitProspect(RelativeLane lane)
Returns the prospect for speed limits on a lane (dynamic speed limits may vary between lanes).
|
TimeStampedObject<SortedSet<RelativeLane>> |
getTimeStampedCrossSection()
Returns a time stamped set of relative lanes representing the cross section.
|
TimeStampedObject<SortedSet<InfrastructureLaneChangeInfoToledo>> |
getTimeStampedInfrastructureLaneChangeInfo(RelativeLane lane)
Returns time stamped infrastructure lane change info of a lane.
|
TimeStampedObject<Length> |
getTimeStampedLegalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Returns the time stamped distance over which a lane change remains legally possible.
|
TimeStampedObject<Length> |
getTimeStampedPhysicalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Returns the time stamped distance over which a lane change remains physically possible.
|
TimeStampedObject<SpeedLimitProspect> |
getTimeStampedSpeedLimitProspect(RelativeLane lane)
Returns the time stamped prospect for speed limits on a lane (dynamic speed limits may vary between lanes).
|
String |
toString() |
void |
updateAll() |
void |
updateCrossSection()
Updates a set of relative lanes representing the cross section.
|
void |
updateInfrastructureLaneChangeInfo(RelativeLane lane)
Updates the infrastructural lane change info.
|
void |
updateLegalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Updates the distance over which lane changes remains legally possible.
|
void |
updatePhysicalLaneChangePossibility(RelativeLane fromLane,
LateralDirectionality lat)
Updates the distance over which lane changes remains physically possible.
|
void |
updateSpeedLimitProspect(RelativeLane lane)
Updates the speed limit prospect.
|
computeIfAbsent, computeIfAbsent, computeIfAbsentgetGtu, getObjectOrNull, getPerception, getTimestamppublic ToledoPerception(LanePerception perception)
perception - LanePerception; perceptionpublic void updateInfrastructureLaneChangeInfo(RelativeLane lane) throws GTUException
lane - RelativeLane; relative lateral laneGTUException - when GTU is not initializedpublic final SortedSet<InfrastructureLaneChangeInfoToledo> getInfrastructureLaneChangeInfo(RelativeLane lane)
_______
_ _A_ _\_________
_ _ _ _ _ _ _ _ _
_________ _ _ ___
\_______
(-) Lane-drop: 1 lane change in 400m (400m per lane change)
(--------) Off-ramp: 3 lane changes in 900m (300m per lane change, critical)
(-) Lane-drop: 1 lane change in 100m (100m per lane change, critical)
(--------) Off-ramp: 3 lane changes in 600m (200m per lane change)
lane - RelativeLane; relative lateral lanepublic final TimeStampedObject<SortedSet<InfrastructureLaneChangeInfoToledo>> getTimeStampedInfrastructureLaneChangeInfo(RelativeLane lane)
_______
_ _A_ _\_________
_ _ _ _ _ _ _ _ _
_________ _ _ ___
\_______
(-) Lane-drop: 1 lane change in 400m (400m per lane change)
(--------) Off-ramp: 3 lane changes in 900m (300m per lane change, critical)
(-) Lane-drop: 1 lane change in 100m (100m per lane change, critical)
(--------) Off-ramp: 3 lane changes in 600m (200m per lane change)
lane - RelativeLane; relative lateral lanepublic final void updateSpeedLimitProspect(RelativeLane lane) throws GTUException, ParameterException
lane - RelativeLane; relative lateral laneGTUException - if the GTU was not initializedParameterException - if a parameter is not definedpublic final void updateLegalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat) throws GTUException, ParameterException
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedGTUException - if the GTU was not initializedParameterException - if a parameter is not definedpublic final void updatePhysicalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat) throws GTUException, ParameterException
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedGTUException - if the GTU was not initializedParameterException - if a parameter is not definedpublic final void updateCrossSection()
throws GTUException,
ParameterException
GTUException - if the GTU was not initializedParameterException - if a parameter is not definedpublic final SpeedLimitProspect getSpeedLimitProspect(RelativeLane lane)
lane - RelativeLane; relative lateral lanepublic final Length getLegalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedNullPointerException - if lat == nullpublic final Length getPhysicalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedNullPointerException - if lat == nullpublic final SortedSet<RelativeLane> getCrossSection()
public final TimeStampedObject<SpeedLimitProspect> getTimeStampedSpeedLimitProspect(RelativeLane lane)
lane - RelativeLane; relative lateral lanepublic final TimeStampedObject<Length> getTimeStampedLegalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedNullPointerException - if lat == nullpublic final TimeStampedObject<Length> getTimeStampedPhysicalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
fromLane - RelativeLane; lane from which the lane change possibility is requestedlat - LateralDirectionality; LEFT or RIGHT, null not allowedNullPointerException - if lat == nullpublic final TimeStampedObject<SortedSet<RelativeLane>> getTimeStampedCrossSection()
public final void updateAll()
throws GTUException,
NetworkException,
ParameterException
updateAll in interface PerceptionCategory<LaneBasedGTU,LanePerception>GTUExceptionNetworkExceptionParameterExceptionCopyright © 2014–2019 Delft University of Technology. All rights reserved.