private void setValue(ModelCompound compound, string alternativeName, string parameterName, double value) { var alternative = compound.ParameterAlternativeGroup(alternativeName).DefaultAlternative; var parameter = alternative.Parameter(parameterName); parameter.Value = value; _batchLogger.AddParameterValueToDebug(parameter); }
public ParameterAlternative CreateCompoundAlternative(Compound compound, string group, string alternativeName, double value, string parameterName, bool setDefault = true) { var alternativeGroup = compound.ParameterAlternativeGroup(group); var alternative = _parameterAlternativeFactory.CreateAlternativeFor(alternativeGroup).WithName(alternativeName); AddCommand(_compoundAlternativeTask.AddParameterGroupAlternativeTo(alternativeGroup, alternative)); AddCommand(_compoundAlternativeTask.SetAlternativeParameterValue(alternative.Parameter(parameterName), value)); if (setDefault) { AddCommand(_compoundAlternativeTask.SetDefaultAlternativeFor(alternativeGroup, alternative)); } return(alternative); }