Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/25/13 13:39:13 (11 years ago)
Author:
mkommend
Message:

#1997: Merged trunk changes in data analysis island GA branch.

Location:
branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm

  • branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs

    r7259 r9756  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    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.