Class LmrsData

    • Constructor Detail

      • LmrsData

        public LmrsData​(Synchronization synchronization,
                        Cooperation cooperation,
                        GapAcceptance gapAcceptance,
                        Tailgating tailgating)
        Parameters:
        synchronization - Synchronization; synchronization
        cooperation - Cooperation; cooperation
        gapAcceptance - GapAcceptance; gap-acceptance
        tailgating - Tailgating; tail gating
    • Method Detail

      • isNewLeader

        boolean isNewLeader​(HeadwayGTU gtu)
        Checks if the given leader is a new leader.
        Parameters:
        gtu - HeadwayGTU; gtu to check
        Returns:
        whether the gtu is a new leader
      • finalizeStep

        void finalizeStep()
        Remembers the leaders of the current time step (those forwarded to isNewLeader()) for the next time step.
      • setSyncVehicle

        void setSyncVehicle​(HeadwayGTU gtu)
        Remembers the gtu that is synchronized to.
        Parameters:
        gtu - HeadwayGTU; gtu that is synchronized to
      • isSyncVehicle

        boolean isSyncVehicle​(HeadwayGTU gtu)
        Returns whether the provided gtu is the gtu that is synchronized to.
        Parameters:
        gtu - HeadwayGTU; gtu to inquiry
        Returns:
        whether the provided gtu is the gtu that is synchronized to
      • getSyncVehicle

        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.
        Parameters:
        adjLeaders - PerceptionCollectable<HeadwayGTU,LaneBasedGTU>; leaders in adjacent lane
        Returns:
        gtu from the set that is the current sync vehicle
      • getSynchronization

        Synchronization getSynchronization()
        Returns the synchronization.
        Returns:
        synchronization
      • getCooperation

        Cooperation getCooperation()
        Returns the cooperation.
        Returns:
        cooperation
      • getGapAcceptance

        GapAcceptance getGapAcceptance()
        Return the gap-acceptance.
        Returns:
        gap-acceptance
      • getTailgating

        Tailgating getTailgating()
        Return the tail gating.
        Returns:
        gap-acceptance
      • getLatestDesire

        public Desire getLatestDesire​(Class<? extends Incentive> incentiveClass)
        Returns the latest desire from the specified incentive.
        Specified by:
        getLatestDesire in interface DesireBased
        Parameters:
        incentiveClass - Class<? extends Incentive>; incentive class
        Returns:
        latest desire from the specified incentive
      • getDesireMap

        Map<Class<? extends Incentive>,​Desire> getDesireMap()
        Returns the desire map.
        Returns:
        Map<Class<? extends Incentive>, Desire>; desire map
      • setSynchronizationState

        void setSynchronizationState​(Synchronizable.State synchronizationState)
        Sets the synchronization state.
        Parameters:
        synchronizationState - Synchronizable.State; synchronization step
      • isHumanLongitudinalControl

        boolean isHumanLongitudinalControl()
        Returns:
        humanLongitudinalControl.
      • setHumanLongitudinalControl

        public void setHumanLongitudinalControl​(boolean humanLongitudinalControl)
        Parameters:
        humanLongitudinalControl - boolean; set humanLongitudinalControl.