Class AbstractPhysicalCost

    • Constructor Detail

      • AbstractPhysicalCost

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

        public AbstractPhysicalCost​(AbstractPhysicalCost abstractPhysicalCost,
                                    boolean deepCopy)
        Copy Constructor
        Parameters:
        abstractPhysicalCost - to use
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • populateWithCost

        public void populateWithCost​(UntypedPhysicalLayer<?,​?,​MacroscopicLinkSegment> physicalLayer,
                                     Mode mode,
                                     double[] costToFill)
        Invoker expects (mode specific ) costs in passed in array to be filled, where each entry signifies a link segment by its id. This allows for more efficient implementations than having to revert to one by one updates. It does however require network information hence its placement here where via the initialiseBeforeSimulation, the network is provided
        Parameters:
        physicalLayer - these cost pertain to
        mode - the mode these costs pertain to
        costToFill - array of link segment costs identified by the link segment's internal id
      • initialiseBeforeSimulation

        public abstract void initialiseBeforeSimulation​(LayeredNetwork<?,​?> network)
                                                 throws PlanItException
        Initialize the cost parameter values in the network
        Parameters:
        network - the network
        Throws:
        PlanItException - thrown if error
      • updateTimePeriod

        public abstract void updateTimePeriod​(TimePeriod timePeriod)
        Provide the cost calculation with information regarding the time period for which the cost is to be calculated
        Parameters:
        timePeriod - to apply