MATSIM
StrategyChooser.java
Go to the documentation of this file.
1 package org.matsim.core.replanning.choosers;
2 
7 
11 public interface StrategyChooser<T extends BasicPlan, I extends HasPlansAndId<? extends BasicPlan, I>> {
12 
13  default void beforeReplanning(ReplanningContext replanningContext) {
14  }
15 
16  GenericPlanStrategy<T, I> chooseStrategy(HasPlansAndId<T, I> person, final String subpopulation, ReplanningContext replanningContext, Weights<T,I> weights);
17 
18 
19  interface Weights<T extends BasicPlan, I> {
20 
21 
22  int size();
23 
24  double getWeight(int idx);
25 
27 
28  double getTotalWeights();
29 
30  }
31 }
GenericPlanStrategy< T, I > getStrategy(int idx)
GenericPlanStrategy< T, I > chooseStrategy(HasPlansAndId< T, I > person, final String subpopulation, ReplanningContext replanningContext, Weights< T, I > weights)
default void beforeReplanning(ReplanningContext replanningContext)