Class InitialPhysicalCost
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<InitialPhysicalCost>
-
- org.goplanit.cost.physical.initial.InitialPhysicalCost
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,Cost<MacroscopicLinkSegment>
,PhysicalCost
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
InitialLinkSegmentCost
public abstract class InitialPhysicalCost extends PlanitComponent<InitialPhysicalCost> implements PhysicalCost, 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)
Copy constructorInitialPhysicalCost(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract 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 segment-
Methods inherited from class org.goplanit.component.PlanitComponent
clone, equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, reset, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
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
hasExternalId, hasXmlId
-
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)
Copy constructor- Parameters:
other
- to copy
-
-
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
-
-