public final class LmrsData extends Object
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
LmrsData(Synchronization synchronization) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
finalizeStep()
Remembers the leaders of the current time step (those forwarded to isNewLeader()) for the next time step.
|
(package private) Synchronization |
getSynchronization()
Returns the synchronization.
|
(package private) HeadwayGTU |
getSyncVehicle(Set<HeadwayGTU> adjLeaders)
Returns the gtu from the set that is the current sync vehicle, or
null of there is no sync vehicle or it is not
in the set. |
(package private) boolean |
isNewLeader(HeadwayGTU gtu)
Checks if the given leader is a new leader.
|
(package private) boolean |
isSyncVehicle(HeadwayGTU gtu)
Returns whether the provided gtu is the gtu that is synchronized to.
|
(package private) void |
setSyncVehicle(HeadwayGTU gtu)
Remembers the gtu that is synchronized to.
|
public LmrsData(Synchronization synchronization)
synchronization
- synchronizationboolean isNewLeader(HeadwayGTU gtu)
gtu
- gtu to checkvoid finalizeStep()
void setSyncVehicle(HeadwayGTU gtu)
gtu
- gtu that is synchronized toboolean isSyncVehicle(HeadwayGTU gtu)
gtu
- gtu to inquiryHeadwayGTU getSyncVehicle(Set<HeadwayGTU> adjLeaders)
null
of there is no sync vehicle or it is not
in the set.adjLeaders
- leaders in adjacent laneSynchronization getSynchronization()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.