@Override public Map<String, String> getComments() { Map<String, String> comments = super.getComments(); return comments ; } }
@Override protected void checkConsistency(Config config) { super.checkConsistency(config); if ( maxPref < minPref ) throw new IllegalStateException( "max pref "+maxPref+" lower than min "+minPref+"!" ); }
/** * Creates an instance, giving the choice on whether unknown parameter names result * in a crash or just in the parameter value being stored as a String. * * @param name the name of the module in the config file. * @param storeUnknownParametersAsStrings if true, when no annotated getter * or setter is found for a parameter name, the parameters are stored using * the default {@link ConfigGroup} behavior. This is not that safe, so be careful. */ public ReflectiveConfigGroup( final String name, final boolean storeUnknownParametersAsStrings) { super(name); this.storeUnknownParameters = storeUnknownParametersAsStrings; setters = getSetters(); stringGetters = getStringGetters(); if ( !setters.keySet().equals( stringGetters.keySet() ) ) { throw new InconsistentModuleException( "setters and getters inconsistent" ); } checkConvertNullAnnotations(); }
@Override public void addParameterSet(final ConfigGroup set) { switch (set.getName()) { case TimeAllocationMutatorSubpopulationSettings.SET_NAME: super.addParameterSet(set); break; default: throw new IllegalArgumentException( set.getName() ); } }
@Override public final Map<String, String> getParams() { final Map<String, String> map = super.getParams(); for (String f : setters.keySet()) { addParameterToMap( map , f ); } return map; }
public void addModeParams(final ModeParams params) { final ModeParams previous = this.getModes().get(params.getMode()); if (previous != null) { final boolean removed = removeParameterSet(previous); if (!removed) throw new RuntimeException("problem replacing mode params "); log.info("mode parameters for mode " + previous.getMode() + " were just overwritten."); } super.addParameterSet(params); }
@Override public final Map<String, String> getComments() { Map<String,String> map = super.getComments(); return map ; }
@Override protected void checkConsistency(Config config) { super.checkConsistency(config); if ( getStrategyName() == null || getStrategyName().length() == 0 ) { throw new RuntimeException("Strategy strategyName is not set"); } if ( getWeight() < 0.0 ) { throw new RuntimeException("Weight for strategy " + getStrategyName() + " must be >= 0.0" ); } }
public void addActivityParams(final ActivityParams params) { final ActivityParams previous = this.getActivityParams(params.getActivityType()); if (previous != null) { if (previous.getActivityType().equals(PtConstants.TRANSIT_ACTIVITY_TYPE)) { log.error("ERROR: Activity parameters for activity type " + previous.getActivityType() + " were just overwritten. This happens most " + "likely because you defined them in the config file and the Controler overwrites them. Or the other way " + "round. pt interaction has problems, but doing what you are doing here will just cause " + "other (less visible) problem. Please take the effort to discuss with the core team " + "what needs to be done. kai, nov'12"); } else { log.info("activity parameters for activity type " + previous.getActivityType() + " were just overwritten."); } final boolean removed = removeParameterSet(previous); if (!removed) throw new RuntimeException("problem replacing activity params "); } super.addParameterSet(params); }
@Override public Map<String, String> getComments() { Map<String,String> map = super.getComments(); return map; }
super.checkConsistency(config);
@Override public Map<String, String> getComments() { final Map<String, String> map = super.getComments(); map.put( "upperLimit95", "the distance to the reference point (barycenter of the mutated locations) will be below this limit in 95% of the cases." ); return map; }
@Override public Map<String, String> getComments() { final Map<String, String> map = super.getComments(); map.put( "activityTypeForContactInDesires" , "the type of the activity from which typical duration will be taken for the log form.\n"+ "This can be a real or a \"dummy\" activity type." ); return map; } }
@Override public Map<String,String> getComments() { final Map<String,String> comments = super.getComments(); comments.put( INPUT_CRS , "The Coordinates Reference System in which the coordinates are expressed in the input file." + " At import, the coordinates will be converted to the coordinate system defined in \"global\", and will" + "be converted back at export. If not specified, no conversion happens." ); return comments; }
@Override public Map<String, String> getComments() { final Map<String, String> map = super.getComments(); map.put( TYPICAL_DURATION_SCORE_COMPUTATION, "method to compute score at typical duration. Use " + TypicalDurationScoreComputation.uniform + " for backwards compatibility (all activities same score; higher proba to drop long acts).") ; return map ; }
@Override public Map<String, String> getComments() { Map<String,String> map = super.getComments(); map.put(NUMBER_OF_THREADS, "\"global\" number of threads. " + "This number is used, e.g., for replanning, but NOT in the mobsim. " + "This can typically be set to as many cores as you have available, or possibly even slightly more.") ; return map ; }
@Override public Map<String, String> getComments() { Map<String, String> comments = super.getComments(); comments.put(WRITELINKSTATSINTERVAL, "Specifies how often the link stats should be calculated and written. Use 0 to disable the generation of link stats."); comments.put(AVERAGELINKSTATSOVERITERATIONS, "Specifies over how many iterations the link volumes should be averaged that are used for the " + "link statistics. Use 1 or 0 to only use the link volumes of a single iteration. This values cannot be larger than the value specified for " + WRITELINKSTATSINTERVAL); return comments; }
@Override public Map<String,String> getComments() { final Map<String,String> map = super.getComments(); map.put( "internalizationSocialNetworkFile" , "path to the file defining the score internalization social network, if any. If null, the social network of the simulation will be used."); map.put( "internalizationRatio" , "ratio by which to multiply the scores of social contacts before suming them with the ego's score. 0 means egoism, 1 average group score maximisation." ); return map; }
@Override public Map<String, String> getComments() { final Map<String, String> map = super.getComments(); map.put( "teleportedModeSpeed" , "Speed for a teleported mode. " + "Travel time = (<beeline distance> * beelineDistanceFactor) / teleportedModeSpeed. Insert a line like this for every such mode."); map.put( TELEPORTED_MODE_FREESPEED_FACTOR, TELEPORTED_MODE_FREESPEED_FACTOR_CMT); return map; }
@Override public Map<String, String> getComments() { Map<String, String> map = super.getComments(); map.put(USE_FIXED_TIME_CYCLE, USE_FIXED_TIME_CYCLE_CMT); map.put(MAX_GREEN_SCALE, MAX_GREEN_SCALE_CMT); return map; }