@Override public void addParam(final String key, final String value) { // adding underscore parameters is still supported for backward compatibility. if (key != null && key.startsWith(MODULE)) { StrategySettings settings = getStrategySettings( Id.create(key.substring(MODULE.length()), StrategySettings.class), true); settings.setStrategyName(value); } else if (key != null && key.startsWith(MODULE_PROBABILITY)) { StrategySettings settings = getStrategySettings( Id.create(key.substring(MODULE_PROBABILITY.length()), StrategySettings.class), true); settings.setWeight(Double.parseDouble(value)); } else if (key != null && key.startsWith(MODULE_DISABLE_AFTER_ITERATION)) { StrategySettings settings = getStrategySettings( Id.create( key.substring(MODULE_DISABLE_AFTER_ITERATION.length()), StrategySettings.class), true); settings.setDisableAfter(Integer.parseInt(value)); } else if (key != null && key.startsWith(MODULE_EXE_PATH)) { StrategySettings settings = getStrategySettings( Id.create(key.substring(MODULE_EXE_PATH.length()), StrategySettings.class), true); settings.setExePath(value); } else if (key != null && key.startsWith(MODULE_SUBPOPULATION)) { StrategySettings settings = getStrategySettings( Id.create(key.substring(MODULE_SUBPOPULATION.length()), StrategySettings.class), true); settings.setSubpopulation(value); } else { delegate.addParam(key, value); } }
public void setPlanSelectorForRemoval(String planSelectorForRemoval) { switch (planSelectorForRemoval) { case "SelectExpBeta": throw new RuntimeException( "'SelectExpBeta' was replaced by 'SelectExpBetaForRemoval' in the plans removal setting"); case "ChangeExpBeta": throw new RuntimeException( "'ChangeExpBeta' was replaced by 'ChangeExpBetaForRemoval' in the plans removal setting"); case "PathSizeLogitSelector": throw new RuntimeException( "'PathSizeLogitSelector' was replaced by 'PathSizeLogitSelectorForRemoval' in the plans removal setting"); default: delegate.setPlanSelectorForRemoval(planSelectorForRemoval); } }
@Override public String getValue(final String key) { // first check if the parameter is in "underscored" form if (key.startsWith(MODULE) || key.startsWith(MODULE_PROBABILITY) || key.startsWith(MODULE_DISABLE_AFTER_ITERATION) || key.startsWith(MODULE_EXE_PATH) || key.startsWith(MODULE_SUBPOPULATION)) { throw new IllegalArgumentException( "getting underscored parameter " + key + " is not allowed anymore. The supported way to get those parameters is via parameter sets."); } return delegate.getValue(key); }
@Override public final Map<String, String> getParams() { return delegate.getParams(); }
public void setFractionOfIterationsToDisableInnovation(double fraction) { delegate.setFractionOfIterationsToDisableInnovation(fraction); }
public double getFractionOfIterationsToDisableInnovation() { return delegate.getFractionOfIterationsToDisableInnovation(); }
public void setPlanSelectorForRemoval(String planSelectorForRemoval) { delegate.setPlanSelectorForRemoval(planSelectorForRemoval); }
public String getPlanSelectorForRemoval() { return delegate.getPlanSelectorForRemoval(); }
public long getExternalExeTimeOut() { return delegate.getExternalExeTimeOut(); }
public void setExternalExeTimeOut(long externalExeTimeOut) { delegate.setExternalExeTimeOut(externalExeTimeOut); }
public String getExternalExeTmpFileRootDir() { return delegate.getExternalExeTmpFileRootDir(); }
public void setExternalExeTmpFileRootDir(String externalExeTmpFileRootDir) { delegate.setExternalExeTmpFileRootDir(externalExeTmpFileRootDir); }
public String getExternalExeConfigTemplate() { return delegate.getExternalExeConfigTemplate(); }
public void setExternalExeConfigTemplate(String externalExeConfigTemplate) { delegate.setExternalExeConfigTemplate(externalExeConfigTemplate); }
public int getMaxAgentPlanMemorySize() { return delegate.getMaxAgentPlanMemorySize(); }
public void setMaxAgentPlanMemorySize(int maxAgentPlanMemorySize) { delegate.setMaxAgentPlanMemorySize(maxAgentPlanMemorySize); }