Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/03/20 11:35:39 (4 years ago)
Author:
abeham
Message:

#2521: working on VRP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/ScopeUtil.cs

    r17699 r17709  
    8686        scope.Variables.Add(new Variable(EvaluationResultName, solutionContext.EvaluationResult));
    8787      } 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      }
    8897    }
    8998  }
Note: See TracChangeset for help on using the changeset viewer.