Class CfRoomChecker
java.lang.Object
org.opentrafficsim.road.gtu.generator.CfRoomChecker
- All Implemented Interfaces:
- LaneBasedGtuGenerator.RoomChecker
- Direct Known Subclasses:
- CfBaRoomChecker
This class places GTU's behind the leader at the desired headway (i.e. CF, car-following) and the speed of the leader, but no
 further than the GTU could have traveled at the desired speed during the time since the desired arrival. With multiple
 leaders, the leader that causes the most upstream following position is used.
 
 Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncanPlace(SortedSet<HeadwayGtu> leaders, LaneBasedGtuCharacteristics characteristics, org.djunits.value.vdouble.scalar.Duration since, LanePosition initialPosition) Return the maximum safe speed and position for a new GTU with the specified characteristics.protected doubleheadwayFactor(org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.djunits.value.vdouble.scalar.Length desiredHeadway, org.djunits.value.vdouble.scalar.Speed generationSpeed, org.djunits.value.vdouble.scalar.Length generationHeadway, org.djunits.value.vdouble.scalar.Length leaderLength) Returns a situation dependent headway factor to deal with spillback.
- 
Constructor Details- 
CfRoomCheckerpublic CfRoomChecker()
 
- 
- 
Method Details- 
canPlacepublic LaneBasedGtuGenerator.Placement canPlace(SortedSet<HeadwayGtu> leaders, LaneBasedGtuCharacteristics characteristics, org.djunits.value.vdouble.scalar.Duration since, LanePosition initialPosition) throws NetworkException, GtuException Description copied from interface:LaneBasedGtuGenerator.RoomCheckerReturn the maximum safe speed and position for a new GTU with the specified characteristics. ReturnsPlacement.NOif there is no safe speed and position. This method might be called with an empty leader set such that the desired speed can be implemented.- Specified by:
- canPlacein interface- LaneBasedGtuGenerator.RoomChecker
- Parameters:
- leaders- leaders, usually 1, possibly more after a branch
- characteristics- characteristics of the proposed new GTU
- since- time since the GTU wanted to arrive
- initialPosition- initial position
- Returns:
- maximum safe speed, or null if a GTU with the specified characteristics cannot be placed at the current time
- Throws:
- NetworkException- this method may throw a NetworkException if it encounters an error in the network structure
- GtuException- on parameter exception
 
- 
headwayFactorprotected double headwayFactor(org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.djunits.value.vdouble.scalar.Length desiredHeadway, org.djunits.value.vdouble.scalar.Speed generationSpeed, org.djunits.value.vdouble.scalar.Length generationHeadway, org.djunits.value.vdouble.scalar.Length leaderLength) Returns a situation dependent headway factor to deal with spillback.- Parameters:
- desiredSpeed- desired speed
- desiredHeadway- desired headway at desired speed
- generationSpeed- generation speed
- generationHeadway- desired headway at generation speed
- leaderLength- length of the leader
- Returns:
- situation dependent headway factor to deal with spillback
 
 
-