Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/13 15:02:47 (12 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/IslandOffspringSelectionGeneticAlgorithm.cs

    r9539 r9616  
    100100      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
    101101    }
     102    private IFixedValueParameter<BoolValue> ReevaluateElitesParameter {
     103      get { return (IFixedValueParameter<BoolValue>)Parameters["ReevaluateElites"]; }
     104    }
    102105    private ValueLookupParameter<DoubleValue> SuccessRatioParameter {
    103106      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
     
    192195      get { return ElitesParameter.Value; }
    193196      set { ElitesParameter.Value = value; }
     197    }
     198    public bool ReevaluteElites {
     199      get { return ReevaluateElitesParameter.Value.Value; }
     200      set { ReevaluateElitesParameter.Value.Value = value; }
    194201    }
    195202    private DoubleValue SuccessRatio {
     
    257264    [StorableHook(HookType.AfterDeserialization)]
    258265    private void AfterDeserialization() {
    259       #region Backwards Compatibility
     266      // BackwardsCompatibility3.3
     267      #region Backwards compatible code, remove with 3.4
    260268      if (successfulOffspringAnalyzer == null)
    261269        successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
     270      if (!Parameters.ContainsKey("ReevaluateElites")) {
     271        Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true });
     272      }
    262273      #endregion
    263274
     
    293304      Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
    294305      Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1)));
     306      Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", new BoolValue(false)) { Hidden = true });
    295307      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1)));
    296308      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start).", new DoubleValue(0)));
     
    355367      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
    356368      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
     369      mainLoop.ReevaluateElitesParameter.ActualName = ReevaluateElitesParameter.Name;
    357370      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
    358371      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
Note: See TracChangeset for help on using the changeset viewer.