Package org.goplanit.cost.virtual
Class AbstractVirtualCost
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<AbstractVirtualCost>
-
- org.goplanit.cost.virtual.AbstractVirtualCost
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,Cost<ConnectoidSegment>
,VirtualCost
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
FixedConnectoidTravelTimeCost
,SpeedConnectoidTravelTimeCost
public abstract class AbstractVirtualCost extends PlanitComponent<AbstractVirtualCost> implements VirtualCost, Serializable
Object to handle the travel time cost of a virtual link- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.goplanit.cost.virtual.VirtualCost
FIXED, SPEED
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractVirtualCost(AbstractVirtualCost other, boolean deepCopy)
Copy Constructorprotected
AbstractVirtualCost(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
initialiseBeforeSimulation(VirtualNetwork virtualNetwork)
Initialize the virtual cost componentabstract void
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
collectSettingsAsKeyValueMap, deepClone, equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, reset, setExternalId, setXmlId, shallowClone
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.cost.Cost
getDTravelTimeDFlow, getGeneralisedCost, getTravelTimeCost
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.cost.virtual.VirtualCost
populateWithCost
-
-
-
-
Constructor Detail
-
AbstractVirtualCost
protected AbstractVirtualCost(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- , contiguous id generation within this group for instances of this class
-
AbstractVirtualCost
public AbstractVirtualCost(AbstractVirtualCost other, boolean deepCopy)
Copy Constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
initialiseBeforeSimulation
public abstract void initialiseBeforeSimulation(VirtualNetwork virtualNetwork) throws PlanItException
Initialize the virtual cost component- Parameters:
virtualNetwork
- the virtual network- Throws:
PlanItException
- thrown if a link/mode combination exists for which no cost parameters have been set
-
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
-
-