Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/13 15:02:47 (11 years ago)
Author:
ascheibe
Message:

#2030 merged trunk into hive performance branch

Location:
branches/HivePerformance/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources

  • branches/HivePerformance/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs

    r9539 r9616  
    7373      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
    7474    }
     75    public IValueLookupParameter<BoolValue> ReevaluateElitesParameter {
     76      get { return (IValueLookupParameter<BoolValue>)Parameters["ReevaluateElites"]; }
     77    }
    7578    public ValueLookupParameter<ResultCollection> ResultsParameter {
    7679      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     
    134137      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
    135138      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
     139      Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
    136140      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results."));
    137141      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the villages."));
     
    236240      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
    237241      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
     242      mainOperator.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name;
    238243      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
    239244      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
     
    424429    }
    425430
     431    [StorableHook(HookType.AfterDeserialization)]
     432    private void AfterDeserialization() {
     433      // BackwardsCompatibility3.3
     434      #region Backwards compatible code, remove with 3.4
     435      if (!Parameters.ContainsKey("ReevaluateElites")) {
     436        Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
     437      }
     438      #endregion
     439    }
     440
    426441    public override IOperation Apply() {
    427442      if (CrossoverParameter.ActualValue == null)
Note: See TracChangeset for help on using the changeset viewer.