public class TTCRoomChecker extends Object implements LaneBasedGTUGenerator.RoomChecker
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.
Constructor and Description |
---|
TTCRoomChecker(org.djunits.value.vdouble.scalar.Duration ttc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.djunits.value.vdouble.scalar.Speed |
canPlace(org.djunits.value.vdouble.scalar.Speed leaderSpeed,
org.djunits.value.vdouble.scalar.Length headway,
LaneBasedGTUCharacteristics laneBasedGTUCharacteristics)
Return the maximum safe speed for a new GTU with the specified characteristics.
|
public TTCRoomChecker(org.djunits.value.vdouble.scalar.Duration ttc)
ttc
- time to collisionpublic final org.djunits.value.vdouble.scalar.Speed canPlace(org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, LaneBasedGTUCharacteristics laneBasedGTUCharacteristics) throws org.opentrafficsim.core.network.NetworkException
canPlace
in interface LaneBasedGTUGenerator.RoomChecker
leaderSpeed
- Speed; speed of the nearest leaderheadway
- Length; net distance to the nearest leader (always > 0)laneBasedGTUCharacteristics
- LaneBasedGTUCharacteristics; characteristics of the proposed new GTUorg.opentrafficsim.core.network.NetworkException
- this method may throw a NetworkException if it encounters an error in the network structureCopyright © 2014–2017 Delft University of Technology. All rights reserved.