Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/21/14 14:20:03 (10 years ago)
Author:
abeham
Message:

#2172:

  • Added hierarchy of parameters to enable this as a hidden parameter in OSGA, SASEGASA, Island-OSGA
    • New default value for Island-OSGA and SASEGASA is true (it will be set to false if loaded from an older file)
  • Changed visibility of some properties to public
File:
1 edited

Legend:

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

    r9592 r10643  
    133133      get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
    134134    }
     135    private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter {
     136      get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
     137    }
    135138    #endregion
    136139
     
    200203      set { ReevaluateElitesParameter.Value.Value = value; }
    201204    }
    202     private DoubleValue SuccessRatio {
     205    public DoubleValue SuccessRatio {
    203206      get { return SuccessRatioParameter.Value; }
    204207      set { SuccessRatioParameter.Value = value; }
    205208    }
    206     private DoubleValue ComparisonFactorLowerBound {
     209    public DoubleValue ComparisonFactorLowerBound {
    207210      get { return ComparisonFactorLowerBoundParameter.Value; }
    208211      set { ComparisonFactorLowerBoundParameter.Value = value; }
    209212    }
    210     private DoubleValue ComparisonFactorUpperBound {
     213    public DoubleValue ComparisonFactorUpperBound {
    211214      get { return ComparisonFactorUpperBoundParameter.Value; }
    212215      set { ComparisonFactorUpperBoundParameter.Value = value; }
     
    216219      set { ComparisonFactorModifierParameter.Value = value; }
    217220    }
    218     private DoubleValue MaximumSelectionPressure {
     221    public DoubleValue MaximumSelectionPressure {
    219222      get { return MaximumSelectionPressureParameter.Value; }
    220223      set { MaximumSelectionPressureParameter.Value = value; }
    221224    }
    222     private BoolValue OffspringSelectionBeforeMutation {
     225    public BoolValue OffspringSelectionBeforeMutation {
    223226      get { return OffspringSelectionBeforeMutationParameter.Value; }
    224227      set { OffspringSelectionBeforeMutationParameter.Value = value; }
     
    235238      get { return MaximumEvaluatedSolutionsParameter.Value; }
    236239      set { MaximumEvaluatedSolutionsParameter.Value = value; }
     240    }
     241    public bool FillPopulationWithParents {
     242      get { return FillPopulationWithParentsParameter.Value.Value; }
     243      set { FillPopulationWithParentsParameter.Value.Value = value; }
    237244    }
    238245    private RandomCreator RandomCreator {
     
    271278        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 });
    272279      }
     280      if (!Parameters.ContainsKey("FillPopulationWithParents"))
     281        Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
    273282      #endregion
    274283
     
    315324      Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer()));
    316325      Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
     326      Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(true)) { Hidden = true });
    317327
    318328      RandomCreator randomCreator = new RandomCreator();
     
    379389      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
    380390      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
     391      mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
    381392      mainLoop.Successor = null;
    382393
Note: See TracChangeset for help on using the changeset viewer.