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,Cloneable,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 TraditionalStaticAssignmentclone()Create a shallow copy of this entityprotected StringcreateLoggingPrefix()create the logging prefix for logging statements during equilibrationOutputTypeAdaptercreateOutputTypeAdapter(OutputType outputType)Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builingprotected voidexecuteTimePeriod(TimePeriod timePeriod, Set<Mode> modes)Perform assignment for a given time period using Dijkstra's algorithmMacroscopicNetworkgetInfrastructureNetwork()Get the physical network for the current assignmentprotected TraditionalStaticAssignmentSimulationDatagetIterationData()Return the simulation data for the current iterationintgetIterationIndex()Collect the current iteration index of the simulationdoublegetLinkSegmentVolume(LinkSegment linkSegment)#Get the total flow across a link over all modesdouble[]getLinkSegmentVolumes()#Get total link segment flows for all link segmentsprotected voidverifyComponentCompatibility()Verify if a supported gap function is usedprotected voidverifyNetworkDemandZoningCompatibility()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, logRegisteredComponent, 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
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
hasExternalId, hasXmlId
-
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 PlanItExceptionVerify if the network contains a single compatible infrastructure layer as traditional static assignment does not support intermodal network layers- Specified by:
verifyNetworkDemandZoningCompatibilityin classTrafficAssignment- Throws:
PlanItException- thrown if the components are not compatible
-
verifyComponentCompatibility
protected void verifyComponentCompatibility() throws PlanItExceptionVerify if a supported gap function is used- Specified by:
verifyComponentCompatibilityin 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:
executeTimePeriodin 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:
getInfrastructureNetworkin 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:
createOutputTypeAdapterin 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:
getIterationIndexin classTrafficAssignment- Returns:
- current iteration index
-
getLinkSegmentVolume
public double getLinkSegmentVolume(LinkSegment linkSegment)
#Get the total flow across a link over all modes- Specified by:
getLinkSegmentVolumein 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:
getLinkSegmentVolumesin interfaceLinkVolumeAccessee- Returns:
- link segment flows for all modes
-
clone
public TraditionalStaticAssignment clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classPlanitComponent<NetworkLoading>- Returns:
- shallow copy of entity
-
-