Class TraditionalStaticAssignment
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.assignment.TrafficAssignmentComponent<NetworkLoading>
-
- org.planit.supply.networkloading.NetworkLoading
-
- org.planit.assignment.TrafficAssignment
-
- org.planit.assignment.StaticTrafficAssignment
-
- org.planit.assignment.traditionalstatic.TraditionalStaticAssignment
-
- All Implemented Interfaces:
Serializable
,Comparable<Idable>
,org.djutils.event.EventProducerInterface
,InteractorAccessee
,LinkVolumeAccessee
,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.planit.assignment.TrafficAssignment
ALGORITHM_B, demands, ELTM, initialLinkSegmentCost, initialLinkSegmentCostByTimePeriod, numberOfNetworkSegments, numberOfNetworkVertices, physicalCost, smoothing, TRADITIONAL_STATIC_ASSIGNMENT, transportNetwork, virtualCost
-
Fields inherited from class org.planit.assignment.TrafficAssignmentComponent
id, tokenId, trafficComponentType
-
-
Constructor Summary
Constructors Constructor Description TraditionalStaticAssignment(IdGroupingToken groupId)
Base Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createLoggingPrefix()
create the logging prefix for logging statements during equilibrationOutputTypeAdapter
createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output typeprotected void
executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes)
Perform assignment for a given time period using Dijkstra's algorithmTraditionalStaticAssignmentSimulationData
getIterationData()
Return the simulation data for the current iterationint
getIterationIndex()
Collect the current iteration index of the simulationdouble
getLinkSegmentFlow(LinkSegment linkSegment)
#Get the total flow across a link over all modesdouble[]
getLinkSegmentFlows()
#Get total link segment flows for all link segmentsprotected void
verifyComponentCompatibility()
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.planit.assignment.StaticTrafficAssignment
executeEquilibration, executeTimePeriod
-
Methods inherited from class org.planit.assignment.TrafficAssignment
checkForEmptyComponents, createLoggingPrefix, createTransportNetwork, disbandTransportNetwork, execute, finalizeAfterExecution, getGapFunction, getOutputManager, getPhysicalCost, getSmoothing, getTransportNetwork, getVirtualCost, initialiseBeforeExecution, setDemands, setGapFunction, setInfrastructureNetwork, setInitialLinkSegmentCost, setInitialLinkSegmentCost, setOutputManager, setPhysicalCost, setSmoothing, setVirtualCost, setZoning
-
Methods inherited from class org.planit.assignment.TrafficAssignmentComponent
equals, getId, getIdGroupingToken, getSourceId, getTrafficComponentType, hashCode
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.planit.utils.id.Idable
compareTo, idEquals, idHashCode
-
Methods inherited from interface org.planit.interactor.LinkVolumeAccessee
getCompatibleAccessor
-
-
-
-
Constructor Detail
-
TraditionalStaticAssignment
public TraditionalStaticAssignment(IdGroupingToken groupId)
Base Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this class
-
-
Method Detail
-
createLoggingPrefix
protected String createLoggingPrefix()
create the logging prefix for logging statements during equilibration- Returns:
- prefix
-
verifyComponentCompatibility
protected void verifyComponentCompatibility() throws PlanItException
Verify if the network contains a single compatible infrastructure layer as traditional static assignment does not support intermodal network layers- Overrides:
verifyComponentCompatibility
in classTrafficAssignment
- Throws:
PlanItException
- thrown if the components are not compatible
-
createOutputTypeAdapter
public OutputTypeAdapter createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output type- 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
-
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
-
getIterationIndex
public int getIterationIndex()
Collect the current iteration index of the simulation- Specified by:
getIterationIndex
in classTrafficAssignment
- Returns:
- current iteration index
-
getLinkSegmentFlow
public double getLinkSegmentFlow(LinkSegment linkSegment)
#Get the total flow across a link over all modes- Specified by:
getLinkSegmentFlow
in interfaceLinkVolumeAccessee
- Parameters:
linkSegment
- the specified link segment- Returns:
- the total flow across this link segment
-
getLinkSegmentFlows
public double[] getLinkSegmentFlows()
#Get total link segment flows for all link segments- Specified by:
getLinkSegmentFlows
in interfaceLinkVolumeAccessee
- Returns:
- link segment flows for all modes
-
getIterationData
public TraditionalStaticAssignmentSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
-