Free cookie consent management tool by TermsFeed Policy Generator

Changeset 368


Ignore:
Timestamp:
07/07/08 17:51:09 (16 years ago)
Author:
gkronber
Message:

fixed a bug in BestSolutionStorer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Logging/BestSolutionStorer.cs

    r364 r368  
    5959          }
    6060        }
    61 
    62         IVariable bestSolutionVariable = scope.GetVariable("BestSolution");
     61        IVariableInfo qualityInfo = GetVariableInfo("Quality");
     62        IVariable bestSolutionVariable = scope.GetVariable(scope.TranslateName("BestSolution"));
    6363        if(bestSolutionVariable != null) {
    6464
    65           double bestQuality = ((IScope)bestSolutionVariable.Value).GetVariableValue<DoubleData>("Quality", false).Data;
     65          double bestQuality = ((IScope)bestSolutionVariable.Value).GetVariableValue<DoubleData>(qualityInfo.ActualName, false).Data;
    6666
    6767          // do nothing if the best solution of the current scope is not better than the best solution of the whole run so far.
     
    107107
    108108    private void SetValue(IVariableInfo info, IScope data, IScope scope) {
    109       IVariable var = scope.GetVariable(info.FormalName);
     109      IVariable var = scope.GetVariable(info.ActualName);
    110110      if(var == null) {
    111111        var = new Variable(scope.TranslateName(info.FormalName), data);
Note: See TracChangeset for help on using the changeset viewer.