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-2023 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 Acceleration
Return the acceleration of the follower.final AccelerationStep
Retrieve the AccelerationStep for the (new) follower GTU.final Time
Return the time up to which the result of the follower is valid.final Acceleration
Return the acceleration of the leader.final AccelerationStep
Retrieve the AccelerationStep for the leader GTU.final Time
Return the time up to which the result of the leader is valid.final String
toString()
-
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
Return the acceleration of the leader.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the leader
-
getFollowerAcceleration
Return the acceleration of the follower.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the follower
-
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
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
-