Class ChangeSingleLegMode
- java.lang.Object
-
- org.matsim.core.replanning.modules.AbstractMultithreadedModule
-
- org.matsim.core.replanning.modules.ChangeSingleLegMode
-
- All Implemented Interfaces:
PlanStrategyModule
,GenericPlanStrategyModule<Plan>
public class ChangeSingleLegMode extends AbstractMultithreadedModule
Changes the transportation mode of one leg in a plan to a randomly chosen mode, given a list of possible modes. Insures that the newly chosen mode is different from the existing mode (if possible) By default, the module chooses between "car" and "pt". If other modes should be used, it can be done so in the configuration. Also, this module is able to (optionally) respect car-availability:<module name="changeMode"> <!-- provide a comma-separated list of leg modes --> <param name="modes" value="car,walk,bike" /> <param name="ignoreCarAvailability" value="false" /> </module>
- Author:
- mrieser
- See Also:
ChooseRandomSingleLegMode
-
-
Constructor Summary
Constructors Constructor Description ChangeSingleLegMode(int nOfThreads, String[] modes, boolean ignoreCarAvailabilty)
ChangeSingleLegMode(GlobalConfigGroup globalConfigGroup, ChangeModeConfigGroup changeLegModeConfigGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanAlgorithm
getPlanAlgoInstance()
Design comments: The way I understand this, the instances that this method returns need to be thread-safe (i.e.-
Methods inherited from class org.matsim.core.replanning.modules.AbstractMultithreadedModule
afterFinishReplanningHook, afterPrepareReplanningHook, beforeFinishReplanningHook, beforePrepareReplanningHook, finishReplanning, getReplanningContext, handlePlan, prepareReplanning
-
-
-
-
Constructor Detail
-
ChangeSingleLegMode
public ChangeSingleLegMode(GlobalConfigGroup globalConfigGroup, ChangeModeConfigGroup changeLegModeConfigGroup)
-
ChangeSingleLegMode
public ChangeSingleLegMode(int nOfThreads, String[] modes, boolean ignoreCarAvailabilty)
-
-
Method Detail
-
getPlanAlgoInstance
public PlanAlgorithm getPlanAlgoInstance()
Description copied from class:AbstractMultithreadedModule
Design comments:- The way I understand this, the instances that this method returns need to be thread-safe (i.e. independent from each other). They can, for example, not rely on the same instance of the router. kai, dec'12
- Specified by:
getPlanAlgoInstance
in classAbstractMultithreadedModule
-
-