1 package org.matsim.core.replanning.choosers;
36 static int hash(
final int value) {
39 x = ((x >>> 16) ^ x) * 0x119de1f3;
40 x = ((x >>> 16) ^ x) * 0x119de1f3;
49 double[] w =
new double[weights.size()];
55 for (
int i = 0; i < weights.size(); i++) {
58 int term = (permute ? hash(person.
getId().index()) >>> perm : person.
getId().index()) % iter;
65 w[i] = weights.getWeight(i);
74 for (
int i = 0, max = weights.size(); i < max; i++) {
77 return weights.getStrategy(i);
static Random getRandom()
static< P extends BasicPlan, R > boolean isOnlySelector(GenericPlanStrategy< P, R > planStrategy)
ForceInnovationStrategyChooser(int iter, Permute permute)
GenericPlanStrategy< PL, AG > chooseStrategy(HasPlansAndId< PL, AG > person, String subpopulation, ReplanningContext replanningContext, Weights< PL, AG > weights)