Changeset 17577 for branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveEvaluator.cs
- Timestamp:
- 05/29/20 15:18:44 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveEvaluator.cs
r17366 r17577 70 70 var random = RandomParameter.ActualValue; 71 71 var encoding = EncodingParameter.ActualValue; 72 var solution = ScopeUtil.GetEncodedSolution(ExecutionContext.Scope, encoding); 73 var solutionContext = new SingleObjectiveSolutionContextScope<TEncodedSolution>(ExecutionContext.Scope, solution); 72 var solutionContext = ScopeUtil.CreateSolutionContext(ExecutionContext.Scope, encoding); 74 73 75 Evaluate(solutionContext, random, CancellationToken.None); 74 if (!solutionContext.IsEvaluated) 75 Evaluate(solutionContext, random, CancellationToken.None); 76 76 var qualityValue = solutionContext.EvaluationResult.Quality; 77 77 78 78 MoveQualityParameter.ActualValue = new DoubleValue(qualityValue); 79 ScopeUtil.CopyToScope(ExecutionContext.Scope, solutionContext); 79 80 return base.Apply(); 80 81 }
Note: See TracChangeset
for help on using the changeset viewer.