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,Cloneable,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 PlanitComponent<NetworkLoading>clone()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 voidexecuteTimePeriod(TimePeriod timePeriod, Set<Mode> modes)Execute the time period for the registered modesClass<? extends InteractorAccessor<?>>getCompatibleAccessor()this accessee provides access to this accessorAlgorithmBSimulationDatagetIterationData()Return the simulation data for the current iterationintgetIterationIndex()Collect the current iteration index of the simulationvoidreset()All components should be able to reset going back to some representative initial stateprotected voidverifyComponentCompatibility()Verify if the create traffic assignment (sbu)components are compatible with each other and the created transport network.protected voidverifyNetworkDemandZoningCompatibility()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, 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
-
-
-
-
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 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- Specified by:
verifyComponentCompatibilityin 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:
verifyNetworkDemandZoningCompatibilityin classTrafficAssignment
-
executeTimePeriod
protected void executeTimePeriod(TimePeriod timePeriod, Set<Mode> modes) throws PlanItException
Execute the time period for the registered modes- Specified by:
executeTimePeriodin classStaticTrafficAssignment- Parameters:
timePeriod- to executemodes- to consider- Throws:
PlanItException- thrown if error
-
createOutputTypeAdapter
public OutputTypeAdapter createOutputTypeAdapter(OutputType outputType)
Description copied from class:TrafficAssignmentCreate 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
-
getIterationData
public AlgorithmBSimulationData getIterationData()
Return the simulation data for the current iteration- Returns:
- simulation data
-
clone
public PlanitComponent<NetworkLoading> clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classPlanitComponent<NetworkLoading>- Returns:
- shallow 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:
resetin classTrafficAssignment
-
-