Changeset 17382 for branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs
- Timestamp:
- 12/18/19 16:11:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs
r17226 r17382 25 25 using System.Linq; 26 26 using System.Threading; 27 using HEAL.Attic; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Core; … … 31 32 using HeuristicLab.Optimization; 32 33 using HeuristicLab.Parameters; 33 using HEAL.Attic;34 34 using HeuristicLab.Random; 35 35 … … 110 110 } 111 111 112 var fitness = Problem.Evaluate(solution, random); 112 var evaluationResult = Problem.Evaluate(solution, random); 113 var fitness = evaluationResult.Quality; 113 114 114 115 fitness = ImproveToLocalOptimum(Problem, solution, fitness, random); … … 128 129 if (tried.Contains(option)) continue; 129 130 solution[option] = !solution[option]; 130 double newFitness = problem.Evaluate(solution, rand); 131 var newEvaluationResult = problem.Evaluate(solution, rand); 132 double newFitness = newEvaluationResult.Quality; 131 133 if (problem.IsBetter(newFitness, fitness)) { 132 134 fitness = newFitness;
Note: See TracChangeset
for help on using the changeset viewer.