Class FixedConnectoidTravelTimeCost

    • Field Detail

      • fixedConnectoidCost

        protected double fixedConnectoidCost
        Fixed connectoid cost for connectoid segments - defaults to zero
    • Constructor Detail

      • FixedConnectoidTravelTimeCost

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

      • setFixedConnectoidCost

        public void setFixedConnectoidCost​(double fixedConnectoidCost)
        set the fixed cost used for all relevant link segments
        Parameters:
        fixedConnectoidCost - the fixed cost to use
      • getSegmentCost

        public double getSegmentCost​(Mode mode,
                                     ConnectoidSegment connectoidSegment)
        Calculates the connectoid segment cost using a fixed travel time
        Parameters:
        mode - mode of travel
        connectoidSegment - the connectoid segment
        Returns:
        the travel time for the specified 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