Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/13 16:56:21 (11 years ago)
Author:
mkommend
Message:

#2038: Merged r9553:9555, r9569, r9591:r9592, r9618 into the stable branch.

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs

    r9456 r9673  
    9090    public ValueLookupParameter<IntValue> ElitesParameter {
    9191      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
     92    }
     93    public IValueLookupParameter<BoolValue> ReevaluateElitesParameter {
     94      get { return (IValueLookupParameter<BoolValue>)Parameters["ReevaluateElites"]; }
    9295    }
    9396    public ValueLookupParameter<ResultCollection> ResultsParameter {
     
    158161      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."));
    159162      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
     163      Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
    160164      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results."));
    161165      Parameters.Add(new ValueLookupParameter<IOperator>("Visualizer", "The operator used to visualize solutions."));
     
    248252      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
    249253      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
     254      mainOperator.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name;
    250255      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
    251256      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
     
    414419    }
    415420
     421    [StorableHook(HookType.AfterDeserialization)]
     422    private void AfterDeserialization() {
     423      // BackwardsCompatibility3.3
     424      #region Backwards compatible code, remove with 3.4
     425      if (!Parameters.ContainsKey("ReevaluateElites")) {
     426        Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
     427      }
     428      #endregion
     429    }
     430
    416431    public override IOperation Apply() {
    417432      if (CrossoverParameter.ActualValue == null)
Note: See TracChangeset for help on using the changeset viewer.