Class InitialPhysicalCost
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<InitialPhysicalCost>
-
- org.goplanit.cost.physical.initial.InitialPhysicalCost
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,Cost<MacroscopicLinkSegment>
,PhysicalCost<MacroscopicLinkSegment>
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
InitialMacroscopicLinkSegmentCost
public abstract class InitialPhysicalCost extends PlanitComponent<InitialPhysicalCost> implements PhysicalCost<MacroscopicLinkSegment>, Serializable
The initial physical costs for the network- Author:
- gman6028, markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.goplanit.cost.physical.PhysicalCost
BPR, FREEFLOW, STEADY_STATE
-
-
Constructor Summary
Constructors Constructor Description InitialPhysicalCost(InitialPhysicalCost other, boolean deepCopy)
Copy constructorInitialPhysicalCost(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract InitialPhysicalCost
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleabstract double
getGeneralisedCost(Mode mode, MacroscopicLinkSegment linkSegment)
get the initial cost for a specified mode and link segmentabstract double
getSegmentCost(TimePeriod timePeriod, Mode mode, MacroscopicLinkSegment linkSegment)
get the initial cost for a specified mode and link segmentabstract boolean
isSegmentCostsSetForMode(Mode mode)
Are link segment costs available for the given mode (without time period)abstract boolean
isSegmentCostsSetForMode(TimePeriod timePeriod, Mode mode)
Are link segment costs available for the given mode (without time period)abstract boolean
isSegmentCostsSetForTimePeriod(TimePeriod timePeriod)
Are link segment costs available for the given time periodabstract void
setSegmentCost(Mode mode, MacroscopicLinkSegment linkSegment, double cost)
Set the initial cost for a specified mode and link segmentabstract void
setSegmentCost(TimePeriod timePeriod, Mode mode, MacroscopicLinkSegment linkSegment, double cost)
Set the initial cost for a specified mode and link segmentabstract InitialPhysicalCost
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.component.PlanitComponent
collectSettingsAsKeyValueMap, equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, reset, setExternalId, setXmlId
-
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, 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
-
-
-
-
Constructor Detail
-
InitialPhysicalCost
public InitialPhysicalCost(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- , contiguous id generation within this group for instances of this class
-
InitialPhysicalCost
public InitialPhysicalCost(InitialPhysicalCost other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a eep copy, shallow copy otherwise
-
-
Method Detail
-
isSegmentCostsSetForMode
public abstract boolean isSegmentCostsSetForMode(Mode mode)
Are link segment costs available for the given mode (without time period)- Parameters:
mode
- the mode- Returns:
- true when available, false otherwise
-
isSegmentCostsSetForTimePeriod
public abstract boolean isSegmentCostsSetForTimePeriod(TimePeriod timePeriod)
Are link segment costs available for the given time period- Parameters:
timePeriod
- the time period- Returns:
- true when available, false otherwise
-
isSegmentCostsSetForMode
public abstract boolean isSegmentCostsSetForMode(TimePeriod timePeriod, Mode mode)
Are link segment costs available for the given mode (without time period)- Parameters:
timePeriod
- to usemode
- the mode- Returns:
- true when available, false otherwise
-
setSegmentCost
public abstract void setSegmentCost(Mode mode, MacroscopicLinkSegment linkSegment, double cost)
Set the initial cost for a specified mode and link segment- Parameters:
mode
- the current modelinkSegment
- the current link segmentcost
- the initial cost for this mode and link segment
-
setSegmentCost
public abstract void setSegmentCost(TimePeriod timePeriod, Mode mode, MacroscopicLinkSegment linkSegment, double cost)
Set the initial cost for a specified mode and link segment- Parameters:
timePeriod
- the timePeriod for which the cost is specifically meantmode
- the current modelinkSegment
- the current link segmentcost
- the initial cost for this mode and link segment
-
getGeneralisedCost
public abstract double getGeneralisedCost(Mode mode, MacroscopicLinkSegment linkSegment)
get the initial cost for a specified mode and link segment- Specified by:
getGeneralisedCost
in interfaceCost<MacroscopicLinkSegment>
- Parameters:
mode
- the current modelinkSegment
- the current link segment- Returns:
- cost the initial cost for this mode and link segment
-
getSegmentCost
public abstract double getSegmentCost(TimePeriod timePeriod, Mode mode, MacroscopicLinkSegment linkSegment)
get the initial cost for a specified mode and link segment- Parameters:
timePeriod
- the timePeriod for which the cost is specifically meantmode
- the current modelinkSegment
- the current link segment- Returns:
- cost the initial cost for this mode and link segment
-
shallowClone
public abstract InitialPhysicalCost shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classPlanitComponent<InitialPhysicalCost>
- Returns:
- shallow copy of entity
-
deepClone
public abstract InitialPhysicalCost deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classPlanitComponent<InitialPhysicalCost>
- Returns:
- deep copy of entity
-
-