Class BPRLinkTravelTimeCost

    • Constructor Detail

      • BPRLinkTravelTimeCost

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

      • getSegmentCost

        public double getSegmentCost​(Mode mode,
                                     LinkSegment linkSegment)
                              throws PlanItException
        Return the travel time for the current link for a given mode If the input data are invalid, this method returns a negative value.
        Specified by:
        getSegmentCost in interface Cost<LinkSegment>
        Parameters:
        mode - the current Mode of travel
        linkSegment - the current link segment
        Returns:
        the travel time for the current link
        Throws:
        PlanItException - when cost cannot be computed
      • setParameters

        public void setParameters​(MacroscopicLinkSegment linkSegment,
                                  Mode mode,
                                  double alpha,
                                  double beta)
        Set the alpha and beta values for a given link segment and mode
        Parameters:
        linkSegment - the specified link segment
        mode - specified mode type
        alpha - alpha value
        beta - beta value
      • setDefaultParameters

        public void setDefaultParameters​(Mode mode,
                                         double alpha,
                                         double beta)
        Set the default alpha and beta values for a mode
        Parameters:
        mode - the specified mode type
        alpha - alpha value
        beta - beta value
      • setDefaultParameters

        public void setDefaultParameters​(MacroscopicLinkSegmentType macroscopicLinkSegmentType,
                                         Mode mode,
                                         double alpha,
                                         double beta)
        Set the default alpha and beta values for a given link type and mode
        Parameters:
        macroscopicLinkSegmentType - the specified link type
        mode - the specified mode type
        alpha - alpha value
        beta - beta value
      • setDefaultParameters

        public void setDefaultParameters​(double alpha,
                                         double beta)
        Set the default alpha and beta values
        Parameters:
        alpha - alpha value
        beta - beta value
      • initialiseBeforeSimulation

        public void initialiseBeforeSimulation​(PhysicalNetwork physicalNetwork)
        Register the BPR cost parameter values on the PhysicalNetwork Call this method after all the calls to set the cost parameters have been made
        Specified by:
        initialiseBeforeSimulation in class PhysicalCost
        Parameters:
        physicalNetwork - PhysicalNetwork object containing the updated parameter values
      • notify

        public void notify​(org.djutils.event.EventInterface event)
                    throws RemoteException
        we wait for a link volume accessee to be provided after it is requested. Here we get notified
        Specified by:
        notify in interface org.djutils.event.EventListenerInterface
        Throws:
        RemoteException