Class InitialPhysicalCost

    • Constructor Detail

      • InitialPhysicalCost

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

        public InitialPhysicalCost​(InitialPhysicalCost other)
        Copy constructor
        Parameters:
        other - to copy
    • Method Detail

      • isSegmentCostsSetForMode

        public abstract boolean isSegmentCostsSetForMode​(Mode mode)
        Are link segment costs available for the given mode (without time period)
        Parameters:
        mode - the mode
        Returns:
        true when available, false otherwise
      • isSegmentCostsSetForTimePeriod

        public abstract boolean isSegmentCostsSetForTimePeriod​(TimePeriod timePeriod)
        Are link segment costs available for the given time period
        Parameters:
        timePeriod - the time period
        Returns:
        true when available, false otherwise
      • isSegmentCostsSetForMode

        public abstract boolean isSegmentCostsSetForMode​(TimePeriod timePeriod,
                                                         Mode mode)
        Are link segment costs available for the given mode (without time period)
        Parameters:
        timePeriod - to use
        mode - the mode
        Returns:
        true when available, false otherwise
      • setSegmentCost

        public abstract void setSegmentCost​(Mode mode,
                                            MacroscopicLinkSegment linkSegment,
                                            double cost)
        Set the initial cost for a specified mode and link segment
        Parameters:
        mode - the current mode
        linkSegment - the current link segment
        cost - the initial cost for this mode and link segment
      • setSegmentCost

        public abstract void setSegmentCost​(TimePeriod timePeriod,
                                            Mode mode,
                                            MacroscopicLinkSegment linkSegment,
                                            double cost)
        Set the initial cost for a specified mode and link segment
        Parameters:
        timePeriod - the timePeriod for which the cost is specifically meant
        mode - the current mode
        linkSegment - the current link segment
        cost - the initial cost for this mode and link segment
      • getGeneralisedCost

        public abstract double getGeneralisedCost​(Mode mode,
                                                  MacroscopicLinkSegment linkSegment)
        get the initial cost for a specified mode and link segment
        Specified by:
        getGeneralisedCost in interface Cost<MacroscopicLinkSegment>
        Parameters:
        mode - the current mode
        linkSegment - the current link segment
        Returns:
        cost the initial cost for this mode and link segment
      • getSegmentCost

        public abstract double getSegmentCost​(TimePeriod timePeriod,
                                              Mode mode,
                                              MacroscopicLinkSegment linkSegment)
        get the initial cost for a specified mode and link segment
        Parameters:
        timePeriod - the timePeriod for which the cost is specifically meant
        mode - the current mode
        linkSegment - the current link segment
        Returns:
        cost the initial cost for this mode and link segment