Class GtuHeadwayType.PerceivedGtuHeadwayType
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.GtuHeadwayType.PerceivedGtuHeadwayType
-
- All Implemented Interfaces:
GtuHeadwayType
- Enclosing interface:
- GtuHeadwayType
public static class GtuHeadwayType.PerceivedGtuHeadwayType extends Object implements GtuHeadwayType
Class for perceived neighbors. Adjacent neighbors are perceived exactly.Copyright (c) 2013-2020 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 6 apr. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.GtuHeadwayType
GtuHeadwayType.PerceivedGtuHeadwayType
-
-
Field Summary
-
Fields inherited from interface org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.GtuHeadwayType
COPY, WRAP
-
-
Constructor Summary
Constructors Constructor Description PerceivedGtuHeadwayType(Estimation estimation, Anticipation anticipation)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GtuHeadwaycreateDownstreamGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance)Creates a headway object from a GTU, downstream.GtuHeadwaycreateHeadwayGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance, boolean downstream)Creates a headway object from a GTU, downstream or upstream.GtuHeadwaycreateParallelGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length overlapFront, Length overlap, Length overlapRear)Creates a headway object from a GTU, parallel.GtuHeadwaycreateUpstreamGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance)Creates a headway object from a GTU, downstream.
-
-
-
Constructor Detail
-
PerceivedGtuHeadwayType
public PerceivedGtuHeadwayType(Estimation estimation, Anticipation anticipation)
Constructor.- Parameters:
estimation- Estimation; estimationanticipation- Anticipation; anticipation
-
-
Method Detail
-
createHeadwayGtu
public GtuHeadway createHeadwayGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance, boolean downstream) throws GtuException, ParameterException
Creates a headway object from a GTU, downstream or upstream. The default implementation figures out from possible negative distance whether a parallel GTU should be created.- Specified by:
createHeadwayGtuin interfaceGtuHeadwayType- Parameters:
perceivingGtu- InternalLaneBasedGtu; perceiving GTUperceivedGtu- LaneBasedGtu; perceived GTUdistance- Length; distancedownstream- boolean; downstream (or upstream) neighbor- Returns:
- headway object from a gtu
- Throws:
GtuException- when headway object cannot be createdParameterException- on invalid parameter value or missing parameter
-
createDownstreamGtu
public GtuHeadway createDownstreamGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance) throws GtuException, ParameterException
Creates a headway object from a GTU, downstream.- Specified by:
createDownstreamGtuin interfaceGtuHeadwayType- Parameters:
perceivingGtu- InternalLaneBasedGtu; perceiving GTUperceivedGtu- LaneBasedGtu; perceived GTUdistance- Length; distance- Returns:
- headway object from a gtu
- Throws:
GtuException- when headway object cannot be createdParameterException- on invalid parameter value or missing parameter
-
createUpstreamGtu
public GtuHeadway createUpstreamGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length distance) throws GtuException, ParameterException
Creates a headway object from a GTU, downstream.- Specified by:
createUpstreamGtuin interfaceGtuHeadwayType- Parameters:
perceivingGtu- InternalLaneBasedGtu; perceiving GTUperceivedGtu- LaneBasedGtu; perceived GTUdistance- Length; distance- Returns:
- headway object from a gtu
- Throws:
GtuException- when headway object cannot be createdParameterException- on invalid parameter value or missing parameter
-
createParallelGtu
public GtuHeadway createParallelGtu(InternalLaneBasedGtu perceivingGtu, LaneBasedGtu perceivedGtu, Length overlapFront, Length overlap, Length overlapRear) throws GtuException
Creates a headway object from a GTU, parallel.- Specified by:
createParallelGtuin interfaceGtuHeadwayType- Parameters:
perceivingGtu- InternalLaneBasedGtu; perceiving GTUperceivedGtu- LaneBasedGtu; perceived GTUoverlapFront- Length; front overlapoverlap- Length; overlapoverlapRear- Length; rear overlap- Returns:
- headway object from a gtu
- Throws:
GtuException- when headway object cannot be created
-
-