21 package org.matsim.core.config.groups;
23 import java.util.Arrays;
24 import java.util.Collection;
25 import java.util.Collections;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.LinkedHashMap;
32 import org.apache.logging.log4j.LogManager;
33 import org.apache.logging.log4j.Logger;
72 private static final String
WAITING =
"waiting";
171 return mode +
" interaction";
178 throw new IllegalArgumentException(key +
": getValue access disabled; use direct getter");
181 private static final String
msg =
" is deprecated config syntax; please use the more " +
182 "modern hierarchical format; your output_config.xml " +
183 "will be in the correct version; the old version will fail eventually, since we want to reduce the " +
184 "workload on this backwards compatibility (look into " +
185 "PlanCalcScoreConfigGroup or PlanCalcRouteConfigGroup if you want to know what we mean).";
188 public void addParam(
final String key,
final String value) {
190 if (key.startsWith(
"monetaryDistanceCostRate")) {
191 throw new RuntimeException(
"Please use monetaryDistanceRate (without `cost'). Even better, use config v2, " 192 +
"mode-parameters (see output of any recent run), and mode-specific monetary " +
"distance rate.");
193 }
else if (WAITING_PT.equals(key)) {
198 else if (key.startsWith(
"activityType_")) {
199 log.warn( key + msg );
200 usesDeprecatedSyntax = true ;
207 }
else if (key.startsWith(
"activityPriority_")) {
208 log.warn( key + msg );
209 usesDeprecatedSyntax = true ;
212 }
else if (key.startsWith(
"activityTypicalDuration_")) {
213 log.warn( key + msg );
214 usesDeprecatedSyntax = true ;
217 }
else if (key.startsWith(
"activityMinimalDuration_")) {
218 log.warn( key + msg );
219 usesDeprecatedSyntax = true ;
222 }
else if (key.startsWith(
"activityOpeningTime_")) {
223 log.warn( key + msg );
224 usesDeprecatedSyntax = true ;
227 }
else if (key.startsWith(
"activityLatestStartTime_")) {
228 log.warn( key + msg );
229 usesDeprecatedSyntax = true ;
232 }
else if (key.startsWith(
"activityEarliestEndTime_")) {
233 log.warn( key + msg );
234 usesDeprecatedSyntax = true ;
237 }
else if (key.startsWith(
"activityClosingTime_")) {
238 log.warn( key + msg );
239 usesDeprecatedSyntax = true ;
242 }
else if (key.startsWith(
"scoringThisActivityAtAll_")) {
243 log.warn( key + msg );
244 usesDeprecatedSyntax = true ;
247 }
else if (key.startsWith(
"traveling_")) {
248 log.warn( key + msg );
249 usesDeprecatedSyntax = true ;
252 }
else if (key.startsWith(
"marginalUtlOfDistance_")) {
253 log.warn( key + msg );
254 usesDeprecatedSyntax = true ;
257 }
else if (key.startsWith(
"monetaryDistanceRate_")) {
258 log.warn( key + msg );
259 usesDeprecatedSyntax = true ;
262 }
else if (
"monetaryDistanceRateCar".equals(key)) {
263 log.warn( key + msg );
264 usesDeprecatedSyntax = true ;
267 }
else if (
"monetaryDistanceRatePt".equals(key)) {
268 log.warn( key + msg );
269 usesDeprecatedSyntax = true ;
272 }
else if (key.startsWith(
"constant_")) {
273 log.warn( key + msg );
274 usesDeprecatedSyntax = true ;
280 else if (
"traveling".equals(key)) {
281 log.warn( key + msg );
282 usesDeprecatedSyntax = true ;
284 }
else if (
"travelingPt".equals(key)) {
285 log.warn( key + msg );
286 usesDeprecatedSyntax = true ;
288 }
else if (
"travelingWalk".equals(key)) {
289 log.warn( key + msg );
290 usesDeprecatedSyntax = true ;
292 }
else if (
"travelingOther".equals(key)) {
293 log.warn( key + msg );
294 usesDeprecatedSyntax = true ;
296 }
else if (
"travelingBike".equals(key)) {
297 log.warn( key + msg );
298 usesDeprecatedSyntax = true ;
303 else if (
"marginalUtlOfDistanceCar".equals(key)) {
304 log.warn( key + msg );
305 usesDeprecatedSyntax = true ;
307 }
else if (
"marginalUtlOfDistancePt".equals(key)) {
308 log.warn( key + msg );
309 usesDeprecatedSyntax = true ;
311 }
else if (
"marginalUtlOfDistanceWalk".equals(key)) {
312 log.warn( key + msg );
313 usesDeprecatedSyntax = true ;
315 }
else if (
"marginalUtlOfDistanceOther".equals(key)) {
316 log.warn( key + msg );
317 usesDeprecatedSyntax = true ;
322 else if (
"constantCar".equals(key)) {
323 log.warn( key + msg );
324 usesDeprecatedSyntax = true ;
326 }
else if (
"constantWalk".equals(key)) {
327 log.warn( key + msg );
328 usesDeprecatedSyntax = true ;
330 }
else if (
"constantOther".equals(key)) {
331 log.warn( key + msg );
332 usesDeprecatedSyntax = true ;
334 }
else if (
"constantPt".equals(key)) {
335 log.warn( key + msg );
336 usesDeprecatedSyntax = true ;
338 }
else if (
"constantBike".equals(key)) {
339 log.warn( key + msg );
340 usesDeprecatedSyntax = true ;
346 .asList(LATE_ARRIVAL, EARLY_DEPARTURE, PERFORMING, MARGINAL_UTL_OF_MONEY, UTL_OF_LINE_SWITCH, WAITING)
365 if ((actType == null)) {
369 this.activityTypesByNumber.put(number, actType);
386 Map<String, String> map = super.getComments();
387 map.put(FRACTION_OF_ITERATIONS_TO_START_SCORE_MSA,
388 "fraction of iterations at which MSA score averaging is started. The matsim theory department " 389 +
"suggests to use this together with switching off choice set innovation (where a similar switch exists), but it has not been tested yet.");
390 map.put(USING_OLD_SCORING_BELOW_ZERO_UTILITY_DURATION,
391 "There used to be a plateau between duration=0 and duration=zeroUtilityDuration. " 392 +
"This caused durations to evolve to zero once they were below zeroUtilityDuration, causing problems. Only use this switch if you need to be " 393 +
"backwards compatible with some old results. (changed nov'13)");
395 "[utils/hr] marginal utility of doing an activity. normally positive. also the opportunity cost of " 396 +
"time if agent is doing nothing. MATSim separates the resource value of time from the direct (dis)utility of travel time, see, e.g., " 397 +
"Boerjesson and Eliasson, TR-A 59 (2014) 144-158.");
398 map.put(LATE_ARRIVAL,
399 "[utils/hr] utility for arriving late (i.e. after the latest start time). normally negative");
400 map.put(EARLY_DEPARTURE,
401 "[utils/hr] utility for departing early (i.e. before the earliest end time). Normally negative. Probably " 402 +
"implemented correctly, but not tested.");
404 "[utils/hr] additional marginal utility for waiting. normally negative. this comes on top of the opportunity cost of time. Probably " 405 +
"implemented correctly, but not tested.");
407 "[utils/hr] additional marginal utility for waiting for a pt vehicle. normally negative. this comes on top of the opportunity cost " 408 +
"of time. Default: if not set explicitly, it is equal to traveling_pt!!!");
409 map.put(BRAIN_EXP_BETA,
410 "logit model scale parameter. default: 1. Has name and default value for historical reasons " 411 +
"(see Bryan Raney's phd thesis).");
412 map.put(LEARNING_RATE,
413 "new_score = (1-learningRate)*old_score + learningRate * score_from_mobsim. learning rates " 414 +
"close to zero emulate score averaging, but slow down initial convergence");
415 map.put(UTL_OF_LINE_SWITCH,
"[utils] utility of switching a line (= transfer penalty). Normally negative");
416 map.put(MARGINAL_UTL_OF_MONEY,
417 "[utils/unit_of_money] conversion of money (e.g. toll, distance cost) into utils. Normall positive (i.e. toll/cost/fare are processed as negative amounts of money).");
418 map.put(WRITE_EXPERIENCED_PLANS,
419 "write a plans file in each iteration directory which contains what each agent actually did, and the score it received.");
432 Set<String> activities =
new HashSet<>();
447 Set<String> modes =
new HashSet<>();
475 final Collection<ScoringParameterSet> parameters = (Collection<ScoringParameterSet>)
getParameterSets(
477 final Map<String, ScoringParameterSet> map =
new LinkedHashMap<>();
483 map.put(pars.getSubpopulation(), pars);
525 if (params == null) {
546 throw new IllegalArgumentException(
set.
getName());
553 if (previous != null) {
554 log.info(
"scoring parameters for subpopulation " + previous.
getSubpopulation() +
" were just replaced.");
561 super.addParameterSet(params);
587 throw new IllegalArgumentException(type);
598 final String s = ((ScoringParameterSet) module).getSubpopulation();
600 throw new IllegalStateException(
"already a parameter set for subpopulation " + s);
604 throw new IllegalArgumentException(module.
getName());
610 super.checkConsistency(config);
619 +
" Otherwise, crashes can be expected.");
642 for( String mode : scoringParameterSet.getModes().keySet() ){
649 if (
params.isScoringThisActivityAtAll() &&
params.getTypicalDuration().isUndefined()) {
651 +
", the typical duration is undefined. This will lead to errors that are difficult to debug, " 652 +
"so rather aborting here.");
820 public final static String
SET_TYPE =
"activityParams";
830 public static final String
TYPICAL_DURATION_CMT =
"typical duration of activity. needs to be defined and non-zero. in sec.";
870 public static final String
ACVITITY_TYPE_CMT =
"all activity types that occur in the plans file need to be defined by their own sections here";
910 final Map<String, String> map = super.getComments();
912 StringBuilder str =
new StringBuilder();
913 str.append(
"method to compute score at typical duration. Options: | ");
915 str.append(value.name());
920 str.append(
" for backwards compatibility (all activities same score; higher proba to drop long acts).");
975 "Setting minimalDuration different from zero is discouraged. It is probably implemented correctly, " 976 +
"but there is as of now no indication that it makes the results more realistic. KN, Sep'08" 1073 static final String SCORING_THIS_ACTIVITY_AT_ALL =
"scoringThisActivityAtAll";
1092 final static String
SET_TYPE =
"modeParams";
1094 private static final String MONETARY_DISTANCE_RATE =
"monetaryDistanceRate";
1095 private static final String MONETARY_DISTANCE_RATE_CMT =
"[unit_of_money/m] conversion of distance into money. Normally negative.";
1097 private static final String MARGINAL_UTILITY_OF_TRAVELING =
"marginalUtilityOfTraveling_util_hr";
1099 private static final String CONSTANT =
"constant";
1100 private static final String CONSTANT_CMT =
"[utils] alternative-specific constant. Normally per trip, but that is probably buggy for multi-leg trips.";
1102 public static final String MODE =
"mode";
1104 private static final String DAILY_MONETARY_CONSTANT =
"dailyMonetaryConstant";
1105 private static final String DAILY_MONETARY_CONSTANT_CMT =
"[unit_of_money/day] Fixed cost of mode, per day.";
1107 private static final String DAILY_UTILITY_CONSTANT =
"dailyUtilityConstant";
1109 private String mode = null;
1110 private double traveling = -6.0;
1111 private double distance = 0.0;
1112 private double monetaryDistanceRate = 0.0;
1113 private double constant = 0.0;
1114 private double dailyMonetaryConstant = 0.0;
1115 private double dailyUtilityConstant = 0.0;
1137 final Map<String, String> map = super.getComments();
1138 map.put(MARGINAL_UTILITY_OF_TRAVELING,
1139 "[utils/hr] additional marginal utility of traveling. normally negative. this comes on top " 1140 +
"of the opportunity cost of time");
1141 map.put(
"marginalUtilityOfDistance_util_m",
1142 "[utils/m] utility of traveling (e.g. walking or driving) per m, normally negative. this is " 1143 +
"on top of the time (dis)utility.");
1144 map.put(MONETARY_DISTANCE_RATE, MONETARY_DISTANCE_RATE_CMT);
1145 map.put(CONSTANT, CONSTANT_CMT );
1146 map.put(DAILY_UTILITY_CONSTANT,
"[utils] daily utility constant. " 1147 +
"default=0 to be backwards compatible");
1148 map.put(DAILY_MONETARY_CONSTANT, DAILY_MONETARY_CONSTANT_CMT ) ;
1159 public String getMode() {
1164 public
ModeParams setMarginalUtilityOfTraveling(
double traveling) {
1166 this.traveling = traveling;
1170 public
double getMarginalUtilityOfTraveling() {
1171 return this.traveling;
1175 public
double getMarginalUtilityOfDistance() {
1179 public
ModeParams setMarginalUtilityOfDistance(
double distance) {
1181 this.distance = distance;
1190 public
double getConstant() {
1191 return this.constant;
1199 this.constant = constant;
1207 public
double getMonetaryDistanceRate() {
1208 return this.monetaryDistanceRate;
1215 public
ModeParams setMonetaryDistanceRate(
double monetaryDistanceRate) {
1217 this.monetaryDistanceRate = monetaryDistanceRate;
1224 public
double getDailyMonetaryConstant() {
1225 return dailyMonetaryConstant;
1232 public
ModeParams setDailyMonetaryConstant(
double dailyMonetaryConstant) {
1233 this.dailyMonetaryConstant = dailyMonetaryConstant;
1238 public
double getDailyUtilityConstant() {
1239 return dailyUtilityConstant;
1243 public
ModeParams setDailyUtilityConstant(
double dailyUtilityConstant) {
1244 this.dailyUtilityConstant = dailyUtilityConstant;
1252 public static final String
SET_TYPE =
"scoringParameters";
1256 this.subpopulation = subpopulation;
1263 private String subpopulation = null;
1265 private double lateArrival = -18.0;
1266 private double earlyDeparture = -0.0;
1267 private double performing = +6.0;
1269 private double waiting = -0.0;
1271 private double marginalUtilityOfMoney = 1.0;
1273 private double utilityOfLineSwitch = -1;
1275 private Double waitingPt = null;
1286 this.lateArrival = lateArrival;
1291 return earlyDeparture;
1297 this.earlyDeparture = earlyDeparture;
1307 this.performing = performing;
1312 return marginalUtilityOfMoney;
1318 this.marginalUtilityOfMoney = marginalUtilityOfMoney;
1323 return utilityOfLineSwitch;
1329 this.utilityOfLineSwitch = utilityOfLineSwitch;
1334 return this.waiting;
1340 this.waiting = waiting;
1344 public String getSubpopulation() {
1345 return subpopulation;
1352 public
void setSubpopulation(String subpopulation) {
1354 if (this.subpopulation != null) {
1355 throw new IllegalStateException(
1356 "cannot change subpopulation in a scoring parameter set, as it is used for indexing.");
1359 this.subpopulation = subpopulation;
1364 return waitingPt != null ? waitingPt
1370 this.waitingPt = waitingPt;
1382 throw new IllegalArgumentException(type);
1395 throw new IllegalStateException(
"already a parameter set for activity type " + t);
1402 final String m = ((ModeParams) module).getMode();
1404 throw new IllegalStateException(
"already a parameter set for mode " + m);
1408 throw new IllegalArgumentException(module.
getName());
1413 return this.getActivityParamsPerType().keySet();
1417 Collection<ActivityParams> collection = (Collection<ActivityParams>)
getParameterSets(
1428 final Map<String, ActivityParams> map =
new LinkedHashMap<>();
1431 map.put(pars.getActivityType(), pars);
1438 return this.getActivityParamsPerType().get(actType);
1444 if (params == null) {
1454 final Map<String, ModeParams> map =
new LinkedHashMap<>();
1460 map.put(pars.getMode(), pars);
1463 return Collections.unmodifiableMap(map);
1471 if (modeParams == null) {
1481 if (previous != null) {
1485 log.info(
"mode parameters for mode " + previous.
getMode() +
" were just overwritten.");
1488 super.addParameterSet(params);
1494 if (previous != null) {
1496 log.error(
"ERROR: Activity parameters for activity type " + previous.
getActivityType()
1497 +
" were just overwritten. This happens most " 1498 +
"likely because you defined them in the config file and the Controler overwrites them. Or the other way " 1499 +
"round. pt interaction has problems, but doing what you are doing here will just cause " 1500 +
"other (less visible) problem. Please take the effort to discuss with the core team " 1501 +
"what needs to be done. kai, nov'12");
1504 +
" were just overwritten.");
1512 super.addParameterSet(params);
1523 super.checkConsistency(config);
1526 boolean hasOpeningAndClosingTime =
false;
1527 boolean hasOpeningTimeAndLatePenalty =
false;
1534 if (actType.isScoringThisActivityAtAll()) {
1537 if (actType.getOpeningTime().isDefined() && actType.getClosingTime().isDefined()) {
1538 hasOpeningAndClosingTime =
true;
1540 if (actType.getOpeningTime().seconds() == 0. && actType.getClosingTime().seconds() > 24. * 3600 - 1) {
1541 log.error(
"it looks like you have an activity type with opening time set to 0:00 and closing " 1542 +
"time set to 24:00. This is most probably not the same as not setting them at all. " 1543 +
"In particular, activities which extend past midnight may not accumulate scores.");
1547 hasOpeningTimeAndLatePenalty =
true;
1551 if (!hasOpeningAndClosingTime && !hasOpeningTimeAndLatePenalty) {
1552 log.info(
"NO OPENING OR CLOSING TIMES DEFINED!\n\n" 1553 +
"There is no activity type that has an opening *and* closing time (or opening time and late penalty) defined.\n" 1554 +
"This usually means that the activity chains can be shifted by an arbitrary\n" 1555 +
"number of hours without having an effect on the score of the plans, and thus\n" 1556 +
"resulting in wrong results / traffic patterns.\n" 1557 +
"If you are using MATSim without time adaptation, you can ignore this warning.\n\n");
1561 +
". Setting this different from zero is " 1562 +
"discouraged since there is already the marginal utility of time as a resource. The parameter was also used " 1563 +
"in the past for pt routing; if you did that, consider setting the new " 1564 +
"parameter waitingPt instead.");
1575 private double learningRate = 1.0;
1576 private double brainExpBeta = 1.0;
1577 private double pathSizeLogitBeta = 1.0;
1579 private boolean writeExperiencedPlans =
false;
1581 private Double fractionOfIterationsToStartScoreMSA = null;
1583 private boolean usingOldScoringBelowZeroUtilityDuration =
false;
1587 return fractionOfIterationsToStartScoreMSA;
1593 this.fractionOfIterationsToStartScoreMSA = fractionOfIterationsToStartScoreMSA;
1598 return learningRate;
1604 this.learningRate = learningRate;
1609 return brainExpBeta;
1615 this.brainExpBeta = brainExpBeta;
1620 return pathSizeLogitBeta;
1627 log.warn(
"Setting pathSizeLogitBeta different from zero is experimental. KN, Sep'08");
1629 this.pathSizeLogitBeta = beta;
1634 return usingOldScoringBelowZeroUtilityDuration;
1645 this.usingOldScoringBelowZeroUtilityDuration = usingOldScoringBelowZeroUtilityDuration;
1650 return writeExperiencedPlans;
1656 this.writeExperiencedPlans = writeExperiencedPlans;
ActivityParams setLatestStartTime(final String latestStartTime)
void setEarlyDeparture_utils_hr(double earlyDeparture)
static final String LATE_ARRIVAL
double getPerforming_utils_hr()
Map< String, String > getComments()
void checkParameterSet(final ConfigGroup module)
Map< String, ActivityParams > getActivityParamsPerType()
ScoringParameterSet getOrCreateScoringParameters(String subpopulation)
static final String ONLYONCE
ActivityParams setLatestStartTime(final double latestStartTime)
ConfigGroup createParameterSet(final String type)
static final String WAITING
Double getFractionOfIterationsToStartScoreMSA()
ScoringParameterSet(final String subpopulation)
Collection< String > getActivityTypes()
void setMarginalUtilityOfMoney(double marginalUtilityOfMoney)
ActivityParams setMinimalDuration(final String minimalDuration)
boolean isUsingOldScoringBelowZeroUtilityDuration()
static final String SET_TYPE
ModeParams setMarginalUtilityOfTraveling(double traveling)
static final String other
final Map< String, String > getComments()
static final String EXPERIENCED_PLAN_KEY
String getTypicalDurationString()
void addParameterSet(final ConfigGroup set)
Collection< String > getActivityTypes()
boolean usesDeprecatedSyntax
void checkParameterSet(final ConfigGroup module)
double getEarlyDeparture_utils_hr()
void setActivityType(final String type)
ActivityParams getActivityParams(final String actType)
OptionalTime getMinimalDuration()
double getUtilityOfLineSwitch()
static final String SET_TYPE
static ActivityParams createStageActivityParams(String mode)
ScoringParameterSet getScoringParameters(String subpopulation)
double getEarlyDeparture_utils_hr()
ActivityParams setScoringThisActivityAtAll(boolean scoringThisActivityAtAll)
TypicalDurationScoreComputation typicalDurationScoreComputation
Collection< String > getAllModes()
boolean memorizingExperiencedPlans
void setPerforming_utils_hr(double performing)
static final String WAITING_PT
String getLatestStartTimeString()
void addParameterSet(final ConfigGroup set)
String getValue(final String key)
static final String TYPICAL_DURATION
ModeParams(final String mode)
Map< String, ModeParams > getModes()
void setLearningRate(double learningRate)
void setPathSizeLogitBeta(double beta)
PlansCalcRouteConfigGroup plansCalcRoute()
double getMarginalUtlOfWaiting_utils_hr()
OptionalTime minimalDuration
void setPerforming_utils_hr(double performing)
static final String TYPICAL_DURATION_SCORE_COMPUTATION
void setWriteExperiencedPlans(boolean writeExperiencedPlans)
static final String GROUP_NAME
ActivityParams getActivityTypeByNumber(final String number)
boolean isMemorizingExperiencedPlans()
void setEarlyDeparture_utils_hr(double earlyDeparture)
Map< String, String > getParams()
TypicalDurationScoreComputation getTypicalDurationScoreComputation()
ActivityParams getActivityParams(final String actType)
boolean isWriteExperiencedPlans()
static final String TRANSIT_ACTIVITY_TYPE
String getSubpopulation()
double getPathSizeLogitBeta()
ActivityParams setEarliestEndTime(final String earliestEndTime)
static final String BRAIN_EXP_BETA
OptionalTime latestStartTime
ActivityParams setClosingTime(final double closingTime)
ActivityParams setMinimalDuration(final double minimalDuration)
void setMarginalUtlOfWaitingPt_utils_hr(final Double waitingPt)
static final String EARLY_DEPARTURE
double getLateArrival_utils_hr()
ActivityParams setOpeningTime(final double openingTime)
double getMarginalUtlOfWaitingPt_utils_hr()
static final String WRITE_EXPERIENCED_PLANS
final boolean isInsistingOnDeprecatedConfigVersion()
void setWriteExperiencedPlans(boolean writeExperiencedPlans)
static final String MARGINAL_UTL_OF_MONEY
void setUsingOldScoringBelowZeroUtilityDuration(boolean usingOldScoringBelowZeroUtilityDuration)
OptionalTime typicalDuration
void checkConsistency(Config config)
Map< String, ModeParams > getModes()
boolean isWriteExperiencedPlans()
void setLateArrival_utils_hr(double lateArrival)
final Map< String, String > getParams()
static final OptionalTime parseOptionalTime(final String time)
static final String ACTIVITY_TYPE
double getPerforming_utils_hr()
static final String ACVITITY_TYPE_CMT
String getClosingTimeString()
OptionalTime getOpeningTime()
ActivityParams setOpeningTime(final String openingTime)
static String createStageActivityType(String mode)
final Map< String, ActivityParams > activityTypesByNumber
void addScoringParameters(final ScoringParameterSet params)
PlanCalcScoreConfigGroup()
void setLearningRate(double learningRate)
ActivityParams setTypicalDuration(final double typicalDuration)
void setPathSizeLogitBeta(double beta)
static final String TYPICAL_DURATION_CMT
double getMarginalUtilityOfMoney()
Collection< ActivityParams > getActivityParams()
boolean isUsingOldScoringBelowZeroUtilityDuration()
ActivityParams setPriority(final double priority)
final void checkConsistency(final Config config)
void setBrainExpBeta(double brainExpBeta)
String getOpeningTimeString()
ActivityParams setClosingTime(final String closingTime)
void setUtilityOfLineSwitch(double utilityOfLineSwitch)
OptionalTime getTypicalDuration()
void setMemorizingExperiencedPlans(boolean memorizingExperiencedPlans)
final Map< String, ? extends Collection<? extends ConfigGroup > > getParameterSets()
double getPathSizeLogitBeta()
static final String writeTime(final double seconds, final String timeformat)
static OptionalTime defined(double seconds)
double getMarginalUtlOfWaitingPt_utils_hr()
void setUsingOldScoringBelowZeroUtilityDuration(boolean usingOldScoringBelowZeroUtilityDuration)
Map< String, ScoringParameterSet > getScoringParametersPerSubpopulation()
final void addParam(final String param_name, final String value)
double getMarginalUtlOfWaiting_utils_hr()
ConfigGroup createParameterSet(final String type)
ActivityParams(final String type)
ActivityParams setTypicalDurationScoreComputation(TypicalDurationScoreComputation str)
void addParam(final String key, final String value)
void addActivityParams(final ActivityParams params)
boolean scoringThisActivityAtAll
ModeParams setConstant(double constant)
final TreeMap< String, String > params
ModeParams getOrCreateModeParams(String modeName)
boolean removeParameterSet(final ConfigGroup set)
void setBrainExpBeta(double brainExpBeta)
OptionalTime getLatestStartTime()
ActivityParams getOrCreateActivityParams(final String actType)
void setFractionOfIterationsToStartScoreMSA(Double val)
void setFractionOfIterationsToStartScoreMSA(Double fractionOfIterationsToStartScoreMSA)
OptionalTime getClosingTime()
Map< String, String > getComments()
static final String DEFAULT_SUBPOPULATION
static final String USING_OLD_SCORING_BELOW_ZERO_UTILITY_DURATION
Collection< String > getNetworkModes()
ModeParams setMonetaryDistanceRate(double monetaryDistanceRate)
static final String UTL_OF_LINE_SWITCH
static final String FRACTION_OF_ITERATIONS_TO_START_SCORE_MSA
ModeParams getOrCreateModeParams(String modeName)
double getMarginalUtilityOfMoney()
String getMinimalDurationString()
double getUtilityOfLineSwitch()
void setLateArrival_utils_hr(double lateArrival)
String getEarliestEndTimeString()
Collection< ActivityParams > getActivityParams()
static OptionalTime undefined()
OptionalTime earliestEndTime
ActivityParams setEarliestEndTime(final double earliestEndTime)
final ReflectiveDelegate delegate
final void testForLocked()
final GlobalConfigGroup global()
void setMarginalUtlOfWaitingPt_utils_hr(double val)
void addActivityParams(final ActivityParams params)
static final String PERFORMING
Double getFractionOfIterationsToStartScoreMSA()
void setUtilityOfLineSwitch(double utilityOfLineSwitch)
void addModeParams(final ModeParams params)
void setMarginalUtilityOfMoney(double marginalUtilityOfMoney)
double getLateArrival_utils_hr()
static final String PATH_SIZE_LOGIT_BETA
OptionalTime getEarliestEndTime()
static final String LEARNING_RATE
void addModeParams(final ModeParams params)
ActivityParams setTypicalDuration(final String typicalDuration)
void setMarginalUtlOfWaiting_utils_hr(final double waiting)
ModeParams setMarginalUtilityOfDistance(double distance)
void setMarginalUtlOfWaiting_utils_hr(double waiting)
static void createAndAddInteractionActivity(ScoringParameterSet scoringParameterSet, String mode)
boolean isScoringThisActivityAtAll()