Class DualAccelerationStep
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.following.DualAccelerationStep
-
- All Implemented Interfaces:
Serializable
public class DualAccelerationStep extends Object implements 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-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision: 1368 $, $LastChangedDate: 2015-09-02 00:20:20 +0200 (Wed, 02 Sep 2015) $, by $Author: averbraeck $,
initial version 11 mrt. 2015
- Author:
- Peter Knoppers
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DualAccelerationStep(AccelerationStep leaderAccelerationStep, AccelerationStep followerAccelerationStep)
Create a new DualAccelerationStep.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acceleration
getFollowerAcceleration()
Return the acceleration of the follower.AccelerationStep
getFollowerAccelerationStep()
Retrieve the AccelerationStep for the (new) follower GTU.Time
getFollowerValidUntil()
Return the time up to which the result of the follower is valid.Acceleration
getLeaderAcceleration()
Return the acceleration of the leader.AccelerationStep
getLeaderAccelerationStep()
Retrieve the AccelerationStep for the leader GTU.Time
getLeaderValidUntil()
Return the time up to which the result of the leader is valid.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getLeaderAccelerationStep
public final AccelerationStep getLeaderAccelerationStep()
Retrieve the AccelerationStep for the leader GTU.- Returns:
- AccelerationStep; the acceleration and time step size for the leader
-
getFollowerAccelerationStep
public final AccelerationStep getFollowerAccelerationStep()
Retrieve the AccelerationStep for the (new) follower GTU.- Returns:
- AccelerationStep; the acceleration and time step size for the (new) follower
-
getLeaderAcceleration
public final Acceleration getLeaderAcceleration()
Return the acceleration of the leader.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the leader
-
getFollowerAcceleration
public final Acceleration getFollowerAcceleration()
Return the acceleration of the follower.- Returns:
- DoubleScalar<AccelerationUnit>; the acceleration of the follower
-
getLeaderValidUntil
public final 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 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
-
-