Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Tests merged: 8088,8092,8121,8123,8132,8154,8164,8195,8222,8309,8323
- Property svn:mergeinfo changed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r8086 r8331 44 44 using HeuristicLab.Problems.DataAnalysis.Symbolic.Classification; 45 45 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 46 using HeuristicLab.Problems.Instances; 46 47 using HeuristicLab.Problems.Instances.DataAnalysis; 47 48 using HeuristicLab.Problems.Instances.TSPLIB; 49 using HeuristicLab.Problems.Instances.VehicleRouting; 48 50 using HeuristicLab.Problems.Knapsack; 49 51 using HeuristicLab.Problems.TestFunctions; … … 51 53 using HeuristicLab.Problems.VehicleRouting; 52 54 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 53 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;54 55 using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin; 55 56 using HeuristicLab.Problems.VehicleRouting.ProblemInstances; 56 57 using HeuristicLab.Selection; 57 58 using Microsoft.VisualStudio.TestTools.UnitTesting; 58 using HeuristicLab.Problems.Instances.VehicleRouting;59 using HeuristicLab.Problems.Instances;60 59 61 60 … … 133 132 134 133 SolomonFormatInstanceProvider instanceProvider = new SolomonInstanceProvider(); 135 IVRPData data = instanceProvider. LoadData("C101.txt", "C101.opt.txt");134 IVRPData data = instanceProvider.Import("C101.txt", "C101.opt.txt"); 136 135 vrpProblem.Load(data); 137 136 vrpProblem.Name = "C101 VRP (imported from Solomon)"; … … 439 438 } 440 439 #endregion 440 #region LawnMower 441 [TestMethod] 442 public void RunGpLawnMowerSampleTest() { 443 var ga = CreateGpLawnMowerSample(); 444 ga.SetSeedRandomly.Value = false; 445 RunAlgorithm(ga); 446 } 447 448 public GeneticAlgorithm CreateGpLawnMowerSample() { 449 GeneticAlgorithm ga = new GeneticAlgorithm(); 450 #region Problem Configuration 451 var problem = new HeuristicLab.Problems.LawnMower.Problem(); 452 #endregion 453 #region Algorithm Configuration 454 ga.Name = "Genetic Programming - Lawn Mower"; 455 ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem"; 456 ga.Problem = problem; 457 ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( 458 ga, 1000, 1, 50, 0.25, 5); 459 var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator; 460 mutator.Operators.SetItemCheckedState(mutator.Operators 461 .OfType<OnePointShaker>() 462 .Single(), false); 463 #endregion 464 return ga; 465 } 466 #endregion 441 467 #endregion 442 468
Note: See TracChangeset
for help on using the changeset viewer.