Class CaccHeadwayGtuType
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.cacc.CaccHeadwayGtuType
-
- All Implemented Interfaces:
HeadwayGtuType
public class CaccHeadwayGtuType extends Object implements HeadwayGtuType
Copyright (c) 2013-2017 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 17 okt. 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.HeadwayGtuType
HeadwayGtuType.PerceivedHeadwayGtuType
-
-
Field Summary
-
Fields inherited from interface org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.HeadwayGtuType
COPY, WRAP
-
-
Constructor Summary
Constructors Constructor Description CaccHeadwayGtuType(StreamInterface randomStream, OTSSimulatorInterface simulator, Parameters parameters)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeadwayGTUcreateDownstreamGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length distance)Creates a headway object from a GTU, downstream.HeadwayGTUcreateParallelGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length overlapFront, Length overlap, Length overlapRear)Creates a headway object from a GTU, parallel.HeadwayGTUcreateUpstreamGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length distance)Creates a headway object from a GTU, downstream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.HeadwayGtuType
createHeadwayGtu
-
-
-
-
Constructor Detail
-
CaccHeadwayGtuType
public CaccHeadwayGtuType(StreamInterface randomStream, OTSSimulatorInterface simulator, Parameters parameters)
Constructor.- Parameters:
randomStream- StreamInterface; stream for random numberssimulator- OTSSimulatorInterface; simulatorparameters- Parameters; parameters
-
-
Method Detail
-
createDownstreamGtu
public HeadwayGTU createDownstreamGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length distance) throws GTUException, ParameterException
Creates a headway object from a GTU, downstream.- Specified by:
createDownstreamGtuin interfaceHeadwayGtuType- Parameters:
perceivingGtu- LaneBasedGTU; 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 HeadwayGTU createUpstreamGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length distance) throws GTUException, ParameterException
Creates a headway object from a GTU, downstream.- Specified by:
createUpstreamGtuin interfaceHeadwayGtuType- Parameters:
perceivingGtu- LaneBasedGTU; 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 HeadwayGTU createParallelGtu(LaneBasedGTU perceivingGtu, LaneBasedGTU perceivedGtu, Length overlapFront, Length overlap, Length overlapRear) throws GTUException
Creates a headway object from a GTU, parallel.- Specified by:
createParallelGtuin interfaceHeadwayGtuType- Parameters:
perceivingGtu- LaneBasedGTU; 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
-
-