예제 #1
0
        public void Init(ParamSet paramSet)
        {
            int num = 0;

            foreach (Dictionary <string, OptimizationParameter> dictionary in this.parameters.Values)
            {
                foreach (OptimizationParameter optimizationParameter in dictionary.Values)
                {
                    if (optimizationParameter.Enabled)
                    {
                        paramSet.SetParamName(num, optimizationParameter.Name);
                        paramSet.SetParam(num, optimizationParameter.Start + (optimizationParameter.Stop - optimizationParameter.Start) / 2.0);
                        paramSet.SetLowerBound(num, optimizationParameter.Start);
                        paramSet.SetUpperBound(num, optimizationParameter.Stop);
                        paramSet.SetSteps(num, optimizationParameter.Step);
                        paramSet.SetParamType(num, optimizationParameter.Type);
                        optimizationParameter.Number = num;
                        ++num;
                    }
                }
            }
        }