Class Distraction.TrapezoidProfile

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double getDistraction​(Length distance)
      Returns the level of distraction at the given distance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TrapezoidProfile

        public TrapezoidProfile​(double maxDistraction,
                                Length dMin,
                                Length dMed,
                                Length dMax)
        Parameters:
        maxDistraction - double; maximum distraction (task-demand)
        dMin - Length; distance before distraction where distraction starts to have effect (<0)
        dMed - Length; distance beyond distraction where distraction has maximum effect (>0)
        dMax - Length; distance beyond distraction where distraction no longer has effect (>dMed)
    • Method Detail

      • getDistraction

        public java.lang.Double getDistraction​(Length distance)
        Returns the level of distraction at the given distance.
        Specified by:
        getDistraction in interface Distraction.DistractionProfile
        Parameters:
        distance - Distance to distraction; negative when approaching
        Returns:
        Double; level of distraction (task-demand), or null if the distraction is no longer important