Class TraditionalStaticAssignment
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<NetworkLoading>
-
- org.goplanit.supply.networkloading.NetworkLoading
-
- org.goplanit.assignment.TrafficAssignment
-
- org.goplanit.assignment.StaticTrafficAssignment
-
- org.goplanit.assignment.traditionalstatic.TraditionalStaticAssignment
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,InteractorAccessee
,LinkVolumeAccessee
,TrafficAssignmentComponentAccessee
,EventListener
,ExternalIdAble
,IdAble
public class TraditionalStaticAssignment extends StaticTrafficAssignment implements LinkVolumeAccessee
Traditional static assignment traffic component.This is the class that conducts the actual assignment.- Author:
- markr, gman6028
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.assignment.TrafficAssignment
ALGORITHM_B, ELTM, initialLinkSegmentCostByTimePeriod, initialLinkSegmentCostTimePeriodAgnostic, SLTM, TRADITIONAL_STATIC_ASSIGNMENT
-
-
Constructor Summary
Constructors Constructor Description TraditionalStaticAssignment(TraditionalStaticAssignment traditionalStaticAssignment)
Copy ConstructorTraditionalStaticAssignment(IdGroupingToken groupId)
Base Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entityprotected String
createLoggingPrefix()
create the logging prefix for logging statements during equilibrationOutputTypeAdapter
createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builingTraditionalStaticAssignment
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleprotected void
executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes)
Perform assignment for a given time period using Dijkstra's algorithmMacroscopicNetwork
getInfrastructureNetwork()
Get the physical network for the current assignmentprotected TraditionalStaticAssignmentSimulationData
getIterationData()
Return the simulation data for the current iterationint
getIterationIndex()
Collect the current iteration index of the simulationdouble
getLinkSegmentVolume(LinkSegment linkSegment)
#Get the total flow across a link over all modesdouble[]
getLinkSegmentVolumes()
#Get total link segment flows for all link segmentsTraditionalStaticAssignment
shallowClone()
Create a shallow copy of this entityprotected void
verifyComponentCompatibility()
Verify if a supported gap function is usedprotected void
verifyNetworkDemandZoningCompatibility()
Verify if the network contains a single compatible infrastructure layer as traditional static assignment does not support intermodal network layers-
Methods inherited from class org.goplanit.assignment.StaticTrafficAssignment
executeEquilibration, executeTimePeriod
-
Methods inherited from class org.goplanit.assignment.TrafficAssignment
checkForEmptyComponents, createLoggingPrefix, createTransportNetwork, disbandTransportNetwork, execute, finalizeAfterExecution, getDemands, getGapFunction, getOutputManager, getPhysicalCost, getSmoothing, getTotalNumberOfNetworkSegments, getTotalNumberOfNetworkVertices, getTrafficAssignmentComponent, getTransportNetwork, getVirtualCost, getZoning, initialiseBeforeExecution, logAllSettings, logRegisteredComponentName, registerComponent, reset, setDemands, setGapFunction, setInfrastructureNetwork, setInitialLinkSegmentCost, setInitialLinkSegmentCost, setOutputManager, setPhysicalCost, setSmoothing, setVirtualCost, setZoning
-
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
-
Methods inherited from interface org.goplanit.interactor.LinkVolumeAccessee
getCompatibleAccessor
-
Methods inherited from interface org.goplanit.interactor.TrafficAssignmentComponentAccessee
getTrafficAssignmentComponent
-
-
-
-
Constructor Detail
-
TraditionalStaticAssignment
public TraditionalStaticAssignment(IdGroupingToken groupId)
Base Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
TraditionalStaticAssignment
public TraditionalStaticAssignment(TraditionalStaticAssignment traditionalStaticAssignment)
Copy Constructor- Parameters:
traditionalStaticAssignment
- to copy
-
-
Method Detail
-
createLoggingPrefix
protected String createLoggingPrefix()
create the logging prefix for logging statements during equilibration- Returns:
- prefix
-
verifyNetworkDemandZoningCompatibility
protected void verifyNetworkDemandZoningCompatibility() throws PlanItException
Verify if the network contains a single compatible infrastructure layer as traditional static assignment does not support intermodal network layers- Specified by:
verifyNetworkDemandZoningCompatibility
in classTrafficAssignment
- Throws:
PlanItException
- thrown if the components are not compatible
-
verifyComponentCompatibility
protected void verifyComponentCompatibility() throws PlanItException
Verify if a supported gap function is used- Specified by:
verifyComponentCompatibility
in classTrafficAssignment
- Throws:
PlanItException
- thrown if the components are not compatible
-
executeTimePeriod
protected void executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes) throws PlanItException
Perform assignment for a given time period using Dijkstra's algorithm- Specified by:
executeTimePeriod
in classStaticTrafficAssignment
- Parameters:
timePeriod
- the time period for the current assignmentmodes
- modes for the time period- Throws:
PlanItException
- thrown if there is an error
-
getIterationData
protected TraditionalStaticAssignmentSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
getInfrastructureNetwork
public MacroscopicNetwork getInfrastructureNetwork()
Get the physical network for the current assignment- Overrides:
getInfrastructureNetwork
in classTrafficAssignment
- Returns:
- physical network for the current assignment
-
createOutputTypeAdapter
public OutputTypeAdapter createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builing- Specified by:
createOutputTypeAdapter
in classTrafficAssignment
- Parameters:
outputType
- the current output type- Returns:
- the output type adapter corresponding to the current traffic assignment and output type
-
getIterationIndex
public int getIterationIndex()
Collect the current iteration index of the simulation- Specified by:
getIterationIndex
in classTrafficAssignment
- Returns:
- current iteration index
-
getLinkSegmentVolume
public double getLinkSegmentVolume(LinkSegment linkSegment)
#Get the total flow across a link over all modes- Specified by:
getLinkSegmentVolume
in interfaceLinkVolumeAccessee
- Parameters:
linkSegment
- the specified link segment- Returns:
- the total flow across this link segment
-
getLinkSegmentVolumes
public double[] getLinkSegmentVolumes()
#Get total link segment flows for all link segments- Specified by:
getLinkSegmentVolumes
in interfaceLinkVolumeAccessee
- Returns:
- link segment flows for all modes
-
shallowClone
public TraditionalStaticAssignment shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classStaticTrafficAssignment
- Returns:
- shallow copy of entity
-
deepClone
public TraditionalStaticAssignment 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 classStaticTrafficAssignment
- Returns:
- deep copy of entity
-
collectSettingsAsKeyValueMap
public Map<String,String> collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entity- Specified by:
collectSettingsAsKeyValueMap
in classPlanitComponent<NetworkLoading>
- Returns:
- name-value map of all (user configurable) settings
-
-