@Deprecated // use mode-specific beeline distance factors! kai, apr'15 public void setBeelineDistanceFactor(double val) { testForLocked() ; // yyyy thinking about this: this should in design maybe not be different from the other teleportation factors (reset everything // if one is set; or possibly disallow setting it at all). kai, feb'15 // memorize the global factor for ModeRoutingParams that are added later: this.beelineDistanceFactor = val ; // push the global factor to the local ones for all ModeRoutingParams that are already there: for ( ModeRoutingParams params : this.getModeRoutingParams().values() ) { params.setBeelineDistanceFactor( val ); } }
@Override public void addParameterSet(final ConfigGroup set) { if ( set.getName().equals( ModeRoutingParams.SET_TYPE ) && !this.acceptModeParamsWithoutClearing ) { clearParameterSetsForType( set.getName() ); this.acceptModeParamsWithoutClearing = true; } ModeRoutingParams pars = (ModeRoutingParams) set ; // for the time being pushing the "global" factor into the local ones if they are not initialized by // themselves. Necessary for some tests; maybe we should eventually disable them. kai, feb'15 if ( pars.getBeelineDistanceFactor()== null ) { pars.setBeelineDistanceFactor( this.beelineDistanceFactor ); } super.addParameterSet( set ); }
params.setBeelineDistanceFactor(1.); double tt = new FreespeedFactorRoutingModule( "mode", f.s.getPopulation().getFactory(), ModeRoutingParams params = new ModeRoutingParams("mode") ; params.setTeleportedModeFreespeedFactor(3.); params.setBeelineDistanceFactor(2.); double tt = new FreespeedFactorRoutingModule( "mode", f.s.getPopulation().getFactory(), params.setBeelineDistanceFactor(1.); params.setTeleportedModeFreespeedLimit(5.); f.s.getConfig().plansCalcRoute().addModeRoutingParams(params);
params.setBeelineDistanceFactor(1.3); params.setTeleportedModeSpeed(1.); config.plansCalcRoute().addModeRoutingParams( params );