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 StringcreateLoggingPrefix()create the logging prefix for logging statements during equilibrationOutputTypeAdaptercreateOutputTypeAdapter(OutputType outputType)Create the output type adapter for the current output typeprotected voidexecuteTimePeriod(TimePeriod timePeriod, Set<Mode> modes)Perform assignment for a given time period using Dijkstra's algorithmTraditionalStaticAssignmentSimulationDatagetIterationData()Return the simulation data for the current iterationintgetIterationIndex()Collect the current iteration index of the simulationdoublegetLinkSegmentFlow(LinkSegment linkSegment)#Get the total flow across a link over all modesdouble[]getLinkSegmentFlows()#Get total link segment flows for all link segmentsprotected voidverifyComponentCompatibility()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 PlanItExceptionVerify if the network contains a single compatible infrastructure layer as traditional static assignment does not support intermodal network layers- Overrides:
verifyComponentCompatibilityin 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:
createOutputTypeAdapterin 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:
executeTimePeriodin 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:
getIterationIndexin classTrafficAssignment- Returns:
- current iteration index
-
getLinkSegmentFlow
public double getLinkSegmentFlow(LinkSegment linkSegment)
#Get the total flow across a link over all modes- Specified by:
getLinkSegmentFlowin 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:
getLinkSegmentFlowsin interfaceLinkVolumeAccessee- Returns:
- link segment flows for all modes
-
getIterationData
public TraditionalStaticAssignmentSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
-