Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/15 22:18:35 (8 years ago)
Author:
abeham
Message:

#2521: Adapted multi-encoding for new infrastructure

TODO: Evaluator, Analyzer, ... need to be copied

File:
1 edited

Legend:

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

    r13337 r13351  
    4646    }
    4747
     48    public static ISolution GetSolution(IScope scope, IEncoding encoding) {
     49      var name = encoding.Name;
     50      if (!scope.Variables.ContainsKey(name)) throw new ArgumentException(string.Format(" {0} cannot be found in the provided scope.", name));
     51      var value = scope.Variables[name].Value as ISolution;
     52      if (value == null) throw new InvalidOperationException(string.Format("Value of {0} is null.", name));
     53      return value;
     54    }
     55
    4856  }
    4957}
Note: See TracChangeset for help on using the changeset viewer.