Class OperationalPlan.Segment

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    OperationalPlan.AccelerationSegment, OperationalPlan.SpeedSegment
    Enclosing class:
    OperationalPlan

    public abstract static class OperationalPlan.Segment
    extends java.lang.Object
    implements java.io.Serializable
    The segment of an operational plan contains a part of the speed profile of a movement in which some of the variables determining movement (speed, acceleration) are constant.

    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.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 14, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Duration duration
      The duration of the acceleration or speed for this segment.
      protected Speed v0
      The initial speed for this segment.
    • Constructor Summary

      Constructors 
      Constructor Description
      Segment​(Duration duration)  
    • Field Detail

      • duration

        protected final Duration duration
        The duration of the acceleration or speed for this segment.
      • v0

        protected Speed v0
        The initial speed for this segment.
    • Constructor Detail

      • Segment

        public Segment​(Duration duration)
        Parameters:
        duration - Duration; the duration of the acceleration or speed for this segment
    • Method Detail

      • getDuration

        public final Duration getDuration()
        Returns:
        duration the duration of the acceleration or speed for this segment
      • getDurationSI

        public final double getDurationSI()
        Returns:
        duration the duration of the acceleration or speed for this segment
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object