Class SpeedConnectoidTravelTimeCost

    • Field Detail

      • DEFAULT_CONNECTOID_SPEED_KPH

        public static final double DEFAULT_CONNECTOID_SPEED_KPH
        See Also:
        Constant Field Values
    • Constructor Detail

      • SpeedConnectoidTravelTimeCost

        public SpeedConnectoidTravelTimeCost​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - , contiguous id generation within this group for instances of this class
    • Method Detail

      • setConnectoidSpeed

        public void setConnectoidSpeed​(double connectoidSpeed)
        set the connectoid speed
        Parameters:
        connectoidSpeed - the speed
      • getSegmentCost

        public double getSegmentCost​(Mode mode,
                                     ConnectoidSegment connectoidSegment)
        Return the connectoid travel time using speed
        Parameters:
        mode - the mode of travel
        connectoidSegment - the connectoid segment
        Returns:
        the travel time for this connectoid segment
      • populateWithCost

        public void populateWithCost​(Mode mode,
                                     double[] costToFill)
                              throws PlanItException
        Description copied from interface: VirtualCost
        Invoker expects (mode specific ) costs in passed in array to be filled, where each entry signifies a link segment by its id
        Parameters:
        mode - the mode these costs pertain to
        costToFill - array of link segment costs identified by the link segment's internal id
        Throws:
        PlanItException - thrown if error