Interface InfrastructurePerception
-
- All Superinterfaces:
LaneBasedPerceptionCategory,PerceptionCategory<LaneBasedGTU,LanePerception>
- All Known Implementing Classes:
DirectInfrastructurePerception
public interface InfrastructurePerception extends LaneBasedPerceptionCategory
Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 14 feb. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SortedSet<RelativeLane>getCrossSection()Returns a set of relative lanes representing the cross section.SortedSet<InfrastructureLaneChangeInfo>getInfrastructureLaneChangeInfo(RelativeLane lane)Returns infrastructure lane change info of a lane.LengthgetLegalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)Returns the distance over which a lane change remains legally possible.LengthgetPhysicalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)Returns the distance over which a lane change remains physically possible.SpeedLimitProspectgetSpeedLimitProspect(RelativeLane lane)Returns the prospect for speed limits on a lane (dynamic speed limits may vary between lanes).default voidupdateAll()voidupdateCrossSection()Updates a set of relative lanes representing the cross section.voidupdateInfrastructureLaneChangeInfo(RelativeLane lane)Updates the infrastructural lane change info.voidupdateLegalLaneChangePossibility(RelativeLane lane, LateralDirectionality lat)Updates the distance over which lane changes remains legally possible.voidupdatePhysicalLaneChangePossibility(RelativeLane lane, LateralDirectionality lat)Updates the distance over which lane changes remains physically possible.voidupdateSpeedLimitProspect(RelativeLane lane)Updates the speed limit prospect.
-
-
-
Method Detail
-
updateInfrastructureLaneChangeInfo
void updateInfrastructureLaneChangeInfo(RelativeLane lane) throws GTUException, ParameterException
Updates the infrastructural lane change info. It starts at the given lane and moves downstream over the network. Whenever a point is encountered where lane changes are required, this information is saved.- Parameters:
lane- RelativeLane; relative lateral lane- Throws:
GTUException- if the GTU was not initialized or if the lane is not in the cross sectionParameterException- if a parameter is not defined
-
updateSpeedLimitProspect
void updateSpeedLimitProspect(RelativeLane lane) throws GTUException, ParameterException
Updates the speed limit prospect.- Parameters:
lane- RelativeLane; relative lateral lane- Throws:
GTUException- if the GTU was not initialized or if the lane is not in the cross sectionParameterException- if a parameter is not defined
-
updateLegalLaneChangePossibility
void updateLegalLaneChangePossibility(RelativeLane lane, LateralDirectionality lat) throws GTUException, ParameterException
Updates the distance over which lane changes remains legally possible.- Parameters:
lane- RelativeLane; lane from which the lane change possibility is requestedlat- LateralDirectionality; LEFT or RIGHT, null not allowed- Throws:
GTUException- if the GTU was not initialized or if the lane is not in the cross sectionParameterException- if a parameter is not defined
-
updatePhysicalLaneChangePossibility
void updatePhysicalLaneChangePossibility(RelativeLane lane, LateralDirectionality lat) throws GTUException, ParameterException
Updates the distance over which lane changes remains physically possible.- Parameters:
lane- RelativeLane; lane from which the lane change possibility is requestedlat- LateralDirectionality; LEFT or RIGHT, null not allowed- Throws:
GTUException- if the GTU was not initialized or if the lane is not in the cross sectionParameterException- if a parameter is not defined
-
updateCrossSection
void updateCrossSection() throws GTUException, ParameterExceptionUpdates a set of relative lanes representing the cross section. This set consists of all lanes on the current link, and an additional lane on the left and/or right side in case of a merge that is sufficiently nearby.- Throws:
GTUException- if the GTU was not initializedParameterException- if a parameter is not defined
-
getInfrastructureLaneChangeInfo
SortedSet<InfrastructureLaneChangeInfo> getInfrastructureLaneChangeInfo(RelativeLane lane)
Returns infrastructure lane change info of a lane. A set is returned as multiple points may force lane changes. Which point is considered most critical is a matter of driver interpretation and may change over time. This is shown below. Suppose vehicle A needs to take the off-ramp, and that behavior is that the minimum distance per required lane change determines how critical it is. First, 400m before the lane-drop, the off-ramp is critical. 300m downstream, the lane-drop is critical. Info is sorted by distance, closest first._______ _ _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)- Parameters:
lane- RelativeLane; relative lateral lane- Returns:
- infrastructure lane change info of a lane
-
getSpeedLimitProspect
SpeedLimitProspect getSpeedLimitProspect(RelativeLane lane)
Returns the prospect for speed limits on a lane (dynamic speed limits may vary between lanes).- Parameters:
lane- RelativeLane; relative lateral lane- Returns:
- prospect for speed limits on a lane
-
getLegalLaneChangePossibility
Length getLegalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
Returns the distance over which a lane change remains legally possible. Negative values indicate the distance over which a lane change is legally not possible.- Parameters:
fromLane- RelativeLane; lane from which the lane change possibility is requestedlat- LateralDirectionality; LEFT or RIGHT, null not allowed- Returns:
- distance over which a lane change remains possible
- Throws:
NullPointerException- iflat == null
-
getPhysicalLaneChangePossibility
Length getPhysicalLaneChangePossibility(RelativeLane fromLane, LateralDirectionality lat)
Returns the distance over which a lane change remains physically possible. Negative values indicate the distance over which a lane change is physically not possible.- Parameters:
fromLane- RelativeLane; lane from which the lane change possibility is requestedlat- LateralDirectionality; LEFT or RIGHT, null not allowed- Returns:
- distance over which a lane change remains possible
- Throws:
NullPointerException- iflat == null
-
getCrossSection
SortedSet<RelativeLane> getCrossSection()
Returns a set of relative lanes representing the cross section. Lanes are sorted left to right.- Returns:
- set of relative lanes representing the cross section
-
updateAll
default void updateAll() throws GTUException, ParameterException- Specified by:
updateAllin interfacePerceptionCategory<LaneBasedGTU,LanePerception>- Throws:
GTUExceptionParameterException
-
-