Package org.goplanit.assignment.ltm.sltm
Class StaticLtm
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<NetworkLoading>
-
- org.goplanit.supply.networkloading.NetworkLoading
-
- org.goplanit.assignment.TrafficAssignment
-
- org.goplanit.assignment.ltm.LtmAssignment
-
- org.goplanit.assignment.ltm.sltm.StaticLtm
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IdAble>,EventListener,PlanitComponentListener,InteractorAccessee,LinkInflowOutflowAccessee,TrafficAssignmentComponentAccessee,EventListener,ExternalIdAble,IdAble
public class StaticLtm extends LtmAssignment implements LinkInflowOutflowAccessee
Static Link Transmission Model implementation (sLTM) for network loading based on solution method presented in Raadsen and Bliemer (2021) General solution scheme for the Static Link Transmission Model .Defaults initiated via configurator:
- Fundamental diagram: NEWELL
- Node Model: TAMPERE
- Author:
- markr
- 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 StaticLtm(StaticLtm sltm)Copy ConstructorStaticLtm(IdGroupingToken groupId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticLtmclone()Create a shallow copy of this entityOutputTypeAdaptercreateOutputTypeAdapter(OutputType outputType)Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builingprotected voidexecuteEquilibration()Run equilibration after resources initialized, including saving resultsMacroscopicNetworkgetInfrastructureNetwork()Get the physical network for the current assignmentprotected StaticLtmSimulationDatagetIterationData()Return the simulation data for the current iterationintgetIterationIndex()Collect the current iteration index of the simulationdouble[]getLinkSegmentInflowsPcuHour()Get link segment inflow rates for all link segments, where index is based on id of the link segment.double[]getLinkSegmentOutflowsPcuHour()Get link segment outflow rates for all link segments, where index is based on id of the link segment.protected StaticLtmAssignmentStrategygetStrategy()Return the assignment solution strategy usedprotected voidinitialiseBeforeExecution()Initialise the components before we start any assignment + create the assignment strategy (bush or path based)booleanisActivateBushBased()Verify if bush based assignment is applied or notbooleanisActivateDetailedLogging()collect the flag indicating link storage constraints are active or notbooleanisDisableLinkStorageConstraints()Verify to enable link storage constraints or notvoidreset()All components should be able to reset going back to some representative initial statevoidsetActivateBushBased(boolean flag)Set the flag indicating if bush based assignment is to be applied or notvoidsetActivateDetailedLogging(boolean flag)Set the flag indicating link storage constraints are active or notvoidsetDisableLinkStorageConstraints(boolean flag)Set the flag indicating link storage constraints are active or notprotected voidverifyComponentCompatibility()Verify if the create traffic assignment (sbu)components are compatible with each other and the created transport network.-
Methods inherited from class org.goplanit.assignment.ltm.LtmAssignment
getPathChoice, getUsedNetworkLayer, setFundamentalDiagram, setNodeModel, setPathChoice, verifyNetworkDemandZoningCompatibility
-
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, logRegisteredComponent, registerComponent, 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.LinkInflowOutflowAccessee
getCompatibleAccessor, getLinkSegmentInflowPcuHour, getLinkSegmentOutflowPcuHour
-
Methods inherited from interface org.goplanit.interactor.TrafficAssignmentComponentAccessee
getTrafficAssignmentComponent
-
-
-
-
Constructor Detail
-
StaticLtm
public StaticLtm(IdGroupingToken groupId)
Constructor- Parameters:
groupId- contiguous id generation within this group for instances of this class
-
StaticLtm
public StaticLtm(StaticLtm sltm)
Copy Constructor- Parameters:
sltm- to copy
-
-
Method Detail
-
verifyComponentCompatibility
protected void verifyComponentCompatibility() throws PlanItExceptionVerify if the create traffic assignment (sbu)components are compatible with each other and the created transport network. Called before starting the simulation and after the transport network has been generated from physical and virtual network. So this is called after the build of the assignment instance- Overrides:
verifyComponentCompatibilityin classLtmAssignment- Throws:
PlanItException- thrown if the components are not compatible
-
initialiseBeforeExecution
protected void initialiseBeforeExecution() throws PlanItExceptionInitialise the components before we start any assignment + create the assignment strategy (bush or path based)- Overrides:
initialiseBeforeExecutionin classTrafficAssignment- Throws:
PlanItException- thrown if there is an error
-
executeEquilibration
protected void executeEquilibration() throws PlanItExceptionRun equilibration after resources initialized, including saving results- Specified by:
executeEquilibrationin classTrafficAssignment- Throws:
PlanItException- thrown if there is an error
-
getIterationData
protected StaticLtmSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
getStrategy
protected StaticLtmAssignmentStrategy getStrategy()
Return the assignment solution strategy used- Returns:
- used assignment strategy
-
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
-
clone
public StaticLtm clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classLtmAssignment- Returns:
- shallow copy of entity
-
isDisableLinkStorageConstraints
public boolean isDisableLinkStorageConstraints()
Verify to enable link storage constraints or not- Returns:
- true when enabled, false otherwise
-
setDisableLinkStorageConstraints
public void setDisableLinkStorageConstraints(boolean flag)
Set the flag indicating link storage constraints are active or not- Parameters:
flag- when true activate, when false disable
-
setActivateDetailedLogging
public void setActivateDetailedLogging(boolean flag)
Set the flag indicating link storage constraints are active or not- Parameters:
flag- when true activate, when false disable
-
isActivateBushBased
public boolean isActivateBushBased()
Verify if bush based assignment is applied or not- Returns:
- true when activated, false otherwise
-
setActivateBushBased
public void setActivateBushBased(boolean flag)
Set the flag indicating if bush based assignment is to be applied or not- Parameters:
flag- when true activate, when false disable
-
isActivateDetailedLogging
public boolean isActivateDetailedLogging()
collect the flag indicating link storage constraints are active or not- Returns:
- flag when true activated, when false disabled
-
getLinkSegmentInflowsPcuHour
public double[] getLinkSegmentInflowsPcuHour()
Get link segment inflow rates for all link segments, where index is based on id of the link segment.- Specified by:
getLinkSegmentInflowsPcuHourin interfaceLinkInflowOutflowAccessee- Returns:
- link segment inflows for all modes
-
getLinkSegmentOutflowsPcuHour
public double[] getLinkSegmentOutflowsPcuHour()
Get link segment outflow rates for all link segments, where index is based on id of the link segment.- Specified by:
getLinkSegmentOutflowsPcuHourin interfaceLinkInflowOutflowAccessee- Returns:
- link segment inflows for all modes
-
reset
public void reset()
All components should be able to reset going back to some representative initial state- Overrides:
resetin classLtmAssignment
-
-