Changeset 7558 for trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3
- Timestamp:
- 03/06/12 01:43:06 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r7442 r7558 44 44 using HeuristicLab.Problems.DataAnalysis.Symbolic.Classification; 45 45 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 46 using HeuristicLab.Problems.Instances.TSPLIB; 46 47 using HeuristicLab.Problems.Knapsack; 47 48 using HeuristicLab.Problems.TestFunctions; … … 56 57 [TestClass] 57 58 [DeploymentItem(@"HeuristicLab-3.3/Resources/C101.opt.txt")] 58 [DeploymentItem(@"HeuristicLab-3.3/Resources/ch130.tsp")]59 [DeploymentItem(@"HeuristicLab-3.3/Resources/ch130.opt.tour")]60 59 [DeploymentItem(@"HeuristicLab-3.3/Resources/mammographic_masses.txt")] 61 60 [DeploymentItem(@"HeuristicLab-3.3/Resources/towerData.txt")] … … 83 82 GeneticAlgorithm ga = new GeneticAlgorithm(); 84 83 #region Problem Configuration 84 var provider = new TSPLIBTSPInstanceProvider(); 85 var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single(); 85 86 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 86 tspProblem.ImportFromTSPLIB("ch130.tsp", "ch130.opt.tour", 6110); 87 tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator(); 88 tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator(); 87 tspProblem.Load(provider.LoadData(instance)); 89 88 tspProblem.UseDistanceMatrix.Value = true; 90 tspProblem.Name = "ch130 TSP (imported from TSPLIB)";91 tspProblem.Description = "130 city problem (Churritz)";92 89 #endregion 93 90 #region Algorithm Configuration … … 511 508 IslandGeneticAlgorithm ga = new IslandGeneticAlgorithm(); 512 509 #region Problem Configuration 510 var provider = new TSPLIBTSPInstanceProvider(); 511 var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single(); 513 512 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 514 tspProblem.ImportFromTSPLIB("ch130.tsp", "ch130.opt.tour", 6110); 515 tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator(); 516 tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator(); 513 tspProblem.Load(provider.LoadData(instance)); 517 514 tspProblem.UseDistanceMatrix.Value = true; 518 tspProblem.Name = "ch130 TSP (imported from TSPLIB)";519 tspProblem.Description = "130 city problem (Churritz)";520 515 #endregion 521 516 #region Algorithm Configuration … … 766 761 TabuSearch ts = new TabuSearch(); 767 762 #region Problem Configuration 768 var tspProblem = new TravelingSalesmanProblem();769 tspProblem.ImportFromTSPLIB("ch130.tsp", "ch130.opt.tour", 6110);770 tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();771 tspProblem. SolutionCreatorParameter.Value = new RandomPermutationCreator();763 var provider = new TSPLIBTSPInstanceProvider(); 764 var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single(); 765 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 766 tspProblem.Load(provider.LoadData(instance)); 772 767 tspProblem.UseDistanceMatrix.Value = true; 773 tspProblem.Name = "ch130 TSP (imported from TSPLIB)";774 tspProblem.Description = "130 city problem (Churritz)";775 768 #endregion 776 769 #region Algorithm Configuration
Note: See TracChangeset
for help on using the changeset viewer.