Package org.planit.cost.physical
Class AbstractPhysicalCost
- java.lang.Object
- 
- org.djutils.event.EventProducer
- 
- org.planit.assignment.TrafficAssignmentComponent<AbstractPhysicalCost>
- 
- org.planit.cost.physical.AbstractPhysicalCost
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Idable>,- org.djutils.event.EventProducerInterface,- Cost<MacroscopicLinkSegment>,- PhysicalCost,- Idable
 - Direct Known Subclasses:
- BPRLinkTravelTimeCost
 
 public abstract class AbstractPhysicalCost extends TrafficAssignmentComponent<AbstractPhysicalCost> implements PhysicalCost Class for dynamic cost functions, which calculate link segment costs for each iteration- Author:
- markr, gman6028
- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.planit.assignment.TrafficAssignmentComponentid, tokenId, trafficComponentType
 - 
Fields inherited from interface org.djutils.event.EventProducerInterfaceFIRST_POSITION, LAST_POSITION
 - 
Fields inherited from interface org.planit.cost.physical.PhysicalCostBPR
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractPhysicalCost(IdGroupingToken groupId)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidinitialiseBeforeSimulation(InfrastructureNetwork network)Initialize the cost parameter values in the networkabstract voidpopulateWithCost(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.- 
Methods inherited from class org.planit.assignment.TrafficAssignmentComponentequals, getId, getIdGroupingToken, getSourceId, getTrafficComponentType, hashCode
 - 
Methods inherited from class org.djutils.event.EventProduceraddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.planit.cost.CostgetSegmentCost
 - 
Methods inherited from interface org.planit.utils.id.IdablecompareTo, idEquals, idHashCode
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractPhysicalCostprotected AbstractPhysicalCost(IdGroupingToken groupId) - Parameters:
- groupId- , contiguous id generation within this group for instances of this class
 
 
- 
 - 
Method Detail- 
populateWithCostpublic abstract void populateWithCost(Mode mode, double[] costToFill) throws PlanItException 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 rewuire network information hence its placement here where via the initialiseBeforeSimulation, the network is provided- 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
 
 - 
initialiseBeforeSimulationpublic abstract void initialiseBeforeSimulation(InfrastructureNetwork network) throws PlanItException Initialize the cost parameter values in the network- Parameters:
- network- the network
- Throws:
- PlanItException- thrown if error
 
 
- 
 
-