Exemple #1
0
        public OffspringSelectionGeneticAlgorithm CreateGeSymbolicRegressionSample()
        {
            var ga = new OffspringSelectionGeneticAlgorithm();

            #region Problem Configuration
            var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem();

            #endregion
            #region Algorithm Configuration
            ga.Name        = "Grammatical Evolution - Symbolic Regression (Poly-10)";
            ga.Description = "Grammatical evolution algorithm for solving a symbolic regression problem problem";
            ga.Problem     = problem;
            problem.Load(new PolyTen().GenerateRegressionData());

            // must occur after loading problem data because the grammar creates symbols for random constants once the data is loaded
            var consts = problem.SymbolicExpressionTreeGrammar.AllowedSymbols.OfType <Constant>().ToList();
            foreach (var c in consts)
            {
                problem.SymbolicExpressionTreeGrammar.RemoveSymbol(c);
            }

            SamplesUtils.ConfigureOsGeneticAlgorithmParameters <GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
                ga, 1000, 1, 50, 0.05, 200);
            #endregion

            return(ga);
        }
        public GeneticAlgorithm CreateGpLawnMowerSample()
        {
            GeneticAlgorithm ga = new GeneticAlgorithm();

            #region Problem Configuration

            var problem = new Problems.GeneticProgramming.LawnMower.Problem();

            #endregion
            #region Algorithm Configuration

            ga.Name        = "Genetic Programming - Lawn Mower";
            ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem";
            ga.Problem     = problem;
            SamplesUtils
            .ConfigureGeneticAlgorithmParameters
            <TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
                ga, 1000, 1, 50, 0.25, 5);
            var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator;
            mutator.Operators.SetItemCheckedState(mutator.Operators
                                                  .OfType <OnePointShaker>()
                                                  .Single(), false);

            #endregion

            return(ga);
        }
        private AlpsGeneticAlgorithm CreateAlpsGaTspSample()
        {
            AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();

            #region Problem Configuration
            var provider = new TSPLIBTSPInstanceProvider();
            var instance = provider.GetDataDescriptors().Single(x => x.Name == "ch130");
            TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
            tspProblem.Load(provider.LoadData(instance));
            tspProblem.UseDistanceMatrix.Value = true;
            #endregion
            #region Algorithm Configuration
            alpsGa.Name        = "ALPS Genetic Algorithm - TSP";
            alpsGa.Description = "An age-layered population structure genetic algorithm which solves the \"ch130\" traveling salesman problem (imported from TSPLIB)";
            alpsGa.Problem     = tspProblem;
            SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters <GeneralizedRankSelector, MultiPermutationCrossover, InversionManipulator>(alpsGa,
                                                                                                                                            numberOfLayers: 1000,
                                                                                                                                            popSize: 100,
                                                                                                                                            mutationRate: 0.05,
                                                                                                                                            elites: 1,
                                                                                                                                            plusSelection: true,
                                                                                                                                            agingScheme: AgingScheme.Polynomial,
                                                                                                                                            ageGap: 20,
                                                                                                                                            ageInheritance: 1.0,
                                                                                                                                            maxGens: 1000);
            var checkedCrossovers = new[] { typeof(EdgeRecombinationCrossover), typeof(MaximalPreservativeCrossover), typeof(OrderCrossover2) };
            var multiCrossover    = (MultiPermutationCrossover)alpsGa.Crossover;
            var crossovers        = multiCrossover.Operators.Where(c => checkedCrossovers.Any(cc => cc.IsInstanceOfType(c))).ToList();
            foreach (var c in multiCrossover.Operators)
            {
                multiCrossover.Operators.SetItemCheckedState(c, crossovers.Contains(c));
            }
            #endregion
            return(alpsGa);
        }
Exemple #4
0
        public void RunGeArtificalAntSampleTest()
        {
            var ga = CreateGeArtificialAntSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
        }
Exemple #5
0
        public void RunGeSymbolicRegressionSampleTest()
        {
            var ga = CreateGeSymbolicRegressionSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
        }
        public static OffspringSelectionGeneticAlgorithm CreateGpTimeSeriesSample()
        {
            var problem = new SymbolicTimeSeriesPrognosisSingleObjectiveProblem();

            problem.Name             = "Symbolic time series prognosis problem (Mackey Glass t=17)";
            problem.ProblemData.Name = "Mackey Glass t=17";
            problem.MaximumSymbolicExpressionTreeLength.Value             = 125;
            problem.MaximumSymbolicExpressionTreeDepth.Value              = 12;
            problem.EvaluatorParameter.Value.HorizonParameter.Value.Value = 10;

            foreach (var symbol in problem.SymbolicExpressionTreeGrammar.Symbols)
            {
                if (symbol is Exponential || symbol is Logarithm)
                {
                    symbol.Enabled = false;
                }
                else if (symbol is AutoregressiveTargetVariable)
                {
                    symbol.Enabled = true;
                    var autoRegressiveSymbol = symbol as AutoregressiveTargetVariable;
                    autoRegressiveSymbol.MinLag = -30;
                    autoRegressiveSymbol.MaxLag = -1;
                }
            }

            var osga = new OffspringSelectionGeneticAlgorithm();

            osga.Name        = "Genetic Programming - Time Series Prediction (Mackey-Glass-17)";
            osga.Description = "A genetic programming algorithm for creating a time-series model for the Mackey-Glass-17 time series.";
            osga.Problem     = problem;
            SamplesUtils.ConfigureOsGeneticAlgorithmParameters <GenderSpecificSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>
                (osga, popSize: 100, elites: 1, maxGens: 25, mutationRate: 0.15);
            osga.MaximumSelectionPressure.Value = 100;
            return(osga);
        }
        private AlpsGeneticAlgorithm CreateAlpsGaSymRegSample()
        {
            AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();

            #region Problem Configuration
            var provider       = new VladislavlevaInstanceProvider();
            var instance       = provider.GetDataDescriptors().Single(x => x.Name.StartsWith("Vladislavleva-5 F5"));
            var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
            symbRegProblem.Load(provider.LoadData(instance));

            symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value  = 35;
            symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 35;

            var grammar = (TypeCoherentExpressionGrammar)symbRegProblem.SymbolicExpressionTreeGrammar;
            grammar.Symbols.OfType <Exponential>().Single().Enabled = false;
            grammar.Symbols.OfType <Logarithm>().Single().Enabled   = false;

            #endregion
            #region Algorithm Configuration
            alpsGa.Name        = "ALPS Genetic Programming - Symbolic Regression";
            alpsGa.Description = "An ALPS-GP to solve a symbolic regression problem (Vladislavleva-5 dataset)";
            alpsGa.Problem     = symbRegProblem;
            SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters <GeneralizedRankSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(alpsGa,
                                                                                                                                                     numberOfLayers: 1000,
                                                                                                                                                     popSize: 100,
                                                                                                                                                     mutationRate: 0.25,
                                                                                                                                                     elites: 1,
                                                                                                                                                     plusSelection: false,
                                                                                                                                                     agingScheme: AgingScheme.Polynomial,
                                                                                                                                                     ageGap: 15,
                                                                                                                                                     ageInheritance: 1.0,
                                                                                                                                                     maxGens: 500);
            #endregion
            return(alpsGa);
        }
        public void RunAlpsGaSymRegSampleTest()
        {
            var alpsGa = CreateAlpsGaSymRegSample();

            alpsGa.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(alpsGa);
            Assert.AreEqual(265855, SamplesUtils.GetIntResult(alpsGa, "EvaluatedSolutions"));
        }
        public void RunSimulatedAnnealingRastriginSampleTest()
        {
            var sa = CreateSimulatedAnnealingRastriginSample();

            sa.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(sa);
            Assert.AreEqual(0.00014039606034543795, SamplesUtils.GetDoubleResult(sa, "BestQuality"));
            Assert.AreEqual(5000, SamplesUtils.GetIntResult(sa, "EvaluatedMoves"));
        }
        private GeneticAlgorithm CreateGaVrpSample()
        {
            GeneticAlgorithm ga = new GeneticAlgorithm();

            #region Problem Configuration
            VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem();

            SolomonFormatInstanceProvider instanceProvider = new SolomonInstanceProvider();
            CVRPTWData data = instanceProvider.Import(@"Test Resources\C101.txt", @"Test Resources\C101.opt.txt") as CVRPTWData;
            vrpProblem.Load(data);
            vrpProblem.Name        = "C101 VRP (imported from Solomon)";
            vrpProblem.Description = "Represents a Vehicle Routing Problem.";
            CVRPTWProblemInstance instance = vrpProblem.ProblemInstance as CVRPTWProblemInstance;
            instance.DistanceFactor.Value   = 1;
            instance.FleetUsageFactor.Value = 100;
            instance.OverloadPenalty.Value  = 100;
            instance.TardinessPenalty.Value = 100;
            instance.TimeFactor.Value       = 0;
            vrpProblem.MaximizationParameter.Value.Value = false;
            instance.UseDistanceMatrix.Value             = true;
            instance.Vehicles.Value = 25;
            #endregion
            #region Algorithm Configuration
            ga.Name        = "Genetic Algorithm - VRP";
            ga.Description = "A genetic algorithm which solves the \"C101\" vehicle routing problem (imported from Solomon)";
            ga.Problem     = vrpProblem;
            SamplesUtils.ConfigureGeneticAlgorithmParameters <TournamentSelector, MultiVRPSolutionCrossover, MultiVRPSolutionManipulator>(
                ga, 100, 1, 1000, 0.05, 3);

            var xOver = (MultiVRPSolutionCrossover)ga.Crossover;
            foreach (var op in xOver.Operators)
            {
                xOver.Operators.SetItemCheckedState(op, false);
            }
            xOver.Operators.SetItemCheckedState(xOver.Operators
                                                .OfType <PotvinRouteBasedCrossover>()
                                                .Single(), true);
            xOver.Operators.SetItemCheckedState(xOver.Operators
                                                .OfType <PotvinSequenceBasedCrossover>()
                                                .Single(), true);

            var manipulator = (MultiVRPSolutionManipulator)ga.Mutator;
            foreach (var op in manipulator.Operators)
            {
                manipulator.Operators.SetItemCheckedState(op, false);
            }
            manipulator.Operators.SetItemCheckedState(manipulator.Operators
                                                      .OfType <PotvinOneLevelExchangeMainpulator>()
                                                      .Single(), true);
            manipulator.Operators.SetItemCheckedState(manipulator.Operators
                                                      .OfType <PotvinTwoLevelExchangeManipulator>()
                                                      .Single(), true);
            #endregion

            return(ga);
        }
        public void RunGaussianProcessRegressionSample()
        {
            var gpr = CreateGaussianProcessRegressionSample();

            gpr.SetSeedRandomly = false;
            gpr.Seed            = 1618551877;
            SamplesUtils.RunAlgorithm(gpr);
            Assert.AreEqual(-940.60591737780555, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
            Assert.AreEqual(0.99560909041069334, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
        }
Exemple #12
0
        public void RunGaussianProcessRegressionSample()
        {
            var gpr = CreateGaussianProcessRegressionSample();

            gpr.SetSeedRandomly = false;
            gpr.Seed            = 1618551877;
            SamplesUtils.RunAlgorithm(gpr);
            Assert.AreEqual(-940.70700288855619, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
            Assert.AreEqual(0.99563390794061979, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
        }
        public void RunGaussianProcessRegressionSample()
        {
            var gpr = CreateGaussianProcessRegressionSample();

            gpr.SetSeedRandomly = false;
            gpr.Seed            = 1618551877;
            SamplesUtils.RunAlgorithm(gpr);
            Assert.AreEqual(-940.39914958616748, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
            Assert.AreEqual(0.995614091354263, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
        }
Exemple #14
0
        public void RunTabuSearchVRPSampleTest()
        {
            var vrp = CreateTabuSearchVrpSample();

            vrp.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(vrp);
            Assert.AreEqual(1473, SamplesUtils.GetDoubleResult(vrp, "BestQuality"));
            Assert.AreEqual(2102.1192622950812, SamplesUtils.GetDoubleResult(vrp, "CurrentAverageQuality"));
            Assert.AreEqual(4006, SamplesUtils.GetDoubleResult(vrp, "CurrentWorstQuality"));
            Assert.AreEqual(119072, SamplesUtils.GetIntResult(vrp, "EvaluatedMoves"));
        }
        public void RunVnsOpSampleTest()
        {
            var vns = CreateVnsOpSample();

            vns.SetSeedRandomly = false;
            SamplesUtils.RunAlgorithm(vns);
            Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "BestQuality"));
            Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentAverageQuality"));
            Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentWorstQuality"));
            Assert.AreEqual(42651753, SamplesUtils.GetIntResult(vns, "EvaluatedSolutions"));
        }
Exemple #16
0
        public void RunScatterSearchVRPSampleTest()
        {
            var ss = CreateScatterSearchVRPSample();

            ss.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ss);
            Assert.AreEqual(828.93686694283383, SamplesUtils.GetDoubleResult(ss, "BestQuality"));
            Assert.AreEqual(868.63623986983077, SamplesUtils.GetDoubleResult(ss, "CurrentAverageQuality"));
            Assert.AreEqual(1048.8333559209832, SamplesUtils.GetDoubleResult(ss, "CurrentWorstQuality"));
            Assert.AreEqual(262622, SamplesUtils.GetIntResult(ss, "EvaluatedSolutions"));
        }
        public void RunAlpsGaTspSampleTest()
        {
            var alpsGa = CreateAlpsGaTspSample();

            alpsGa.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(alpsGa);
            Assert.AreEqual(7967, SamplesUtils.GetDoubleResult(alpsGa, "BestQuality"));
            Assert.AreEqual(17565.174444444445, SamplesUtils.GetDoubleResult(alpsGa, "CurrentAverageQuality"));
            Assert.AreEqual(50295, SamplesUtils.GetDoubleResult(alpsGa, "CurrentWorstQuality"));
            Assert.AreEqual(621900, SamplesUtils.GetIntResult(alpsGa, "EvaluatedSolutions"));
        }
Exemple #18
0
        public void RunEsGriewankSampleTest()
        {
            var es = CreateEsGriewankSample();

            es.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(es);
            Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "BestQuality"));
            Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "CurrentAverageQuality"));
            Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "CurrentWorstQuality"));
            Assert.AreEqual(100020, SamplesUtils.GetIntResult(es, "EvaluatedSolutions"));
        }
Exemple #19
0
        public void RunRAPGASchedulingSampleTest()
        {
            var rapga = CreateRAPGASchedulingSample();

            rapga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(rapga);
            Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "BestQuality"));
            Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "CurrentAverageQuality"));
            Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "CurrentWorstQuality"));
            Assert.AreEqual(27100, SamplesUtils.GetIntResult(rapga, "EvaluatedSolutions"));
        }
        public void RunGaVrpSampleTest()
        {
            var ga = CreateGaVrpSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
            Assert.AreEqual(1828.9368669428338, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
            Assert.AreEqual(1830.1444308908331, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
            Assert.AreEqual(1871.7128510304112, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
            Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
        }
        public void RunOSESGriewankSampleTest()
        {
            var es = CreateOSESGriewankSample();

            es.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(es);
            Assert.AreEqual(1.80366417E-07, SamplesUtils.GetDoubleResult(es, "BestQuality"), 1.0E-15);
            Assert.AreEqual(4.84418627E-07, SamplesUtils.GetDoubleResult(es, "CurrentAverageQuality"), 1.0E-15);
            Assert.AreEqual(9.20629802E-07, SamplesUtils.GetDoubleResult(es, "CurrentWorstQuality"), 1.0E-15);
            Assert.AreEqual(39750, SamplesUtils.GetIntResult(es, "EvaluatedSolutions"));
        }
Exemple #22
0
        public void RunGaGroupingProblemSampleTest()
        {
            var ga = CreateGaGroupingProblemSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
            Assert.AreEqual(127, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
            Assert.AreEqual(129, 38, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
            Assert.AreEqual(132, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
            Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
        }
        public void RunIslandGaTspSampleTest()
        {
            var ga = CreateIslandGaTspSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
            Assert.AreEqual(9918, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
            Assert.AreEqual(10324.64, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
            Assert.AreEqual(11823, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
            Assert.AreEqual(495500, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
        }
Exemple #24
0
        public void RunTabuSearchTspSampleTest()
        {
            var ts = CreateTabuSearchTspSample();

            ts.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ts);
            Assert.AreEqual(6294, SamplesUtils.GetDoubleResult(ts, "BestQuality"));
            Assert.AreEqual(7380.0386666666664, SamplesUtils.GetDoubleResult(ts, "CurrentAverageQuality"));
            Assert.AreEqual(8328, SamplesUtils.GetDoubleResult(ts, "CurrentWorstQuality"));
            Assert.AreEqual(750000, SamplesUtils.GetIntResult(ts, "EvaluatedMoves"));
        }
        public void RunGpArtificialAntSampleTest()
        {
            var ga = CreateGpArtificialAntSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
            Assert.AreEqual(81, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
            Assert.AreEqual(48.19, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
            Assert.AreEqual(0, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
            Assert.AreEqual(50950, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
        }
        public void RunLocalSearchKnapsackSampleTest()
        {
            var ls = CreateLocalSearchKnapsackSample();

            ls.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ls);
            Assert.AreEqual(345, SamplesUtils.GetDoubleResult(ls, "BestQuality"));
            Assert.AreEqual(340.70731707317071, SamplesUtils.GetDoubleResult(ls, "CurrentAverageQuality"));
            Assert.AreEqual(337, SamplesUtils.GetDoubleResult(ls, "CurrentWorstQuality"));
            Assert.AreEqual(82000, SamplesUtils.GetIntResult(ls, "EvaluatedMoves"));
        }
Exemple #27
0
        public void RunGaBppSampleTest()
        {
            var ga = CreateGaBppSample();

            ga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(ga);
            Assert.AreEqual(0.59369488300408157, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-6);
            Assert.AreEqual(0.51834350243004124, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-6);
            Assert.AreEqual(0.36227753691428577, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-6);
            Assert.AreEqual(15250, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
        }
        public void RunGpTimeSeriesSampleTest()
        {
            var osga = CreateGpTimeSeriesSample();

            osga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(osga);

            Assert.AreEqual(0.020952753415199643, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
            Assert.AreEqual(0.023220938866319357, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
            Assert.AreEqual(0.023716788824595391, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
            Assert.AreEqual(48200, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
        }
        public void RunGpMultiplexerSampleTest()
        {
            var osga = CreateGpMultiplexerSample();

            osga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(osga);

            Assert.AreEqual(1856, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
            Assert.AreEqual(1784.76, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
            Assert.AreEqual(1536, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
            Assert.AreEqual(66900, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
        }
        public void RunGpTimeSeriesSampleTest()
        {
            var osga = CreateGpTimeSeriesSample();

            osga.SetSeedRandomly.Value = false;
            SamplesUtils.RunAlgorithm(osga);

            Assert.AreEqual(0.015441526903606416, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
            Assert.AreEqual(0.017420834241279298, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
            Assert.AreEqual(0.065195703753298972, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
            Assert.AreEqual(92000, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
        }