protected ParameterOptimizationProblem(IParameterVectorEvaluator evaluator)
            : base(evaluator, new UniformRandomRealVectorCreator())
        {
            Parameters.Add(new FixedValueParameter <IntValue>(ProblemSizeParameterName, "The dimension of the parameter vector that is to be optimized.", new IntValue(1)));
            Parameters.Add(new ValueParameter <DoubleMatrix>(BoundsParameterName, "The bounds for each dimension of the parameter vector. If the number of bounds is smaller than the problem size then the bounds are reused in a cyclic manner.", new DoubleMatrix(new double[, ] {
                { 0, 100 }
            }, new string[] { "LowerBound", "UpperBound" })));
            Parameters.Add(new ValueParameter <StringArray>(ParameterNamesParameterName, "The element names which are used to calculate the quality of a parameter vector.", new StringArray(new string[] { "Parameter0" })));

            SolutionCreator.LengthParameter.ActualName = "ProblemSize";

            Operators.AddRange(ApplicationManager.Manager.GetInstances <IRealVectorOperator>());

            strategyVectorCreator = new StdDevStrategyVectorCreator();
            strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
            strategyVectorCrossover   = new StdDevStrategyVectorCrossover();
            strategyVectorManipulator = new StdDevStrategyVectorManipulator();
            strategyVectorManipulator.LearningRateParameter.Value        = new DoubleValue(0.5);
            strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.5);

            Operators.Add(strategyVectorCreator);
            Operators.Add(strategyVectorCrossover);
            Operators.Add(strategyVectorManipulator);
            Operators.Add(new BestSolutionAnalyzer());
            Operators.Add(new BestSolutionsAnalyzer());
            UpdateParameters();
            UpdateStrategyVectorBounds();

            RegisterEventHandlers();
        }
        public SingleObjectiveTestFunctionProblem()
            : base(new AckleyEvaluator(), new UniformRandomRealVectorCreator())
        {
            Parameters.Add(new ValueParameter <DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension.", Evaluator.Bounds));
            Parameters.Add(new ValueParameter <IntValue>("ProblemSize", "The dimension of the problem.", new IntValue(2)));
            Parameters.Add(new OptionalValueParameter <RealVector>("BestKnownSolution", "The best known solution for this test function instance."));

            Maximization.Value = Evaluator.Maximization;
            BestKnownQuality   = new DoubleValue(Evaluator.BestKnownQuality);

            strategyVectorCreator = new StdDevStrategyVectorCreator();
            strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
            strategyVectorCrossover   = new StdDevStrategyVectorCrossover();
            strategyVectorManipulator = new StdDevStrategyVectorManipulator();
            strategyVectorManipulator.LearningRateParameter.Value        = new DoubleValue(0.5);
            strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.5);

            SolutionCreator.RealVectorParameter.ActualName = "Point";
            ParameterizeSolutionCreator();
            ParameterizeEvaluator();

            InitializeOperators();
            RegisterEventHandlers();
            UpdateStrategyVectorBounds();
        }
 protected ParameterOptimizationProblem(ParameterOptimizationProblem original, Cloner cloner)
     : base(original, cloner)
 {
     strategyVectorCreator     = cloner.Clone(original.strategyVectorCreator);
     strategyVectorCrossover   = cloner.Clone(original.strategyVectorCrossover);
     strategyVectorManipulator = cloner.Clone(original.strategyVectorManipulator);
     RegisterEventHandlers();
 }
 private SingleObjectiveTestFunctionProblem(SingleObjectiveTestFunctionProblem original, Cloner cloner)
     : base(original, cloner)
 {
     strategyVectorCreator     = cloner.Clone(original.strategyVectorCreator);
     strategyVectorCrossover   = cloner.Clone(original.strategyVectorCrossover);
     strategyVectorManipulator = cloner.Clone(original.strategyVectorManipulator);
     RegisterEventHandlers();
 }