public class SequentialFixedAccelerationModel extends AbstractGTUFollowingModel
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
TOODANGEROUS
Constructor and Description |
---|
SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
Construct a SequentialFixedAccelerationModel with empty list of FixedAccelerationModel steps.
|
SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
Set<FixedAccelerationModel> steps)
Construct a SequentialFixedAccelerationModel and load it with a list of FixedAccelerationModel steps.
|
Modifier and Type | Method and Description |
---|---|
SequentialFixedAccelerationModel |
addStep(FixedAccelerationModel step)
Add one FixedAccelerationModel step to this SequentialFixedAccelerationModel.
|
org.djunits.value.vdouble.scalar.Acceleration |
computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed,
org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed,
org.djunits.value.vdouble.scalar.Speed leaderSpeed,
org.djunits.value.vdouble.scalar.Length.Rel headway,
org.djunits.value.vdouble.scalar.Speed speedLimit)
Compute the acceleration that would be used to follow a leader.
TODO We should probably add a be ready to stop before argument to prevent vehicles that cannot see their leader, or should slow down for a crossing from accelerating to unsafe speeds. |
FixedAccelerationModel |
get(int index)
Retrieve one FixedAccelerationModel step.
|
String |
getLongName()
Return complete textual information about this instantiation of this GTU following model.
|
String |
getName()
Return the name of this GTU following model.
|
org.djunits.value.vdouble.scalar.Time.Rel |
getStepSize()
Return the step size of this GTU following model.
|
org.djunits.value.vdouble.scalar.Acceleration |
maximumSafeDeceleration()
Return the maximum safe deceleration for use in gap acceptance models.
|
int |
size()
Retrieve the number of FixedAccelerationModel steps in this SequentialFixedAccelerationModel.
|
org.djunits.value.vdouble.scalar.Time.Abs |
timeAfterCompletionOfStep(int index)
Retrieve the simulation time at the end of the Nth step of this SequentialFixedAccelerationModel.
|
computeAcceleration, computeAcceleration, computeAccelerationWithNoLeader, minimumHeadway
public SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
simulator
- DEVSSimulator; the simulator (needed to obtain the current simulation time)public SequentialFixedAccelerationModel(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, Set<FixedAccelerationModel> steps)
simulator
- DEVSSimulator; the simulator (needed to obtain the current simulation time)steps
- Set<FixedAccelerationModel>; the list of FixedAccelerationModel steps.public final SequentialFixedAccelerationModel addStep(FixedAccelerationModel step)
step
- FixedAccelerationModel; the step to addpublic final int size()
public final FixedAccelerationModel get(int index)
index
- int; the index of the retrieved FixedAccelerationModel steppublic final org.djunits.value.vdouble.scalar.Time.Abs timeAfterCompletionOfStep(int index)
index
- int; the steppublic final org.djunits.value.vdouble.scalar.Acceleration computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length.Rel headway, org.djunits.value.vdouble.scalar.Speed speedLimit)
followerSpeed
- DoubleScalar.Abs<SpeedUnit>; the speed of the follower at the current timefollowerMaximumSpeed
- DoubleScalar.Abs<SpeedUnit>; the maximum speed that the follower is capable of driving
atleaderSpeed
- DoubleScalar.Abs<SpeedUnit>; the speed of the follower at the current timeheadway
- DoubleScalar.Rel<LengthUnit>; the net headway (distance between the front of the follower to
the rear of the leader) at the current timespeedLimit
- DoubleScalar.Abs<SpeedUnit>; the local speed limitpublic final org.djunits.value.vdouble.scalar.Acceleration maximumSafeDeceleration()
public final org.djunits.value.vdouble.scalar.Time.Rel getStepSize()
public final String getName()
public final String getLongName()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.