Changeset 14527
- Timestamp:
- 12/23/16 16:13:11 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs
r14523 r14527 250 250 // Loop until iteration limit reached or canceled. 251 251 while (ResultsIterations < MaximumIterations) { 252 cancellationToken.ThrowIfCancellationRequested(); 253 double fitness = iterate(); 254 255 ResultsEvaluations = tracker.Evaluations; 256 ResultsBestSolution = new BinaryVector(tracker.BestSolution); 257 ResultsBestQuality = tracker.BestQuality; 258 ResultsBestFoundOnEvaluation = tracker.BestFoundOnEvaluation; 259 ResultsQualitiesBest.Values.Add(tracker.BestQuality); 260 ResultsQualitiesIteration.Values.Add(fitness); 261 ResultsLevels.Values.Add(pyramid.Count); 262 ResultsSolutions.Values.Add(seen.Count); 263 264 ResultsIterations++; 252 double fitness = double.NaN; 253 254 try { 255 fitness = iterate(); 256 ResultsIterations++; 257 cancellationToken.ThrowIfCancellationRequested(); 258 } finally { 259 ResultsEvaluations = tracker.Evaluations; 260 ResultsBestSolution = new BinaryVector(tracker.BestSolution); 261 ResultsBestQuality = tracker.BestQuality; 262 ResultsBestFoundOnEvaluation = tracker.BestFoundOnEvaluation; 263 ResultsQualitiesBest.Values.Add(tracker.BestQuality); 264 ResultsQualitiesIteration.Values.Add(fitness); 265 ResultsLevels.Values.Add(pyramid.Count); 266 ResultsSolutions.Values.Add(seen.Count); 267 } 265 268 } 266 269 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs
r14185 r14527 39 39 PrivateObject hidden = new PrivateObject(solver); 40 40 try { 41 hidden.Invoke("Run", new CancellationToken()); 41 var ct = new CancellationToken(); 42 hidden.Invoke("Initialize", ct); 43 hidden.Invoke("Run", ct); 42 44 } catch (OperationCanceledException) { 43 45 // Ignore
Note: See TracChangeset
for help on using the changeset viewer.