Class DualAccelerationStep
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.following.DualAccelerationStep
- All Implemented Interfaces:
Serializable
Container for two instances of an AccelerationStep. One for the GTU that is deciding its move (the leader); one for the GTU
that will/would be the (new) follower of that GTU.
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:
- Peter Knoppers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDualAccelerationStep(AccelerationStep leaderAccelerationStep, AccelerationStep followerAccelerationStep) Create a new DualAccelerationStep. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.djunits.value.vdouble.scalar.AccelerationReturn the acceleration of the follower.final AccelerationStepRetrieve the AccelerationStep for the (new) follower GTU.final org.djunits.value.vdouble.scalar.TimeReturn the time up to which the result of the follower is valid.final org.djunits.value.vdouble.scalar.AccelerationReturn the acceleration of the leader.final AccelerationStepRetrieve the AccelerationStep for the leader GTU.final org.djunits.value.vdouble.scalar.TimeReturn the time up to which the result of the leader is valid.final StringtoString()
-
Constructor Details
-
DualAccelerationStep
public DualAccelerationStep(AccelerationStep leaderAccelerationStep, AccelerationStep followerAccelerationStep) Create a new DualAccelerationStep.- Parameters:
leaderAccelerationStep- AccelerationStep; the acceleration and time step size for the leaderfollowerAccelerationStep- AccelerationStep; the acceleration and time step size for the (new) follower
-
-
Method Details
-
getLeaderAccelerationStep
Retrieve the AccelerationStep for the leader GTU.- Returns:
- AccelerationStep; the acceleration and time step size for the leader
-
getFollowerAccelerationStep
Retrieve the AccelerationStep for the (new) follower GTU.- Returns:
- AccelerationStep; the acceleration and time step size for the (new) follower
-
getLeaderAcceleration
public final org.djunits.value.vdouble.scalar.Acceleration getLeaderAcceleration()Return the acceleration of the leader.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the leader
-
getFollowerAcceleration
public final org.djunits.value.vdouble.scalar.Acceleration getFollowerAcceleration()Return the acceleration of the follower.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the follower
-
getLeaderValidUntil
public final org.djunits.value.vdouble.scalar.Time getLeaderValidUntil()Return the time up to which the result of the leader is valid.- Returns:
- DoubleScalar<TimeUnit>; the time up to which the result of the leader is valid
-
getFollowerValidUntil
public final org.djunits.value.vdouble.scalar.Time getFollowerValidUntil()Return the time up to which the result of the follower is valid.- Returns:
- DoubleScalar<TimeUnit>; the time up to which the result of the follower is valid
-
toString
-