Class Stop

    • Constructor Detail

      • Stop

        public Stop​(Point point)
        Creates an instance of Stop.
        Parameters:
        point - geometry of the stop
        Throws:
        IllegalArgumentException - if point is null
        Since:
        100.0.0
    • Method Detail

      • getName

        public String getName()
        Gets the name that was set for this Stop.
        Returns:
        the name. Default value is an empty string
        Since:
        100.0.0
      • setName

        public void setName​(String name)
        Sets the name for this Stop.
        Parameters:
        name - name. Null is treated as an empty string.
        Since:
        100.0.0
      • getType

        public Stop.Type getType()
        Gets the type that was set for this stop.
        Returns:
        the stop's type. Default value is Stop.Type.STOP
        Since:
        100.1.0
      • setType

        public void setType​(Stop.Type type)
        Sets the type for this stop.
        Parameters:
        type - the stop's type
        Since:
        100.1.0
      • getRouteName

        public String getRouteName()
        Gets the name of the route to which this Stop belongs.
        Returns:
        the route name. Default value is an empty string
        Since:
        100.0.0
      • setRouteName

        public void setRouteName​(String routeName)
        Sets the name of the route to which this Stop belongs. You can use this to group Stops into separate routes.
        Parameters:
        routeName - route name. Null is treated as an empty string.
        Since:
        100.0.0
      • setCurbApproach

        public void setCurbApproach​(CurbApproach curbApproach)
        Sets the direction from which a vehicle may arrive at or depart from the stop. For example, a school bus must approach and depart a school from its door side so that students entering/exiting the bus will not have to cross the street.
        Parameters:
        curbApproach - curb approach
        Throws:
        IllegalArgumentException - if curbApproach is null
        Since:
        100.0.0
      • getAddedCost

        public double getAddedCost​(String attributeName)
        Gets the added cost that was set for this Stop.
        Parameters:
        attributeName - attribute name. It can be empty. Null is treated as an empty string.
        Returns:
        the added cost. Returns 0 if it was not set.
        Since:
        100.0.0
      • setAddedCost

        public void setAddedCost​(String attributeName,
                                 double addedCost)
        Sets the added cost for this Stop.
        Parameters:
        attributeName - attribute name. It can be empty. Null is treated as an empty string.
        addedCost - added cost
        Since:
        100.0.0
      • getNetworkLocation

        public NetworkLocation getNetworkLocation()
        Gets the Stop's location in the underlying transportation network.
        Returns:
        the network location. Returns null by default
        Since:
        100.0.0
      • setNetworkLocation

        public void setNetworkLocation​(NetworkLocation networkLocation)
        Sets the Stop's location in the underlying transportation network.
        Parameters:
        networkLocation - network location. It can't be null
        Throws:
        IllegalArgumentException - if networkLocation is null
        Since:
        100.0.0
      • getDistanceToNetworkLocation

        public double getDistanceToNetworkLocation()
        Gets the distance to network location in meters.
        Returns:
        the distance to network location in meters. Returns NaN by default.
        Since:
        100.0.0
      • getCurrentBearing

        public double getCurrentBearing()
        Gets the current bearing in degrees.
        Returns:
        the current bearing in degrees. Returns Double.NaN by default
        Since:
        100.0.0
      • setCurrentBearing

        public void setCurrentBearing​(double currentBearing)
        Sets the current bearing in degrees.
        Parameters:
        currentBearing - current bearing in degrees
        Since:
        100.0.0
      • getCurrentBearingTolerance

        public double getCurrentBearingTolerance()
        Gets the current bearing tolerance in degrees.
        Returns:
        the current bearing tolerance in degrees. Returns Double.NaN by default
        Since:
        100.0.0
      • setCurrentBearingTolerance

        public void setCurrentBearingTolerance​(double currentBearingTolerance)
        Sets the current bearing tolerance in degrees.
        Parameters:
        currentBearingTolerance - current bearing tolerance in degrees
        Since:
        100.0.0
      • getNavigationLatency

        public double getNavigationLatency()
        Gets the navigation latency in seconds.
        Returns:
        the navigation latency in seconds. Returns Double.NaN by default
        Since:
        100.0.0
      • setNavigationLatency

        public void setNavigationLatency​(double navigationLatency)
        Sets the navigation latency in seconds.
        Parameters:
        navigationLatency - navigation latency in seconds
        Since:
        100.0.0
      • getNavigationSpeed

        public double getNavigationSpeed()
        Gets the navigation speed in meters per second.
        Returns:
        the navigation speed in meters per second. Returns Double.NaN by default
        Since:
        100.0.0
      • setNavigationSpeed

        public void setNavigationSpeed​(double navigationSpeed)
        Sets the navigation speed in meters per second.
        Parameters:
        navigationSpeed - navigation speed in meters per second
        Since:
        100.0.0
      • getArrivalCurbApproach

        public CurbApproach getArrivalCurbApproach()
        Gets the direction from which a vehicle arrives at this stop.
        Returns:
        the arrival curb approach. Returns CurbApproach.UNKNOWN by default
        Since:
        100.0.0
      • getDepartureCurbApproach

        public CurbApproach getDepartureCurbApproach()
        Gets the direction from which a vehicle departs from the stop.
        Returns:
        the departure curb approach. Returns CurbApproach.UNKNOWN by default
        Since:
        100.0.0
      • getCumulativeCost

        public double getCumulativeCost​(String attributeName)
        Gets the cumulative cost. The valid set of attribute names can be obtained from RouteTaskInfo.getCostAttributes().
        Parameters:
        attributeName - attribute name
        Returns:
        the cumulative cost
        Since:
        100.0.0
      • getArrivalTime

        public Calendar getArrivalTime()
        Gets time of arrival at the stop.
        Returns:
        the arrival time. Returns null by default
        Since:
        100.0.0
      • getArrivalTimeShift

        public double getArrivalTimeShift()
        Gets shift for arrival time.
        Returns:
        a value of time zone shift in minutes
        Since:
        100.0.0
      • getDepartureTime

        public Calendar getDepartureTime()
        Gets time of departure from the stop.
        Returns:
        the departure time. Returns null by default
        Since:
        100.0.0
      • getDepartureTimeShift

        public double getDepartureTimeShift()
        Gets shift for departure time.
        Returns:
        a value of time zone shift in minutes
        Since:
        100.0.0
      • getTimeWindowStart

        public Calendar getTimeWindowStart()
        Gets the time window start that was set.
        Returns:
        the time window start. Returns null if it was not set
        Since:
        100.0.0
      • setTimeWindowStart

        public void setTimeWindowStart​(Calendar timeWindowStart)
        Sets the beginning time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.
        Parameters:
        timeWindowStart - time window start, Allows null value
        Since:
        100.0.0
      • getTimeWindowEnd

        public Calendar getTimeWindowEnd()
        Gets the time window end that was set.
        Returns:
        the time window end. Returns null if it was not set
        Since:
        100.0.0
      • setTimeWindowEnd

        public void setTimeWindowEnd​(Calendar timeWindowEnd)
        Sets ending time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.
        Parameters:
        timeWindowEnd - time window end, allows null value
        Since:
        100.0.0
      • getGeometry

        public Point getGeometry()
        Gets the location the Stop should be placed on the map.
        Returns:
        the location of this Stop on the map
        Since:
        100.0.0
      • setGeometry

        public void setGeometry​(Point location)
        Sets the location at which this Stop should be placed on the map.
        Parameters:
        location - the location at which this Stop should be placed on the map
        Throws:
        IllegalArgumentException - if location is null
        Since:
        100.4.0
      • getSequence

        public int getSequence()
        Gets the order in which stop is visited along the route. A value of 1 implies it is the first stop, and so on.
        Returns:
        the sequence. Returns 0 by default
        Since:
        100.0.0
      • getViolationTime

        public double getViolationTime()
        Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop. This is the difference between getArrivalTime() and getTimeWindowEnd()
        Returns:
        the violation time. Returns 0 by default
        Since:
        100.0.0
      • getWaitTime

        public double getWaitTime()
        Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference between getArrivalTime() and getTimeWindowStart()
        Returns:
        the wait time. Returns 0 by default
        Since:
        100.0.0