コード例 #1
0
ファイル: CompoundMapper.cs プロジェクト: VKEkbote/PK-Sim
        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);
        }
コード例 #2
0
        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);
        }