Package org.goplanit.cost.physical
Class SteadyStateTravelTimeCost
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<AbstractPhysicalCost>
-
- org.goplanit.cost.physical.AbstractPhysicalCost
-
- org.goplanit.cost.physical.SteadyStateTravelTimeCost
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,Cost<MacroscopicLinkSegment>
,PhysicalCost
,InteractorAccessor<LinkInflowOutflowAccessee>
,LinkInflowOutflowAccessor
,EventListener
,ExternalIdAble
,IdAble
public class SteadyStateTravelTimeCost extends AbstractPhysicalCost implements LinkInflowOutflowAccessor
Cost computation for travel times based on the work of Raadsen and Bliemer (2019), Steady-state link travel time methods: Formulation, derivation, classification, and unification.Suitable for static and semi-dynamic traffic assignment methods that are steady-state with respect to their inflow and outflow rates which necessarily are able to take on different values, where the difference between in and outflow results in a queue on the link. Most notable assignment method that adopts this method is sLTM.
Raadsen and Bliemer (2019) highlight three main computation methods to compute the same steady-state travel time on the link level. In this implementation we utilise the so called static-functional - longitudinal method where we compute the travel time via three components: 1) free flow travel time + 2) hypocritical delay + 3) hypercritical delay
- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.goplanit.interactor.InteractorAccessor
LOGGER
-
Fields inherited from interface org.goplanit.cost.physical.PhysicalCost
BPR, FREEFLOW, STEADY_STATE
-
-
Constructor Summary
Constructors Constructor Description SteadyStateTravelTimeCost(SteadyStateTravelTimeCost other)
Copy ConstructorSteadyStateTravelTimeCost(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SteadyStateTravelTimeCost
clone()
Create a shallow copy of this entitydouble
getDTravelTimeDFlow(boolean uncongested, Mode mode, MacroscopicLinkSegment linkSegment)
First Derivative towards inflowRate.double
getGeneralisedCost(Mode mode, MacroscopicLinkSegment linkSegment)
Return the average travel time for the current link segment for a given modedouble
getTravelTimeCost(Mode mode, MacroscopicLinkSegment linkSegment)
Returns the generalised cost of travel along an edge segment for a specified modevoid
initialiseBeforeSimulation(TransportLayerNetwork<?,?> network)
Initialize the cost parameter values in the networkvoid
populateWithCost(UntypedPhysicalLayer<?,?,?> physicalLayer, Mode mode, double[] costToFill)
Populate the cost array with the free flow link travel times for all link segments for the specified modevoid
reset()
Full reset returns to pre-initialiseBeforeSimulation(TransportLayerNetwork)
state.void
setAccessee(LinkInflowOutflowAccessee accessee)
Set the accessee to allow accessvoid
updateTimePeriod(TimePeriod timePeriod)
Provide the cost calculation with information regarding the time period for which the cost is to be calculated-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.interactor.InteractorAccessor
setAccessee
-
Methods inherited from interface org.goplanit.interactor.LinkInflowOutflowAccessor
getCompatibleAccessee
-
-
-
-
Constructor Detail
-
SteadyStateTravelTimeCost
public SteadyStateTravelTimeCost(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
SteadyStateTravelTimeCost
public SteadyStateTravelTimeCost(SteadyStateTravelTimeCost other)
Copy Constructor- Parameters:
other
- to copy
-
-
Method Detail
-
initialiseBeforeSimulation
public void initialiseBeforeSimulation(TransportLayerNetwork<?,?> network) throws PlanItException
Initialize the cost parameter values in the network- Specified by:
initialiseBeforeSimulation
in classAbstractPhysicalCost
- Parameters:
network
- the network- Throws:
PlanItException
- thrown if error
-
updateTimePeriod
public void updateTimePeriod(TimePeriod timePeriod)
Provide the cost calculation with information regarding the time period for which the cost is to be calculated- Specified by:
updateTimePeriod
in classAbstractPhysicalCost
- Parameters:
timePeriod
- to apply
-
getGeneralisedCost
public double getGeneralisedCost(Mode mode, MacroscopicLinkSegment linkSegment)
Return the average travel time for the current link segment for a given mode- Specified by:
getGeneralisedCost
in interfaceCost<MacroscopicLinkSegment>
- Parameters:
mode
- the current Mode of travellinkSegment
- the current link segment- Returns:
- the travel time for the current link (in hours)
-
populateWithCost
public void populateWithCost(UntypedPhysicalLayer<?,?,?> physicalLayer, Mode mode, double[] costToFill) throws PlanItException
Populate the cost array with the free flow link travel times for all link segments for the specified mode- Overrides:
populateWithCost
in classAbstractPhysicalCost
- Parameters:
physicalLayer
- to usemode
- the mode to usecostToFill
- the cost to populate (in hours)- Throws:
PlanItException
- thrown if error
-
clone
public SteadyStateTravelTimeCost clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classPlanitComponent<AbstractPhysicalCost>
- Returns:
- shallow copy of entity
-
setAccessee
public void setAccessee(LinkInflowOutflowAccessee accessee)
Set the accessee to allow access- Specified by:
setAccessee
in interfaceInteractorAccessor<LinkInflowOutflowAccessee>
- Parameters:
accessee
- to use
-
reset
public void reset()
Full reset returns to pre-initialiseBeforeSimulation(TransportLayerNetwork)
state.- Specified by:
reset
in classPlanitComponent<AbstractPhysicalCost>
-
getTravelTimeCost
public double getTravelTimeCost(Mode mode, MacroscopicLinkSegment linkSegment)
Returns the generalised cost of travel along an edge segment for a specified mode- Specified by:
getTravelTimeCost
in interfaceCost<MacroscopicLinkSegment>
- Parameters:
mode
- the specified mode of travellinkSegment
- the specified edge segment (which can be physical or virtual)- Returns:
- the cost of travel along the specified segment
-
getDTravelTimeDFlow
public double getDTravelTimeDFlow(boolean uncongested, Mode mode, MacroscopicLinkSegment linkSegment)
First Derivative towards inflowRate. HypocriticalDelay is FD dependent. HyperCritical delay equates to (timePeriod duration/2) * (1/outflowRate). Get the first derivative of the used travel time computation method towards the edge segment (in) flow rate in PCU per hour, i.e. dTraveltime//dFlow.- Specified by:
getDTravelTimeDFlow
in interfaceCost<MacroscopicLinkSegment>
- Parameters:
uncongested
- flag idicating if the provided flow is uncongested or congested flow, relevant when flow can represent multiple traffic statesmode
- to uselinkSegment
- to use- Returns:
- the first derivative of travel time for a unit flow rate change in PCU per Hour
-
-