Class FixedInitialMacroscopicLinkSegmentCost
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<InitialPhysicalCost>
-
- org.goplanit.cost.physical.initial.InitialPhysicalCost
-
- org.goplanit.cost.physical.initial.InitialMacroscopicLinkSegmentCost
-
- org.goplanit.cost.physical.initial.FixedInitialMacroscopicLinkSegmentCost
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,Cost<MacroscopicLinkSegment>
,PhysicalCost<MacroscopicLinkSegment>
,EventListener
,ExternalIdAble
,IdAble
public class FixedInitialMacroscopicLinkSegmentCost extends InitialMacroscopicLinkSegmentCost
Initial Link Segment Cost for which all the link segments have the same cost value for a specified mode- Author:
- gman6028
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.cost.physical.initial.InitialMacroscopicLinkSegmentCost
timePeriodAgnosticCosts, timePeriodCosts
-
Fields inherited from interface org.goplanit.cost.physical.PhysicalCost
BPR, FREEFLOW, STEADY_STATE
-
-
Constructor Summary
Constructors Constructor Description FixedInitialMacroscopicLinkSegmentCost(FixedInitialMacroscopicLinkSegmentCost other, boolean deepCopy)
Copy constructorFixedInitialMacroscopicLinkSegmentCost(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedInitialMacroscopicLinkSegmentCost
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possiblevoid
reset()
All components should be able to reset going back to some representative initial statevoid
setAllSegmentCosts(Mode mode, double cost, int noLinkSegments)
Sets a given cost for all link segments for a given modeFixedInitialMacroscopicLinkSegmentCost
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.cost.physical.initial.InitialMacroscopicLinkSegmentCost
collectSettingsAsKeyValueMap, getDTravelTimeDFlow, getGeneralisedCost, getSegmentCost, getSegmentCost, getTimePeriodAgnosticCosts, getTimePeriodCosts, getTimePeriods, getTravelTimeCost, isSegmentCostsSetForMode, isSegmentCostsSetForMode, isSegmentCostsSetForTimePeriod, setSegmentCost, setSegmentCost, setSegmentCost
-
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
clone, 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
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
FixedInitialMacroscopicLinkSegmentCost
public FixedInitialMacroscopicLinkSegmentCost(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
FixedInitialMacroscopicLinkSegmentCost
public FixedInitialMacroscopicLinkSegmentCost(FixedInitialMacroscopicLinkSegmentCost other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a eep copy, shallow copy otherwise
-
-
Method Detail
-
setAllSegmentCosts
public void setAllSegmentCosts(Mode mode, double cost, int noLinkSegments)
Sets a given cost for all link segments for a given mode- Parameters:
mode
- the specified modecost
- the cost of travel to be usednoLinkSegments
- the number of link segments
-
shallowClone
public FixedInitialMacroscopicLinkSegmentCost shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Overrides:
shallowClone
in classInitialMacroscopicLinkSegmentCost
- Returns:
- shallow copy of entity
-
deepClone
public FixedInitialMacroscopicLinkSegmentCost deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Overrides:
deepClone
in classInitialMacroscopicLinkSegmentCost
- Returns:
- deep copy of entity
-
reset
public void reset()
All components should be able to reset going back to some representative initial state- Overrides:
reset
in classInitialMacroscopicLinkSegmentCost
-
-