Package org.goplanit.assignment.ltm
Class LtmTrafficAssignmentBuilder<T extends LtmAssignment>
- java.lang.Object
-
- org.goplanit.utils.builder.Builder<T>
-
- org.goplanit.component.PlanitComponentBuilder<T>
-
- org.goplanit.assignment.TrafficAssignmentBuilder<T>
-
- org.goplanit.assignment.ltm.LtmTrafficAssignmentBuilder<T>
-
- Direct Known Subclasses:
StaticLtmTrafficAssignmentBuilder
public abstract class LtmTrafficAssignmentBuilder<T extends LtmAssignment> extends TrafficAssignmentBuilder<T>
An LTM traffic assignment builder is assumed to only support Link Transmission Model (LTM) traffic assignment instances. It is used to build the traffic assignment instance with the proper configuration settings- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.assignment.TrafficAssignmentBuilder
LOG_SETTINGS, LOGGER
-
Fields inherited from class org.goplanit.component.PlanitComponentBuilder
groupId
-
-
Constructor Summary
Constructors Constructor Description LtmTrafficAssignmentBuilder(Class<T> trafficAssignmentClass, IdGroupingToken groupId, InputBuilderListener inputBuilderListener, Demands demands, Zoning zoning, LayeredNetwork<?,?> network)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildSubComponents(T ltmAssignmentInstance)
In addition to the super class sub components, we also construct the subcomponents specific to dynamic traffic assignmentprotected FundamentalDiagramComponent
createFundamentalDiagramComponentInstance(MacroscopicNetworkLayer macroscopicNetworkLayer)
create a fundamental diagram component instance based on configurationprotected PathChoice
createPathChoiceInstance(LtmConfigurator<? extends LtmAssignment> configurator)
create a path choice instance based on configurationLtmConfigurator<T>
getConfigurator()
the configurator for this builder.-
Methods inherited from class org.goplanit.assignment.TrafficAssignmentBuilder
build, createConfigurator, createGapFunctionInstance, createPhysicalCostInstance, createSmoothingInstance, createTrafficAssignmentInstance, createVirtualCostInstance
-
Methods inherited from class org.goplanit.component.PlanitComponentBuilder
getGroupIdToken, getInputBuilderListener
-
Methods inherited from class org.goplanit.utils.builder.Builder
getClassToBuild
-
-
-
-
Constructor Detail
-
LtmTrafficAssignmentBuilder
public LtmTrafficAssignmentBuilder(Class<T> trafficAssignmentClass, IdGroupingToken groupId, InputBuilderListener inputBuilderListener, Demands demands, Zoning zoning, LayeredNetwork<?,?> network) throws PlanItException
Constructor- Parameters:
trafficAssignmentClass
- the traffic assignment class we are buildinggroupId
- the id generation group this builder is part ofinputBuilderListener
- the listener for further traffic components that are created by the builderdemands
- the demandszoning
- the zoningnetwork
- the network- Throws:
PlanItException
- thrown if there is an exception
-
-
Method Detail
-
createFundamentalDiagramComponentInstance
protected FundamentalDiagramComponent createFundamentalDiagramComponentInstance(MacroscopicNetworkLayer macroscopicNetworkLayer) throws PlanItException
create a fundamental diagram component instance based on configuration- Parameters:
macroscopicNetworkLayer
- the fundamental diagram is to be applied on- Returns:
- fundamental diagram instance
- Throws:
PlanItException
- thrown if error
-
createPathChoiceInstance
protected PathChoice createPathChoiceInstance(LtmConfigurator<? extends LtmAssignment> configurator) throws PlanItException
create a path choice instance based on configuration- Parameters:
configurator
- to extract path choice type from- Returns:
- path choice instance
- Throws:
PlanItException
- thrown if error
-
buildSubComponents
protected void buildSubComponents(T ltmAssignmentInstance) throws PlanItException
In addition to the super class sub components, we also construct the subcomponents specific to dynamic traffic assignment- Overrides:
buildSubComponents
in classTrafficAssignmentBuilder<T extends LtmAssignment>
- Parameters:
ltmAssignmentInstance
- the instance to build on- Throws:
PlanItException
- thrown if error
-
getConfigurator
public LtmConfigurator<T> getConfigurator()
the configurator for this builder. It allows one to hide the builder aspect and expose (parts of) the user available configuration options via this object- Overrides:
getConfigurator
in classTrafficAssignmentBuilder<T extends LtmAssignment>
- Returns:
- the configurator, null if no configurator is available nor could be created
-
-