- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 27 edited
- 2 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs
r13260 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs
r13469 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs
r13385 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 49 49 public override bool Maximization { get { return false; } } 50 50 51 private bool[,] a llowedTogether;51 private bool[,] adjacencyMatrix; 52 52 53 53 public override void Initialize() { 54 54 Encoding.Length = ProblemSize; 55 a llowedTogether= new bool[ProblemSize, ProblemSize];55 adjacencyMatrix = new bool[ProblemSize, ProblemSize]; 56 56 var random = new System.Random(13); 57 57 for (var i = 0; i < ProblemSize - 1; i++) 58 58 for (var j = i + 1; j < ProblemSize; j++) 59 a llowedTogether[i, j] = allowedTogether[j, i] = random.Next(2) == 0;59 adjacencyMatrix[i, j] = adjacencyMatrix[j, i] = random.Next(2) == 0; 60 60 } 61 61 … … 66 66 for (var j = 0; j < groups[i].Count; j++) 67 67 for (var k = j + 1; k < groups[i].Count; k++) 68 if (!a llowedTogether[groups[i][j], groups[i][k]]) penalty++;68 if (!adjacencyMatrix[groups[i][j], groups[i][k]]) penalty++; 69 69 } 70 if (penalty > 0) return penalty + ProblemSize; 71 else return groups.Count; 70 var result = groups.Count; 71 if (penalty > 0) result += penalty + ProblemSize; 72 return result; 72 73 } 73 74 … … 102 103 ga.SetSeedRandomly.Value = false; 103 104 SamplesUtils.RunAlgorithm(ga); 104 Assert.AreEqual( 26, SamplesUtils.GetDoubleResult(ga, "BestQuality"));105 Assert.AreEqual( 27.58, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));106 Assert.AreEqual(1 05, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));105 Assert.AreEqual(127, SamplesUtils.GetDoubleResult(ga, "BestQuality")); 106 Assert.AreEqual(129,38, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality")); 107 Assert.AreEqual(132, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality")); 107 108 Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions")); 108 109 } … … 118 119 #endregion 119 120 #region Algorithm Configuration 120 ga.Name = "Genetic Algorithm - Gr ouping Problem";121 ga.Description = "A genetic algorithm which solves a gr ouping problem using the linear linkage encoding.";121 ga.Name = "Genetic Algorithm - Graph Coloring"; 122 ga.Description = "A genetic algorithm which solves a graph coloring problem using the linear linkage encoding."; 122 123 ga.Problem = problem; 123 124 SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, MultiLinearLinkageCrossover, MultiLinearLinkageManipulator>( -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs
r13056 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs
r13058 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs
r13163 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPRobocodeSampleTest.cs
r13266 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.Linq; 24 24 using HeuristicLab.Algorithms.GeneticAlgorithm; 25 using HeuristicLab.Data; 25 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 27 using HeuristicLab.Persistence.Default.Xml; … … 49 50 50 51 #region Problem Configuration 51 Problem antProblem = new Problem(); 52 Problem robocodeProblem = new Problem(); 53 if (!robocodeProblem.Enemies.CheckedItems.Any()) 54 robocodeProblem.Enemies.Add(new StringValue("sample.Crazy")); 52 55 #endregion 53 56 #region Algorithm Configuration 54 57 ga.Name = "Genetic Programming - Robocode Java Source"; 55 58 ga.Description = "A standard genetic programming algorithm to evolve the java source code for a robocode bot (see http://robocode.sourceforge.net/). An installation of Java SE Developmen Kit (JDK) >= 1.6 is necessary to run this sample."; 56 ga.Problem = antProblem;59 ga.Problem = robocodeProblem; 57 60 SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( 58 61 ga, 50, 1, 50, 0.15, 2); -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 100 100 grammar.ConfigureAsDefaultClassificationGrammar(); 101 101 grammar.Symbols.OfType<VariableCondition>().Single().Enabled = false; 102 var varSymbol = grammar.Symbols.OfType<Variable>().Where(x => !(x is LaggedVariable)).Single(); 102 foreach (var varSy in grammar.Symbols.OfType<VariableBase>()) varSy.VariableChangeProbability = 1.0; // for backwards compatibilty 103 var varSymbol = grammar.Symbols.OfType<Variable>().Single(); 103 104 varSymbol.WeightMu = 1.0; 104 105 varSymbol.WeightSigma = 1.0; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 101 101 grammar.ConfigureAsDefaultRegressionGrammar(); 102 102 grammar.Symbols.OfType<VariableCondition>().Single().InitialFrequency = 0.0; 103 var varSymbol = grammar.Symbols.OfType<Variable>().Where(x => !(x is LaggedVariable)).Single(); 103 foreach (var varSy in grammar.Symbols.OfType<VariableBase>()) varSy.VariableChangeProbability = 1.0; // for backwards compatibilty 104 var varSymbol = grammar.Symbols.OfType<Variable>().Single(); 104 105 varSymbol.WeightMu = 1.0; 105 106 varSymbol.WeightSigma = 1.0; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 50 50 SamplesUtils.RunAlgorithm(osga); 51 51 52 Assert.AreEqual(0.0 20952753415199643, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);53 Assert.AreEqual(0.0 23220938866319357, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);54 Assert.AreEqual(0.0 23716788824595391, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);55 Assert.AreEqual( 48200, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));52 Assert.AreEqual(0.015441526903606416, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8); 53 Assert.AreEqual(0.017420834241279298, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8); 54 Assert.AreEqual(0.065195703753298972, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8); 55 Assert.AreEqual(92000, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions")); 56 56 } 57 57 … … 63 63 problem.MaximumSymbolicExpressionTreeDepth.Value = 12; 64 64 problem.EvaluatorParameter.Value.HorizonParameter.Value.Value = 10; 65 problem.ApplyLinearScaling.Value = true; 65 66 66 67 foreach (var symbol in problem.SymbolicExpressionTreeGrammar.Symbols) { … … 72 73 autoRegressiveSymbol.MinLag = -30; 73 74 autoRegressiveSymbol.MaxLag = -1; 75 } 76 if (symbol is VariableBase) { 77 var varSy = symbol as VariableBase; 78 varSy.VariableChangeProbability = 1.0; // backwards compatibility 74 79 } 75 80 } -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs
r12817 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 50 50 gpr.Seed = 1618551877; 51 51 SamplesUtils.RunAlgorithm(gpr); 52 Assert.AreEqual(-940. 39914958616748, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));53 Assert.AreEqual(0.9956 14091354263, SamplesUtils.GetDoubleResult(gpr, "Training R²"));52 Assert.AreEqual(-940.60591737780555, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood")); 53 Assert.AreEqual(0.99560909041069334, SamplesUtils.GetDoubleResult(gpr, "Training R²")); 54 54 } 55 55 -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs
r13469 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/OSESGriewankSampleTest.cs
r13469 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoRastriginSampleTest.cs
r16691 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using System.Linq; 25 25 using HeuristicLab.Algorithms.ParticleSwarmOptimization; 26 using HeuristicLab.Data;27 26 using HeuristicLab.Encodings.RealVectorEncoding; 28 using HeuristicLab.Optimization.Operators;29 27 using HeuristicLab.Persistence.Default.Xml; 30 28 using HeuristicLab.Problems.TestFunctions; … … 33 31 namespace HeuristicLab.Tests { 34 32 [TestClass] 35 public class Pso SchwefelSampleTest {36 private const string SampleFileName = "PSO_ Schwefel";33 public class PsoRastriginSampleTest { 34 private const string SampleFileName = "PSO_Rastrigin"; 37 35 38 36 [TestMethod] 39 37 [TestCategory("Samples.Create")] 40 38 [TestProperty("Time", "medium")] 41 public void CreatePso SchwefelSampleTest() {42 var pso = CreatePso SchwefelSample();39 public void CreatePsoRastriginSampleTest() { 40 var pso = CreatePsoRastriginSample(); 43 41 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 44 42 XmlGenerator.Serialize(pso, path); … … 47 45 [TestCategory("Samples.Execute")] 48 46 [TestProperty("Time", "medium")] 49 public void RunPso SchwefelSampleTest() {50 var pso = CreatePso SchwefelSample();47 public void RunPsoRastriginSampleTest() { 48 var pso = CreatePsoRastriginSample(); 51 49 pso.SetSeedRandomly.Value = false; 52 50 SamplesUtils.RunAlgorithm(pso); 53 if ( !Environment.Is64BitProcess) {54 Assert.AreEqual( 118.44027985932837, SamplesUtils.GetDoubleResult(pso, "BestQuality"));55 Assert.AreEqual( 140.71570105946438, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));56 Assert.AreEqual(2 20.956806502853, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));57 Assert.AreEqual( 1000, SamplesUtils.GetIntResult(pso, "Iterations"));51 if (Environment.Is64BitProcess) { 52 Assert.AreEqual(0, SamplesUtils.GetDoubleResult(pso, "BestQuality")); 53 Assert.AreEqual(3.9649516110677525, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"), 1e-08); 54 Assert.AreEqual(25.566430359483757, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"), 1e-08); 55 Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations")); 58 56 } else { 59 Assert.AreEqual( 118.43958282879345, SamplesUtils.GetDoubleResult(pso, "BestQuality"));60 Assert.AreEqual( 139.43946864779372, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));61 Assert.AreEqual( 217.14654589055152, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));62 Assert.AreEqual( 1000, SamplesUtils.GetIntResult(pso, "Iterations"));57 Assert.AreEqual(0, SamplesUtils.GetDoubleResult(pso, "BestQuality")); 58 Assert.AreEqual(3.3957460831564048, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"), 1e-08); 59 Assert.AreEqual(34.412788077766145, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"), 1e-08); 60 Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations")); 63 61 } 64 62 } 65 63 66 private ParticleSwarmOptimization CreatePso SchwefelSample() {64 private ParticleSwarmOptimization CreatePsoRastriginSample() { 67 65 ParticleSwarmOptimization pso = new ParticleSwarmOptimization(); 68 66 #region Problem Configuration 69 67 var problem = new SingleObjectiveTestFunctionProblem(); 70 problem.BestKnownQuality = 0.0; 71 problem.BestKnownSolutionParameter.Value = new RealVector(new double[] { 420.968746, 420.968746 }); 72 problem.Bounds = new DoubleMatrix(new double[,] { { -500, 500 } }); 73 problem.TestFunction = new Schwefel(); 74 problem.ProblemSize = 2; 75 problem.Encoding.SolutionCreator = new UniformRandomRealVectorCreator(); 68 var provider = new SOTFInstanceProvider(); 69 problem.Load(provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name == "Rastrigin Function"))); 70 problem.SolutionCreatorParameter.Value = new UniformRandomRealVectorCreator(); 76 71 #endregion 77 72 #region Algorithm Configuration 78 pso.Name = "Particle Swarm Optimization - Schwefel";79 pso.Description = "A particle swarm optimization algorithm which solves the 2-dimensional Schwefel test function (based on the description in Pedersen, M.E.H. (2010). PhD thesis. University of Southampton)";73 pso.Name = "Particle Swarm Optimization - Rastrigin"; 74 pso.Description = "A particle swarm optimization algorithm which solves the 2-dimensional Rastrigin test function."; 80 75 pso.Problem = problem; 81 pso.Inertia.Value = 10; 82 pso.MaxIterations.Value = 1000; 83 pso.NeighborBestAttraction.Value = 0.5; 84 pso.PersonalBestAttraction.Value = -0.01; 85 pso.SwarmSize.Value = 50; 86 87 var inertiaUpdater = pso.InertiaUpdaterParameter.ValidValues 88 .OfType<ExponentialDiscreteDoubleValueModifier>() 89 .Single(); 90 inertiaUpdater.StartValueParameter.Value = new DoubleValue(10); 91 inertiaUpdater.EndValueParameter.Value = new DoubleValue(1); 92 pso.InertiaUpdater = inertiaUpdater; 93 94 pso.ParticleCreator = pso.ParticleCreatorParameter.ValidValues 95 .OfType<RealVectorParticleCreator>() 96 .Single(); 97 var swarmUpdater = pso.SwarmUpdaterParameter.ValidValues 98 .OfType<RealVectorSwarmUpdater>() 99 .Single(); 100 swarmUpdater.VelocityBoundsIndexParameter.ActualName = "Iterations"; 101 swarmUpdater.VelocityBoundsParameter.Value = new DoubleMatrix(new double[,] { { -10, 10 } }); 102 swarmUpdater.VelocityBoundsStartValueParameter.Value = new DoubleValue(10.0); 103 swarmUpdater.VelocityBoundsEndValueParameter.Value = new DoubleValue(1.0); 104 swarmUpdater.VelocityBoundsScalingOperatorParameter.Value = swarmUpdater.VelocityBoundsScalingOperatorParameter.ValidValues 105 .OfType<ExponentialDiscreteDoubleValueModifier>() 106 .Single(); 107 108 pso.TopologyInitializer = null; 109 pso.TopologyUpdater = null; 110 pso.SwarmUpdater = swarmUpdater; 76 pso.Inertia.Value = 0.721; 77 pso.MaxIterations.Value = 200; 78 pso.NeighborBestAttraction.Value = 1.193; 79 pso.PersonalBestAttraction.Value = 1.193; 80 pso.SwarmSize.Value = 40; 81 82 pso.TopologyInitializer = pso.TopologyInitializerParameter.ValidValues.OfType<SPSORandomTopologyInitializer>().First(); 83 pso.TopologyUpdater = pso.TopologyUpdaterParameter.ValidValues.OfType<SPSOAdaptiveRandomTopologyUpdater>().First(); 111 84 pso.Seed.Value = 0; 112 85 pso.SetSeedRandomly.Value = true; -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs
r13469 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs
r13237 r16692 1 1 using System; 2 2 using System.Linq; 3 using System.Threading;4 3 using HeuristicLab.Algorithms.ALPS; 5 4 using HeuristicLab.Algorithms.EvolutionStrategy; … … 18 17 19 18 public static void RunAlgorithm(IAlgorithm a) { 20 var trigger = new EventWaitHandle(false, EventResetMode.ManualReset);21 19 Exception ex = null; 22 a.Stopped += (src, e) => { trigger.Set(); }; 23 a.ExceptionOccurred += (src, e) => { ex = e.Value; trigger.Set(); }; 20 a.ExceptionOccurred += (sender, e) => { ex = e.Value; }; 24 21 a.Prepare(); 25 22 a.Start(); 26 trigger.WaitOne(); 27 28 Assert.AreEqual(ex, null); 23 Assert.IsNull(ex); 29 24 } 30 25 -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs
r13469 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs
r12836 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.