Package org.planit.trafficassignment
Class TraditionalStaticAssignment
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.planit.trafficassignment.TrafficAssignmentComponent<NetworkLoading>
-
- org.planit.supply.networkloading.NetworkLoading
-
- org.planit.trafficassignment.TrafficAssignment
-
- org.planit.trafficassignment.TraditionalStaticAssignment
-
- All Implemented Interfaces:
Serializable
,EventListener
,org.djutils.event.EventListenerInterface
,org.djutils.event.EventProducerInterface
,InteractorAccessee
,LinkVolumeAccessee
public class TraditionalStaticAssignment extends TrafficAssignment implements LinkVolumeAccessee
Traditional static assignment traffic component. Provides configuration access via the CapacityRestrainedTrafficAssignmentBuilder it instantiates- Author:
- markr, gman6028
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.planit.trafficassignment.TrafficAssignment
demands, initialLinkSegmentCost, initialLinkSegmentCostByTimePeriod, numberOfNetworkSegments, numberOfNetworkVertices, outputManager, physicalCost, physicalNetwork, smoothing, TRADITIONAL_STATIC_ASSIGNMENT, trafficAssignmentBuilder, transportNetwork, virtualCost
-
Fields inherited from class org.planit.trafficassignment.TrafficAssignmentComponent
groupId, id, trafficComponentType
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Fields inherited from interface org.planit.interactor.LinkVolumeAccessee
INTERACTOR_PROVIDE_LINKVOLUMEACCESSEE
-
-
Constructor Summary
Constructors Constructor Description TraditionalStaticAssignment(IdGroupingToken groupId)
Base Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addRegisteredEventTypeListeners(org.djutils.event.EventType eventType)
register all the known listeners for the passed in eventType on this producer for this event typeprotected String
createLoggingPrefix()
create the logging prefix for logging statements during equilibrationOutputTypeAdapter
createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output typeprotected TrafficAssignmentBuilder
createTrafficAssignmentBuilder(InputBuilderListener trafficComponentCreateListener, Demands demands, Zoning zoning, PhysicalNetwork physicalNetwork)
create the traffic assignment builder for this traffic assignmentvoid
executeEquilibration()
Execute equilibration over all time periods and modesdouble[]
getModalNetworkSegmentFlows(Mode mode)
#Get link segment flows for a specified modeint
getNumberOfLinkSegments()
#Get number of link segmentsSimulationData
getSimulationData()
Return the simulation data for the current iterationdouble
getTotalNetworkSegmentFlow(LinkSegment linkSegment)
#Get the total flow across a link over all modesvoid
notify(org.djutils.event.EventInterface event)
Deal with requests for link volume accessees since we are one.-
Methods inherited from class org.planit.trafficassignment.TrafficAssignment
activateOutput, checkForEmptyComponents, collectBuilder, createLoggingPrefix, createTransportNetwork, deactivateOutput, disbandTransportNetwork, execute, finalizeAfterExecution, getGapFunction, getOutputConfiguration, getOutputFormatters, getPhysicalCost, getSmoothing, getTransportNetwork, getVirtualCost, initialiseBeforeExecution, isOutputTypeActive, registerOutputFormatter, setDemands, setGapFunction, setInitialLinkSegmentCost, setInitialLinkSegmentCost, setPhysicalCost, setPhysicalNetwork, setSmoothing, setVirtualCost, setZoning, unregisterOutputFormatter, verifyComponentCompatibility
-
Methods inherited from class org.planit.trafficassignment.TrafficAssignmentComponent
getId, getIdGroupingtoken, getSourceId, getTrafficComponentType
-
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
-
-
-
-
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
-
createTrafficAssignmentBuilder
protected TrafficAssignmentBuilder createTrafficAssignmentBuilder(InputBuilderListener trafficComponentCreateListener, Demands demands, Zoning zoning, PhysicalNetwork physicalNetwork) throws PlanItException
create the traffic assignment builder for this traffic assignment- Specified by:
createTrafficAssignmentBuilder
in classTrafficAssignment
- Parameters:
trafficComponentCreateListener
- listener to register on all traffic assignment components that this builder can builddemands
- the demands this assignment works onzoning
- the zoning this assignment works onphysicalNetwork
- the physical network this assignment works on- Returns:
- created traffic assignment builder
- Throws:
PlanItException
- thrown if there is an error
-
addRegisteredEventTypeListeners
protected void addRegisteredEventTypeListeners(org.djutils.event.EventType eventType)
register all the known listeners for the passed in eventType on this producer for this event type- Specified by:
addRegisteredEventTypeListeners
in classTrafficAssignment
- Parameters:
eventType
- the event type to register
-
executeEquilibration
public void executeEquilibration() throws PlanItException
Execute equilibration over all time periods and modes- Specified by:
executeEquilibration
in classTrafficAssignment
- Throws:
PlanItException
- thrown if there is an error
-
getTotalNetworkSegmentFlow
public double getTotalNetworkSegmentFlow(LinkSegment linkSegment)
#Get the total flow across a link over all modes- Specified by:
getTotalNetworkSegmentFlow
in interfaceLinkVolumeAccessee
- Parameters:
linkSegment
- the specified link segment- Returns:
- the total flow across this link segment
-
getModalNetworkSegmentFlows
public double[] getModalNetworkSegmentFlows(Mode mode)
#Get link segment flows for a specified mode- Specified by:
getModalNetworkSegmentFlows
in interfaceLinkVolumeAccessee
- Parameters:
mode
- mode- Returns:
- link segment flows for all modes
-
getNumberOfLinkSegments
public int getNumberOfLinkSegments()
#Get number of link segments- Specified by:
getNumberOfLinkSegments
in interfaceLinkVolumeAccessee
- Returns:
- number of link segments
-
notify
public void notify(org.djutils.event.EventInterface event) throws RemoteException
Deal with requests for link volume accessees since we are one. Whenever such a request arrives, we provide ourselves as a candidate and fire a response event of type LinkVolumeAccessee.INTERACTOR_PROVIDE_LINKVOLUMEACCESSEE- Specified by:
notify
in interfaceorg.djutils.event.EventListenerInterface
- Parameters:
event
- to process- Throws:
RemoteException
-
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
-
getSimulationData
public SimulationData getSimulationData()
Return the simulation data for the current iteration- Specified by:
getSimulationData
in classTrafficAssignment
- Returns:
- simulation data
-
-