Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/03/13 14:39:36 (11 years ago)
Author:
mkommend
Message:

#2038: Added reevaluation of elites in ES, IslandGA, IslandOSGA, OSGA, SASEGASA, and RAPGA.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs

    r9456 r9569  
    6363      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
    6464    }
     65    public IValueLookupParameter<BoolValue> ReevaluateElitesParameter {
     66      get { return (IValueLookupParameter<BoolValue>)Parameters["ReevaluateElites"]; }
     67    }
    6568    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
    6669      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
     
    106109      : base() {
    107110      Initialize();
     111    }
     112
     113    [StorableHook(HookType.AfterDeserialization)]
     114    private void AfterDeserialization() {
     115      if (!Parameters.ContainsKey("ReevaluateElites")) {
     116        Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
     117      }
    108118    }
    109119
     
    120130      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."));
    121131      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
     132      Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
    122133      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed."));
    123134      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
     
    170181      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
    171182      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
     183      mainOperator.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name;
    172184      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
    173185      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
Note: See TracChangeset for help on using the changeset viewer.