public class SequentialFixedAccelerationModel extends AbstractGTUFollowingModel
Copyright (c) 2013-2014 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(DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> simulator)
Construct a SequentialFixedAccelerationModel with empty list of FixedAccelerationModel steps.
|
SequentialFixedAccelerationModel(DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> 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.
|
DoubleScalar.Abs<AccelerationUnit> |
computeAcceleration(DoubleScalar.Abs<SpeedUnit> followerSpeed,
DoubleScalar.Abs<SpeedUnit> followerMaximumSpeed,
DoubleScalar.Abs<SpeedUnit> leaderSpeed,
DoubleScalar.Rel<LengthUnit> headway,
DoubleScalar.Abs<SpeedUnit> 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 |
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.
|
DoubleScalar.Rel<TimeUnit> |
getStepSize()
Return the step size of this GTU following model.
|
DoubleScalar.Abs<AccelerationUnit> |
maximumSafeDeceleration()
Return the maximum safe deceleration for use in gap acceptance models.
|
int |
size()
Retrieve the number of FixedAccelerationModel steps in this SequentialFixedAccelerationModel.
|
DoubleScalar.Abs<TimeUnit> |
timeAfterCompletionOfStep(int index)
Retrieve the simulation time at the end of the Nth step of this SequentialFixedAccelerationModel.
|
computeAcceleration, computeAcceleration, computeAccelerationWithNoLeader, minimumHeadwaypublic SequentialFixedAccelerationModel(DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> simulator)
simulator - DEVSSimulator; the simulator (needed to obtain the current simulation time)public SequentialFixedAccelerationModel(DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> 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 DoubleScalar.Abs<TimeUnit> timeAfterCompletionOfStep(int index)
index - int; the steppublic final DoubleScalar.Abs<AccelerationUnit> computeAcceleration(DoubleScalar.Abs<SpeedUnit> followerSpeed, DoubleScalar.Abs<SpeedUnit> followerMaximumSpeed, DoubleScalar.Abs<SpeedUnit> leaderSpeed, DoubleScalar.Rel<LengthUnit> headway, DoubleScalar.Abs<SpeedUnit> speedLimit) throws RemoteException
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 limitRemoteException - on communications failurepublic final DoubleScalar.Abs<AccelerationUnit> maximumSafeDeceleration()
public final DoubleScalar.Rel<TimeUnit> getStepSize() throws RemoteException
RemoteException - on communications failurepublic final String getName()
public final String getLongName()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.