Changeset 17709 for branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators
- Timestamp:
- 08/03/20 11:35:39 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/ScopeUtil.cs
r17699 r17709 86 86 scope.Variables.Add(new Variable(EvaluationResultName, solutionContext.EvaluationResult)); 87 87 } else variable2.Value = solutionContext.EvaluationResult; 88 if (solutionContext.EvaluationResult != null) { 89 foreach (var item in solutionContext.EvaluationResult.AdditionalData) { 90 if (item.Value is IItem i) { 91 if (!scope.Variables.TryGetValue(item.Key, out var variable)) 92 scope.Variables.Add(new Variable(item.Key, i)); 93 else variable.Value = i; 94 } 95 } 96 } 88 97 } 89 98 } -
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveEvaluator.cs
r17699 r17709 69 69 ScopeUtil.CopyToScope(ExecutionContext.Scope, solutionContext); 70 70 QualityParameter.ActualValue = new DoubleValue(solutionContext.EvaluationResult.Quality); 71 72 71 return base.InstrumentedApply(); 73 72 }
Note: See TracChangeset
for help on using the changeset viewer.