Class AlgorithmB
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<NetworkLoading>
-
- org.goplanit.supply.networkloading.NetworkLoading
-
- org.goplanit.assignment.TrafficAssignment
-
- org.goplanit.assignment.StaticTrafficAssignment
-
- org.goplanit.assignment.algorithmb.AlgorithmB
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,InteractorAccessee
,TrafficAssignmentComponentAccessee
,EventListener
,ExternalIdAble
,IdAble
public class AlgorithmB extends StaticTrafficAssignment
Algorithm B implementation based on the work of Dial (2006). Due to a lack of explicit explanation for the implementation of the underlying algorithm, the implementation follows the main principles explained in this work but the algorithm design is likely different than the one implemented for the results discussed in the original paper.INCOMPLETE IMPLEMENTATION
- 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 AlgorithmB(AlgorithmB algorithmB)
Copy ConstructorAlgorithmB(IdGroupingToken groupId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entityOutputTypeAdapter
createOutputTypeAdapter(OutputType outputType)
Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builingAlgorithmB
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleprotected void
executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes)
Execute the time period for the registered modesClass<? extends InteractorAccessor<?>>
getCompatibleAccessor()
this accessee provides access to this accessorAlgorithmBSimulationData
getIterationData()
Return the simulation data for the current iterationint
getIterationIndex()
Collect the current iteration index of the simulationvoid
reset()
All components should be able to reset going back to some representative initial stateAlgorithmB
shallowClone()
Create a shallow copy of this entityprotected void
verifyComponentCompatibility()
Verify if the create traffic assignment (sbu)components are compatible with each other and the created transport network.protected void
verifyNetworkDemandZoningCompatibility()
Verify if the traffic assignment inputs (components which are provided upon creation and not subcomponents that are created as part of the build process of the assignment are compatible).-
Methods inherited from class org.goplanit.assignment.StaticTrafficAssignment
executeEquilibration, executeTimePeriod
-
Methods inherited from class org.goplanit.assignment.TrafficAssignment
checkForEmptyComponents, createLoggingPrefix, createTransportNetwork, disbandTransportNetwork, execute, finalizeAfterExecution, getDemands, getGapFunction, getInfrastructureNetwork, getOutputManager, getPhysicalCost, getSmoothing, getTotalNumberOfNetworkSegments, getTotalNumberOfNetworkVertices, getTrafficAssignmentComponent, getTransportNetwork, getVirtualCost, getZoning, initialiseBeforeExecution, logAllSettings, logRegisteredComponentName, 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
clone, 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
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
AlgorithmB
public AlgorithmB(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- group the id generator will be using when genarting the id
-
AlgorithmB
public AlgorithmB(AlgorithmB algorithmB)
Copy Constructor- Parameters:
algorithmB
- to copy
-
-
Method Detail
-
verifyComponentCompatibility
protected void verifyComponentCompatibility() throws PlanItException
Verify 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- Specified by:
verifyComponentCompatibility
in classTrafficAssignment
- Throws:
PlanItException
- thrown if the components are not compatible
-
verifyNetworkDemandZoningCompatibility
protected void verifyNetworkDemandZoningCompatibility()
Verify if the traffic assignment inputs (components which are provided upon creation and not subcomponents that are created as part of the build process of the assignment are compatible). Called after creation of the assignment instance by the builder, but before the traffic assignment's (sub)components have been created. So this is invoked during the build of the assignment instance, not after.- Specified by:
verifyNetworkDemandZoningCompatibility
in classTrafficAssignment
-
executeTimePeriod
protected void executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes) throws PlanItException
Execute the time period for the registered modes- Specified by:
executeTimePeriod
in classStaticTrafficAssignment
- Parameters:
timePeriod
- to executemodes
- to consider- Throws:
PlanItException
- thrown if error
-
createOutputTypeAdapter
public OutputTypeAdapter createOutputTypeAdapter(OutputType outputType)
Description copied from class:TrafficAssignment
Create the output type adapter for the current output type, specifically tailored towards the assignment type that we are builing- 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
-
getIterationIndex
public int getIterationIndex()
Collect the current iteration index of the simulation- Specified by:
getIterationIndex
in classTrafficAssignment
- Returns:
- current iteration index
-
getIterationData
public AlgorithmBSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
shallowClone
public AlgorithmB shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classStaticTrafficAssignment
- Returns:
- shallow copy of entity
-
deepClone
public AlgorithmB deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classStaticTrafficAssignment
- Returns:
- deep copy of entity
-
getCompatibleAccessor
public Class<? extends InteractorAccessor<?>> getCompatibleAccessor()
this accessee provides access to this accessor- Returns:
- class that accessee provides to
-
reset
public void reset()
All components should be able to reset going back to some representative initial state- Overrides:
reset
in classTrafficAssignment
-
collectSettingsAsKeyValueMap
public Map<String,String> collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entity- Specified by:
collectSettingsAsKeyValueMap
in classPlanitComponent<NetworkLoading>
- Returns:
- name-value map of all (user configurable) settings
-
-