Changeset 14477
- Timestamp:
- 12/12/16 14:14:11 (8 years ago)
- Location:
- branches/MemPRAlgorithm
- Files:
-
- 9 added
- 2 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/LinearLinkage/LinearLinkageMemPR.cs
r14471 r14477 26 26 using HeuristicLab.Algorithms.MemPR.Interfaces; 27 27 using HeuristicLab.Algorithms.MemPR.Util; 28 using HeuristicLab.Collections; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; … … 92 93 } 93 94 94 protected override int TabuWalk(ISingleObjectiveSolutionScope<Encodings.LinearLinkageEncoding.LinearLinkage> scope, int maxEvals, CancellationToken token, ISolutionSubspace<Encodings.LinearLinkageEncoding.LinearLinkage> subspace = null) { 95 return 0; 96 /*Func<Encodings.LinearLinkageEncoding.LinearLinkage, IRandom, double> eval = new EvaluationWrapper<Encodings.LinearLinkageEncoding.LinearLinkage>(Context.Problem, scope).Evaluate; 95 protected override int TabuWalk( 96 ISingleObjectiveSolutionScope<Encodings.LinearLinkageEncoding.LinearLinkage> scope, 97 int maxEvals, CancellationToken token, 98 ISolutionSubspace<Encodings.LinearLinkageEncoding.LinearLinkage> sub_space = null) { 99 var maximization = Context.Problem.Maximization; 100 var subspace = sub_space is LinearLinkageSolutionSubspace ? ((LinearLinkageSolutionSubspace)sub_space).Subspace : null; 101 var evaluations = 0; 97 102 var quality = scope.Fitness; 98 var lle = scope.Solution; 99 var random = Context.Random; 100 var evaluations = 0; 101 var maximization = Context.Problem.Maximization; 103 var bestQuality = quality; 102 104 if (double.IsNaN(quality)) { 103 quality = eval(lle, random); 105 Evaluate(scope, token); 106 quality = scope.Fitness; 104 107 evaluations++; 105 } 106 Encodings.LinearLinkageEncoding.LinearLinkage bestOfTheWalk = null; 107 double bestOfTheWalkF = double.NaN; 108 var current = (Encodings.LinearLinkageEncoding.LinearLinkage)lle.Clone(); 109 var currentF = quality; 110 var overallImprovement = false; 108 if (evaluations >= maxEvals) return evaluations; 109 } 110 var currentScope = (ISingleObjectiveSolutionScope<Encodings.LinearLinkageEncoding.LinearLinkage>)scope.Clone(); 111 var current = currentScope.Solution; 112 111 113 var tabu = new double[current.Length, current.Length]; 112 114 for (var i = 0; i < current.Length; i++) { 113 115 for (var j = i; j < current.Length; j++) { 114 tabu[i, j] = tabu[j, i] = double.MaxValue; 115 } 116 tabu[i, current[i]] = currentF; 117 } 118 119 var steps = 0; 120 var stepsUntilBestOfWalk = 0; 116 tabu[i, j] = tabu[j, i] = maximization ? double.MinValue : double.MaxValue; 117 } 118 tabu[i, current[i]] = quality; 119 } 120 121 // this dictionary holds the last relevant links 122 var links = new BidirectionalDictionary<int, int>(); 123 bool allMoveTabu; 121 124 for (var iter = 0; iter < int.MaxValue; iter++) { 122 var allTabu = true; 123 var bestOfTheRestF = double.NaN; 124 object bestOfTheRest = null; 125 var improved = false; 126 foreach () { 127 if (subspace != null && !(subspace[swap.Index1, 0] && subspace[swap.Index2, 0])) 125 allMoveTabu = true; 126 // clear the dictionary before a new pass through the array is made 127 links.Clear(); 128 for (var i = 0; i < current.Length; i++) { 129 if (subspace != null && !subspace[i]) { 130 links.RemoveBySecond(i); 131 links.Add(i, current[i]); 128 132 continue; 129 130 131 var q = eval(current, random); 132 evaluations++; 133 if (FitnessComparer.IsBetter(maximization, q, quality)) { 134 overallImprovement = true; 135 quality = q; 136 for (var i = 0; i < current.Length; i++) lle[i] = current[i]; 137 } 138 // check if it would not be an improvement to swap these into their positions 139 var isTabu = !FitnessComparer.IsBetter(maximization, q, tabu[swap.Index1, current[swap.Index1]]) 140 && !FitnessComparer.IsBetter(maximization, q, tabu[swap.Index2, current[swap.Index2]]); 141 if (!isTabu) allTabu = false; 142 if (FitnessComparer.IsBetter(maximization, q, currentF) && !isTabu) { 143 if (FitnessComparer.IsBetter(maximization, q, bestOfTheWalkF)) { 144 bestOfTheWalk = (Encodings.LinearLinkageEncoding.LinearLinkage)current.Clone(); 145 bestOfTheWalkF = q; 146 stepsUntilBestOfWalk = steps; 147 } 148 steps++; 149 improved = true; 150 // perform the move 151 currentF = q; 152 // mark that to move them to their previous position requires to make an improvement 153 tabu[swap.Index1, current[swap.Index2]] = maximization ? Math.Max(q, tabu[swap.Index1, current[swap.Index2]]) 154 : Math.Min(q, tabu[swap.Index1, current[swap.Index2]]); 155 tabu[swap.Index2, current[swap.Index1]] = maximization ? Math.Max(q, tabu[swap.Index2, current[swap.Index1]]) 156 : Math.Min(q, tabu[swap.Index2, current[swap.Index1]]); 157 } else { // undo the move 158 if (!isTabu && FitnessComparer.IsBetter(maximization, q, bestOfTheRestF)) { 159 bestOfTheRest = swap; 160 bestOfTheRestF = q; 161 } 162 current[swap.Index2] = current[swap.Index1]; 163 current[swap.Index1] = h; 164 } 133 } 134 135 var next = current[i]; 136 foreach (var move in MoveGenerator.GenerateForItem(i, next, links)) { 137 // we intend to break link i -> next 138 var qualityToBreak = tabu[i, next]; 139 move.Apply(current); 140 var qualityToRestore = tabu[i, current[i]]; // current[i] is new next 141 Evaluate(currentScope, token); 142 evaluations++; 143 var moveF = currentScope.Fitness; 144 var isNotTabu = FitnessComparer.IsBetter(maximization, moveF, qualityToBreak) 145 && FitnessComparer.IsBetter(maximization, moveF, qualityToRestore); 146 if (isNotTabu) allMoveTabu = false; 147 var isImprovement = FitnessComparer.IsBetter(maximization, moveF, bestQuality); 148 if (isNotTabu || isImprovement) { 149 if (maximization) { 150 tabu[i, next] = Math.Max(tabu[i, next], moveF); 151 tabu[i, current[i]] = Math.Max(tabu[i, current[i]], moveF); 152 } else { 153 tabu[i, next] = Math.Min(tabu[i, next], moveF); 154 tabu[i, current[i]] = Math.Min(tabu[i, current[i]], moveF); 155 } 156 quality = moveF; 157 if (isImprovement) bestQuality = quality; 158 159 move.UpdateLinks(links); 160 break; 161 } else move.Undo(current); 162 if (evaluations >= maxEvals) break; 163 } 164 links.RemoveBySecond(i); 165 links.Add(i, current[i]); 165 166 if (evaluations >= maxEvals) break; 166 } 167 if (!allTabu && !improved && bestOfTheRest != null) { 168 tabu[bestOfTheRest.Index1, current[bestOfTheRest.Index1]] = maximization ? Math.Max(currentF, tabu[bestOfTheRest.Index1, current[bestOfTheRest.Index1]]) 169 : Math.Min(currentF, tabu[bestOfTheRest.Index1, current[bestOfTheRest.Index1]]); 170 tabu[bestOfTheRest.Index2, current[bestOfTheRest.Index2]] = maximization ? Math.Max(currentF, tabu[bestOfTheRest.Index2, current[bestOfTheRest.Index2]]) 171 : Math.Min(currentF, tabu[bestOfTheRest.Index2, current[bestOfTheRest.Index2]]); 172 173 var h = current[bestOfTheRest.Index1]; 174 current[bestOfTheRest.Index1] = current[bestOfTheRest.Index2]; 175 current[bestOfTheRest.Index2] = h; 176 177 currentF = bestOfTheRestF; 178 steps++; 179 } else if (allTabu) break; 167 if (token.IsCancellationRequested) break; 168 } 169 if (allMoveTabu) break; 180 170 if (evaluations >= maxEvals) break; 181 } 182 Context.IncrementEvaluatedSolutions(evaluations); 183 if (!overallImprovement && bestOfTheWalk != null) { 184 quality = bestOfTheWalkF; 185 for (var i = 0; i < current.Length; i++) lle[i] = bestOfTheWalk[i]; 186 } 187 return stepsUntilBestOfWalk;*/ 171 if (token.IsCancellationRequested) break; 172 } 173 return evaluations; 188 174 } 189 175 -
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/LinearLinkage/LocalSearch/StaticAPI/ExhaustiveLocalSearch.cs
r14466 r14477 49 49 continue; 50 50 } 51 var isFirst = !links.ContainsSecond(i);52 51 var pred = -1; 52 var isFirst = !links.TryGetBySecond(i, out pred); 53 53 var keepLink = false; 54 54 if (!isFirst) { 55 pred = links.GetBySecond(i);56 55 keepLink = subspace != null && !subspace[pred]; 57 56 } -
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/MemPRAlgorithm.cs
r14456 r14477 216 216 Context.Problem = Problem; 217 217 } 218 219 if (MaximumExecutionTime.HasValue) 220 CancellationTokenSource.CancelAfter(MaximumExecutionTime.Value); 218 221 219 222 IExecutionContext context = null; -
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/PermutationMemPR.cs
r14466 r14477 187 187 for (var i = 0; i < current.Length; i++) { 188 188 for (var j = i; j < current.Length; j++) { 189 tabu[i, j] = tabu[j, i] = double.MaxValue;189 tabu[i, j] = tabu[j, i] = maximization ? double.MinValue : double.MaxValue; 190 190 } 191 191 tabu[i, current[i]] = currentF; -
branches/MemPRAlgorithm/HeuristicLab.Collections/3.3/BidirectionalDictionary.cs
r14185 r14477 135 135 } 136 136 137 public bool TryGetByFirst(TFirst key, out TSecond secondValue) { 138 return firstToSecond.TryGetValue(key, out secondValue); 139 } 140 141 public bool TryGetBySecond(TSecond key, out TFirst firstValue) { 142 return secondToFirst.TryGetValue(key, out firstValue); 143 } 144 137 145 public void Clear() { 138 146 firstToSecond.Clear(); -
branches/MemPRAlgorithm/HeuristicLab.Encodings.LinearLinkageEncoding/3.3/HeuristicLab.Encodings.LinearLinkageEncoding-3.3.csproj
r14471 r14477 181 181 <Compile Include="Moves\Swap\Swap2MoveGenerator.cs" /> 182 182 <Compile Include="Moves\Swap\Swap2MoveMaker.cs" /> 183 <Compile Include="Moves\ExtractMove.cs" /> 184 <Compile Include="Moves\MergeMove.cs" /> 185 <Compile Include="Moves\Move.cs" /> 186 <Compile Include="Moves\ShiftMove.cs" /> 187 <Compile Include="Moves\SplitMove.cs" /> 188 <Compile Include="Moves\StaticAPI\MoveGenerator.cs" /> 183 189 <Compile Include="ShakingOperators\LLEShakingOperator.cs" /> 184 190 <Compile Include="SimilarityCalculators\HammingSimilarityCalculator.cs" /> -
branches/MemPRAlgorithm/HeuristicLab.Problems.Instances.DIMACS/3.3
- Property svn:ignore
-
old new 1 *.aps 2 *.eto 3 *.user 4 ClientBin 5 GeneratedArtifacts 6 Plugin.cs 1 7 [Bb]in 2 obj3 8 [Dd]ebug 4 9 [Rr]elease 5 *.user6 *.aps7 *.eto8 ClientBin9 GeneratedArtifacts10 10 _Pvt_Extensions 11 obj
-
- Property svn:ignore
-
branches/MemPRAlgorithm/HeuristicLab.Problems.Instances.DIMACS/3.3/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
-
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r14209 r14477 42 42 public DeepCloneableCloningTest() { 43 43 excludedTypes = new HashSet<Type> { 44 typeof ( HeuristicLab.Problems.DataAnalysis.Dataset),45 typeof ( HeuristicLab.Problems.TravelingSalesman.DistanceMatrix),46 typeof ( HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution),47 typeof ( HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution),48 typeof ( HeuristicLab.Problems.Orienteering.DistanceMatrix),49 typeof ( HeuristicLab.Problems.PTSP.DistanceMatrix)44 typeof (global::HeuristicLab.Problems.DataAnalysis.Dataset), 45 typeof (global::HeuristicLab.Problems.TravelingSalesman.DistanceMatrix), 46 typeof (global::HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution), 47 typeof (global::HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution), 48 typeof (global::HeuristicLab.Problems.Orienteering.DistanceMatrix), 49 typeof (global::HeuristicLab.Problems.PTSP.DistanceMatrix) 50 50 }; 51 51 excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar")); 52 52 53 foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof( HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))53 foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(global::HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol))) 54 54 excludedTypes.Add(symbolType); 55 55 // SimpleSymbol is a non-discoverable type and thus needs to be added manually 56 excludedTypes.Add(typeof( HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SimpleSymbol));57 foreach (var grammarType in ApplicationManager.Manager.GetTypes(typeof( HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SymbolicExpressionGrammarBase)))56 excludedTypes.Add(typeof(global::HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SimpleSymbol)); 57 foreach (var grammarType in ApplicationManager.Manager.GetTypes(typeof(global::HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SymbolicExpressionGrammarBase))) 58 58 excludedTypes.Add(grammarType); 59 59 } -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs
r14185 r14477 88 88 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 89 89 tspProblem.Load(provider.LoadData(instance)); 90 tspProblem.UseDistanceMatrix .Value= true;90 tspProblem.UseDistanceMatrix = true; 91 91 #endregion 92 92 #region Algorithm Configuration -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs
r14185 r14477 65 65 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 66 66 tspProblem.Load(provider.LoadData(instance)); 67 tspProblem.UseDistanceMatrix .Value= true;67 tspProblem.UseDistanceMatrix = true; 68 68 #endregion 69 69 #region Algorithm Configuration -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs
r14185 r14477 55 55 56 56 public static OffspringSelectionGeneticAlgorithm CreateGpMultiplexerSample() { 57 var problem = new HeuristicLab.Problems.GeneticProgramming.Boolean.MultiplexerProblem();57 var problem = new global::HeuristicLab.Problems.GeneticProgramming.Boolean.MultiplexerProblem(); 58 58 problem.Name = "11-Multiplexer Problem"; 59 59 problem.Encoding.TreeLength = 50; -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs
r14185 r14477 57 57 58 58 #region Problem Configuration 59 var problem = new HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem();59 var problem = new global::HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem(); 60 60 #endregion 61 61 #region Algorithm Configuration … … 96 96 97 97 #region Problem Configuration 98 var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem();98 var problem = new global::HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem(); 99 99 100 100 #endregion -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs
r14185 r14477 64 64 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 65 65 tspProblem.Load(provider.LoadData(instance)); 66 tspProblem.UseDistanceMatrix .Value= true;66 tspProblem.UseDistanceMatrix = true; 67 67 #endregion 68 68 #region Algorithm Configuration -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs
r14185 r14477 60 60 KnapsackProblem problem = new KnapsackProblem(); 61 61 problem.BestKnownQuality = new DoubleValue(362); 62 problem.BestKnownSolution = new HeuristicLab.Encodings.BinaryVectorEncoding.BinaryVector(new bool[] {62 problem.BestKnownSolution = new global::HeuristicLab.Encodings.BinaryVectorEncoding.BinaryVector(new bool[] { 63 63 true , false, false, true , true , true , true , true , false, true , true , true , true , true , true , false, true , false, true , true , false, true , true , false, true , false, true , true , true , false, true , true , false, true , true , false, true , false, true , true , true , true , true , true , true , true , true , true , true , true , true , false, true , false, false, true , true , false, true , true , true , true , true , true , true , true , false, true , false, true , true , true , true , false, true , true , true , true , true , true , true , true}); 64 64 problem.EvaluatorParameter.Value = new KnapsackEvaluator(); -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs
r14185 r14477 62 62 TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem(); 63 63 tspProblem.Load(provider.LoadData(instance)); 64 tspProblem.UseDistanceMatrix .Value= true;64 tspProblem.UseDistanceMatrix = true; 65 65 #endregion 66 66 #region Algorithm Configuration … … 76 76 ts.MoveGenerator = moveGenerator; 77 77 var moveEvaluator = ts.MoveEvaluatorParameter.ValidValues 78 .OfType<TSPInversionMove RoundedEuclideanPathEvaluator>()78 .OfType<TSPInversionMovePathEvaluator>() 79 79 .Single(); 80 80 ts.MoveEvaluator = moveEvaluator; -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs
r14185 r14477 66 66 {48, 71}, {49, 71}, {50, 71}, {44, 70}, {45, 70}, {52, 70}, {53, 70}, {54, 70}, {41, 69}, {42, 69}, {55, 69}, {56, 69}, {40, 68}, {56, 68}, {57, 68}, {39, 67}, {57, 67}, {58, 67}, {59, 67}, {38, 66}, {59, 66}, {60, 66}, {37, 65}, {60, 65}, {36, 64}, {43, 64}, {35, 63}, {37, 63}, {41, 63}, {42, 63}, {43, 63}, {47, 63}, {61, 63}, {40, 62}, {41, 62}, {42, 62}, {43, 62}, {45, 62}, {46, 62}, {47, 62}, {62, 62}, {34, 61}, {38, 61}, {39, 61}, {42, 61}, {43, 61}, {44, 61}, {45, 61}, {46, 61}, {47, 61}, {52, 61}, {62, 61}, {63, 61}, {26, 60}, {38, 60}, {42, 60}, {43, 60}, {44, 60}, {46, 60}, {47, 60}, {63, 60}, {23, 59}, {24, 59}, {27, 59}, {29, 59}, {30, 59}, {31, 59}, {33, 59}, {42, 59}, {46, 59}, {47, 59}, {63, 59}, {21, 58}, {32, 58}, {33, 58}, {34, 58}, {35, 58}, {46, 58}, {47, 58}, {48, 58}, {53, 58}, {21, 57}, {35, 57}, {47, 57}, {48, 57}, {53, 57}, {36, 56}, {37, 56}, {46, 56}, {47, 56}, {48, 56}, {64, 56}, {65, 56}, {20, 55}, {38, 55}, {46, 55}, {47, 55}, {48, 55}, {52, 55}, {21, 54}, {40, 54}, {47, 54}, {48, 54}, {52, 54}, {65, 54}, {30, 53}, {41, 53}, {46, 53}, {47, 53}, {48, 53}, {52, 53}, {65, 53}, {21, 52}, {32, 52}, {33, 52}, {42, 52}, {51, 52}, {21, 51}, {33, 51}, {34, 51}, {43, 51}, {51, 51}, {21, 50}, {35, 50}, {44, 50}, {50, 50}, {66, 50}, {67, 50}, {21, 49}, {34, 49}, {36, 49}, {37, 49}, {46, 49}, {49, 49}, {67, 49}, {22, 48}, {36, 48}, {37, 48}, {46, 48}, {47, 48}, {22, 47}, {30, 47}, {34, 47}, {37, 47}, {38, 47}, {39, 47}, {47, 47}, {48, 47}, {67, 47}, {23, 46}, {28, 46}, {29, 46}, {30, 46}, {31, 46}, {32, 46}, {35, 46}, {37, 46}, {38, 46}, {39, 46}, {49, 46}, {67, 46}, {23, 45}, {28, 45}, {29, 45}, {31, 45}, {32, 45}, {40, 45}, {41, 45}, {49, 45}, {50, 45}, {68, 45}, {24, 44}, {29, 44}, {32, 44}, {41, 44}, {51, 44}, {68, 44}, {25, 43}, {30, 43}, {32, 43}, {42, 43}, {43, 43}, {51, 43}, {68, 43}, {69, 43}, {31, 42}, {32, 42}, {43, 42}, {52, 42}, {55, 42}, {26, 41}, {27, 41}, {31, 41}, {32, 41}, {33, 41}, {44, 41}, {45, 41}, {46, 41}, {47, 41}, {48, 41}, {49, 41}, {53, 41}, {25, 40}, {27, 40}, {32, 40}, {43, 40}, {44, 40}, {45, 40}, {46, 40}, {48, 40}, {49, 40}, {50, 40}, {51, 40}, {53, 40}, {56, 40}, {32, 39}, {33, 39}, {43, 39}, {50, 39}, {51, 39}, {54, 39}, {56, 39}, {69, 39}, {24, 38}, {32, 38}, {41, 38}, {42, 38}, {51, 38}, {52, 38}, {54, 38}, {57, 38}, {69, 38}, {31, 37}, {32, 37}, {40, 37}, {41, 37}, {42, 37}, {43, 37}, {44, 37}, {45, 37}, {46, 37}, {47, 37}, {48, 37}, {51, 37}, {52, 37}, {55, 37}, {57, 37}, {69, 37}, {24, 36}, {31, 36}, {32, 36}, {39, 36}, {40, 36}, {41, 36}, {42, 36}, {43, 36}, {45, 36}, {48, 36}, {49, 36}, {51, 36}, {53, 36}, {55, 36}, {58, 36}, {22, 35}, {23, 35}, {24, 35}, {25, 35}, {30, 35}, {31, 35}, {32, 35}, {39, 35}, {41, 35}, {49, 35}, {51, 35}, {55, 35}, {56, 35}, {58, 35}, {71, 35}, {20, 34}, {27, 34}, {30, 34}, {31, 34}, {51, 34}, {53, 34}, {57, 34}, {60, 34}, {18, 33}, {19, 33}, {29, 33}, {30, 33}, {31, 33}, {45, 33}, {46, 33}, {47, 33}, {52, 33}, {53, 33}, {55, 33}, {57, 33}, {58, 33}, {17, 32}, {30, 32}, {44, 32}, {47, 32}, {54, 32}, {57, 32}, {59, 32}, {61, 32}, {71, 32}, {72, 32}, {43, 31}, {47, 31}, {56, 31}, {58, 31}, {59, 31}, {61, 31}, {72, 31}, {74, 31}, {16, 30}, {43, 30}, {46, 30}, {47, 30}, {59, 30}, {63, 30}, {71, 30}, {75, 30}, {43, 29}, {46, 29}, {47, 29}, {59, 29}, {60, 29}, {75, 29}, {15, 28}, {43, 28}, {46, 28}, {61, 28}, {76, 28}, {15, 27}, {43, 27}, {44, 27}, {45, 27}, {46, 27}, {60, 27}, {62, 27}, {15, 26}, {43, 26}, {44, 26}, {46, 26}, {59, 26}, {60, 26}, {64, 26}, {77, 26}, {15, 25}, {58, 25}, {61, 25}, {77, 25}, {15, 24}, {53, 24}, {55, 24}, {61, 24}, {77, 24}, {62, 23}, {16, 22}, {61, 22}, {62, 22}, {15, 21}, {16, 21}, {52, 21}, {63, 21}, {77, 21}, {16, 20}, {17, 20}, {46, 20}, {47, 20}, {60, 20}, {62, 20}, {63, 20}, {65, 20}, {76, 20}, {15, 19}, {17, 19}, {18, 19}, {44, 19}, {45, 19}, {48, 19}, {53, 19}, {56, 19}, {60, 19}, {62, 19}, {67, 19}, {68, 19}, {76, 19}, {15, 18}, {18, 18}, {19, 18}, {20, 18}, {32, 18}, {33, 18}, {34, 18}, {41, 18}, {42, 18}, {43, 18}, {46, 18}, {48, 18}, {53, 18}, {59, 18}, {60, 18}, {69, 18}, {75, 18}, {16, 17}, {17, 17}, {20, 17}, {21, 17}, {22, 17}, {23, 17}, {24, 17}, {26, 17}, {28, 17}, {29, 17}, {30, 17}, {31, 17}, {32, 17}, {34, 17}, {35, 17}, {36, 17}, {37, 17}, {38, 17}, {39, 17}, {40, 17}, {44, 17}, {46, 17}, {48, 17}, {53, 17}, {56, 17}, {58, 17}, {75, 17}, {17, 16}, {18, 16}, {20, 16}, {24, 16}, {26, 16}, {27, 16}, {29, 16}, {33, 16}, {41, 16}, {42, 16}, {44, 16}, {47, 16}, {52, 16}, {57, 16}, {70, 16}, {73, 16}, {74, 16}, {17, 15}, {18, 15}, {20, 15}, {22, 15}, {24, 15}, {27, 15}, {29, 15}, {31, 15}, {33, 15}, {35, 15}, {36, 15}, {38, 15}, {39, 15}, {42, 15}, {45, 15}, {47, 15}, {52, 15}, {53, 15}, {55, 15}, {56, 15}, {70, 15}, {73, 15}, {17, 14}, {19, 14}, {21, 14}, {24, 14}, {26, 14}, {29, 14}, {31, 14}, {34, 14}, {37, 14}, {40, 14}, {42, 14}, {44, 14}, {46, 14}, {47, 14}, {53, 14}, {54, 14}, {55, 14}, {62, 14}, {70, 14}, {72, 14}, {17, 13}, {19, 13}, {21, 13}, {23, 13}, {25, 13}, {27, 13}, {30, 13}, {32, 13}, {34, 13}, {36, 13}, {38, 13}, {41, 13}, {43, 13}, {44, 13}, {45, 13}, {60, 13}, {70, 13}, {71, 13}, {18, 12}, {21, 12}, {23, 12}, {26, 12}, {28, 12}, {31, 12}, {34, 12}, {37, 12}, {39, 12}, {41, 12}, {42, 12}, {70, 12}, {18, 11}, {19, 11}, {20, 11}, {21, 11}, {24, 11}, {25, 11}, {27, 11}, {29, 11}, {31, 11}, {33, 11}, {35, 11}, {38, 11}, {41, 11}, {59, 11}, {26, 10}, {29, 10}, {32, 10}, {34, 10}, {36, 10}, {39, 10}, {40, 10}, {69, 10}, {21, 9}, {26, 9}, {28, 9}, {30, 9}, {32, 9}, {33, 9}, {35, 9}, {36, 9}, {37, 9}, {38, 9}, {39, 9}, {22, 8}, {27, 8}, {28, 8}, {29, 8}, {30, 8}, {31, 8}, {68, 8}, {23, 7}, {66, 7}, {24, 6}, {65, 6}, {25, 5}, {62, 5}, {63, 5}, {26, 4}, {55, 4}, {56, 4}, {57, 4}, {58, 4}, {59, 4}, {60, 4}, {61, 4}, {28, 3}, {53, 3}, {29, 2}, {50, 2}, {51, 2}, {52, 2}, {31, 1}, {32, 1}, {48, 1} 67 67 }); 68 tspProblem.BestKnownQuality = new DoubleValue(867);68 tspProblem.BestKnownQuality = 867; 69 69 70 tspProblem. EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();70 tspProblem.DistanceFunction = TSPDistanceFunction.RoundedEuclidean; 71 71 tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator(); 72 tspProblem.UseDistanceMatrix .Value= true;72 tspProblem.UseDistanceMatrix = true; 73 73 tspProblem.Name = "Funny TSP"; 74 74 tspProblem.Description = "Represents a symmetric Traveling Salesman Problem."; … … 87 87 .Single(); 88 88 localImprovement.MoveEvaluator = localImprovement.MoveEvaluatorParameter.ValidValues 89 .OfType<TSPInversionMove RoundedEuclideanPathEvaluator>()89 .OfType<TSPInversionMovePathEvaluator>() 90 90 .Single(); 91 91 localImprovement.MoveMaker = localImprovement.MoveMakerParameter.ValidValues -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/SupportVectorMachineTest.cs
r14185 r14477 61 61 var cv = new CrossValidation(); 62 62 cv.Algorithm = new SupportVectorRegression(); 63 var rand = new HeuristicLab.Random.MersenneTwister();63 var rand = new global::HeuristicLab.Random.MersenneTwister(); 64 64 double[,] data = GenerateData(1000, rand); 65 65 List<string> variables = new List<string>() { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "y" }; -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs
r14185 r14477 61 61 [TestProperty("Time", "short")] 62 62 public void InversionMoveEvaluatorTest() { 63 var evaluator = new TSPRoundedEuclideanPathEvaluator();63 /*var evaluator = new TSPRoundedEuclideanPathEvaluator(); 64 64 var moveEvaluator = new TSPInversionMoveRoundedEuclideanPathEvaluator(); 65 65 double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour); … … 87 87 beforeMatrix = afterMatrix; 88 88 beforeCoordinates = afterCoordinates; 89 } 89 }*/ 90 90 } 91 91 … … 94 94 [TestProperty("Time", "short")] 95 95 public void TranslocationMoveEvaluatorTest() { 96 var evaluator = new TSPRoundedEuclideanPathEvaluator();96 /*var evaluator = new TSPRoundedEuclideanPathEvaluator(); 97 97 var moveEvaluator = new TSPTranslocationMoveRoundedEuclideanPathEvaluator(); 98 98 double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour); … … 119 119 beforeMatrix = afterMatrix; 120 120 beforeCoordinates = afterCoordinates; 121 } 121 }*/ 122 122 } 123 123 -
branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r14354 r14477 510 510 <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\SinglePointCrossoverTest.cs" /> 511 511 <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\UniformOnePositionManipulatorTest.cs" /> 512 <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.3\MoveTests.cs" /> 512 513 <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Auxiliary.cs" /> 513 514 <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CosaCrossoverTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.