Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11081 for trunk


Ignore:
Timestamp:
07/03/14 14:05:56 (10 years ago)
Author:
mkommend
Message:

#2171: Updated best quality in the scilab solutions analyzer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionsAnalyzer.cs

    r11077 r11081  
    121121      var bestSolutions = (ItemSet<DoubleArray>)results[BestSolutionsResultName].Value;
    122122      //clear best solutions if new found quality is better than the existing one
    123       if (max && bestQuality > previousBestQuality
    124           || !max && bestQuality < previousBestQuality)
     123      if (max && bestQuality > previousBestQuality || !max && bestQuality < previousBestQuality)
    125124        bestSolutions.Clear();
    126125
     
    134133        }
    135134      }
    136       PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
    137135
     136      //update best quality
     137      if (max && bestQuality >= BestQualityParameter.ActualValue.Value
     138          || !max && bestQuality <= BestQualityParameter.ActualValue.Value) {
     139        BestQualityParameter.ActualValue.Value = bestQuality;
     140      }
    138141      //update best known quality
    139142      if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
     
    141144        BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
    142145      }
     146      PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
    143147
    144148      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.