public final class LmrsData extends Object implements DesireBased, Synchronizable
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Synchronizable.State| Modifier and Type | Field and Description |
|---|---|
(package private) Map<Class<? extends Incentive>,Desire> |
desireMap
Latest desire value for visualization.
|
(package private) Synchronizable.State |
synchronizationState
Synchronization state.
|
| Constructor and Description |
|---|
LmrsData(Synchronization synchronization,
Cooperation cooperation,
GapAcceptance gapAcceptance,
Tailgating tailGating) |
| 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) Cooperation |
getCooperation()
Returns the cooperation.
|
(package private) GapAcceptance |
getGapAcceptance()
Return the gap-acceptance.
|
Desire |
getLatestDesire(Class<? extends Incentive> incentiveClass)
Returns the latest desire from the specified incentive.
|
(package private) Synchronization |
getSynchronization()
Returns the synchronization.
|
Synchronizable.State |
getSynchronizationState()
Returns the synchronization state.
|
(package private) HeadwayGTU |
getSyncVehicle(PerceptionCollectable<HeadwayGTU,LaneBasedGTU> 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) Tailgating |
getTailGating()
Return the tail gating.
|
(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.
|
String |
toString() |
final Map<Class<? extends Incentive>,Desire> desireMap
Synchronizable.State synchronizationState
public LmrsData(Synchronization synchronization, Cooperation cooperation, GapAcceptance gapAcceptance, Tailgating tailGating)
synchronization - synchronizationcooperation - cooperationgapAcceptance - gap-acceptancetailGating - tail gatingboolean 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(PerceptionCollectable<HeadwayGTU,LaneBasedGTU> adjLeaders)
null of there is no sync vehicle or it is not
in the set.adjLeaders - leaders in adjacent laneSynchronization getSynchronization()
Cooperation getCooperation()
GapAcceptance getGapAcceptance()
Tailgating getTailGating()
public Desire getLatestDesire(Class<? extends Incentive> incentiveClass)
getLatestDesire in interface DesireBasedincentiveClass - Class; incentive classpublic Synchronizable.State getSynchronizationState()
getSynchronizationState in interface SynchronizableCopyright © 2014–2018 Delft University of Technology. All rights reserved.