Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3698


Ignore:
Timestamp:
05/07/10 13:46:21 (15 years ago)
Author:
abeham
Message:

#893

  • fixed review comments regarding comparison factor results / modification
  • corrected the description of a parameter
  • removed unnecessary parameters
Location:
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3
Files:
3 edited

Legend:

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

    r3689 r3698  
    259259      Parameters.Add(new ConstrainedValueParameter<IMigrator>("Migrator", "The migration strategy."));
    260260      Parameters.Add(new ConstrainedValueParameter<ISelector>("EmigrantsSelector", "Selects the individuals that will be migrated."));
    261       Parameters.Add(new ConstrainedValueParameter<IReplacer>("ImmigrationReplacer", "Selects the population from the unification of the original population and the immigrants."));
     261      Parameters.Add(new ConstrainedValueParameter<IReplacer>("ImmigrationReplacer", "Replaces part of the original population with the immigrants."));
    262262      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions of each island.", new IntValue(100)));
    263263      Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations that should be processed.", new IntValue(100)));
     
    318318      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
    319319      mainLoop.ComparisonFactorParameter.ActualName = "ComparisonFactor";
    320       mainLoop.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
    321320      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
    322       mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
    323321      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
    324322      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs

    r3673 r3698  
    111111    public LookupParameter<DoubleValue> ComparisonFactorParameter {
    112112      get { return (LookupParameter<DoubleValue>)Parameters["ComparisonFactor"]; }
    113     }
    114     public ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
    115       get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
    116     }
    117     public ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
    118       get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
    119113    }
    120114    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
     
    163157      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
    164158      Parameters.Add(new LookupParameter<DoubleValue>("ComparisonFactor", "The comparison factor is used to determine whether the offspring should be compared to the better parent, the worse parent or a quality value linearly interpolated between them. It is in the range [0;1]."));
    165       Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start)."));
    166       Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end)."));
    167159      Parameters.Add(new ValueLookupParameter<IOperator>("ComparisonFactorModifier", "The operator used to modify the comparison factor."));
    168160      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
     
    178170      Placeholder islandAnalyzer1 = new Placeholder();
    179171      ResultsCollector islandResultsCollector1 = new ResultsCollector();
     172      Placeholder comparisonFactorModifier1 = new Placeholder();
    180173      Placeholder analyzer1 = new Placeholder();
    181174      ResultsCollector resultsCollector1 = new ResultsCollector();
    182175      ResultsCollector resultsCollector2 = new ResultsCollector();
    183       Placeholder comparisonFactorModifier = new Placeholder();
    184176      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
    185177      ConditionalBranch islandTerminatedBySelectionPressure1 = new ConditionalBranch();
     
    207199      Comparator generationsComparator = new Comparator();
    208200      Comparator terminatedIslandsComparator = new Comparator();
     201      Placeholder comparisonFactorModifier2 = new Placeholder();
    209202      Placeholder analyzer2 = new Placeholder();
    210203      ResultsCollector resultsCollector3 = new ResultsCollector();
     
    230223      islandResultsCollector1.ResultsParameter.ActualName = "Results";
    231224
     225      comparisonFactorModifier1.Name = "Initialize Comparison Factor (Placeholder)";
     226      comparisonFactorModifier1.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
     227
    232228      analyzer1.Name = "Analyzer (placeholder)";
    233229      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
     
    236232      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
    237233      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
     234      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Comparison Factor", null, "ComparisonFactor"));
    238235      resultsCollector1.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("IslandResults", "Result set for each island", "Results"));
    239236      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
     
    242239      resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions"));
    243240      resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;
    244 
    245       comparisonFactorModifier.Name = "ComparisonFactorModifier (Placeholder)";
    246       comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
    247241
    248242      islandTerminatedBySelectionPressure1.Name = "Island Terminated ?";
     
    349343      terminatedIslandsComparator.ResultParameter.ActualName = "TerminateTerminatedIslands";
    350344
     345      comparisonFactorModifier2.Name = "Update Comparison Factor (Placeholder)";
     346      comparisonFactorModifier2.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
     347
    351348      analyzer2.Name = "Analyzer (placeholder)";
    352349      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
     
    367364      variableCreator.Successor = uniformSubScopesProcessor0;
    368365      uniformSubScopesProcessor0.Operator = islandVariableCreator;
    369       uniformSubScopesProcessor0.Successor = analyzer1;
     366      uniformSubScopesProcessor0.Successor = comparisonFactorModifier1;
    370367      islandVariableCreator.Successor = islandAnalyzer1;
    371368      islandAnalyzer1.Successor = islandResultsCollector1;
    372369      islandResultsCollector1.Successor = null;
     370      comparisonFactorModifier1.Successor = analyzer1;
    373371      analyzer1.Successor = resultsCollector1;
    374372      resultsCollector1.Successor = resultsCollector2;
    375       resultsCollector2.Successor = comparisonFactorModifier;
    376       comparisonFactorModifier.Successor = uniformSubScopesProcessor1;
     373      resultsCollector2.Successor = uniformSubScopesProcessor1;
    377374      uniformSubScopesProcessor1.Operator = islandTerminatedBySelectionPressure1;
    378375      uniformSubScopesProcessor1.Successor = generationsCounter;
     
    407404      immigrationReplacer.Successor = null;
    408405      generationsComparator.Successor = terminatedIslandsComparator;
    409       terminatedIslandsComparator.Successor = analyzer2;
     406      terminatedIslandsComparator.Successor = comparisonFactorModifier2;
     407      comparisonFactorModifier2.Successor = analyzer2;
    410408      analyzer2.Successor = resultsCollector3;
    411409      resultsCollector3.Successor = generationsTerminationCondition;
     
    414412      generationsTerminationCondition.Successor = null;
    415413      terminatedIslandsCondition.TrueBranch = null;
    416       terminatedIslandsCondition.FalseBranch = comparisonFactorModifier;
     414      terminatedIslandsCondition.FalseBranch = uniformSubScopesProcessor1;
    417415      terminatedIslandsCondition.Successor = null;
    418416      #endregion
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs

    r3673 r3698  
    7575    public ValueLookupParameter<DoubleValue> SuccessRatioParameter {
    7676      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
    77     }
    78     public ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
    79       get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
    80     }
    81     public ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
    82       get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
    8377    }
    8478    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
     
    116110      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to analyze each generation."));
    117111      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
    118       Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start)."));
    119       Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end)."));
    120112      Parameters.Add(new ValueLookupParameter<IOperator>("ComparisonFactorModifier", "The operator used to modify the comparison factor."));
    121113      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
     
    125117      #region Create operators
    126118      VariableCreator variableCreator = new VariableCreator();
    127       Placeholder comparisonFactorModifier = new Placeholder();
     119      Placeholder comparisonFactorModifier1 = new Placeholder();
    128120      Placeholder analyzer1 = new Placeholder();
    129121      ResultsCollector resultsCollector1 = new ResultsCollector();
     
    133125      Comparator maxGenerationsComparator = new Comparator();
    134126      Comparator maxSelectionPressureComparator = new Comparator();
     127      Placeholder comparisonFactorModifier2 = new Placeholder();
    135128      Placeholder analyzer2 = new Placeholder();
    136129      ResultsCollector resultsCollector3 = new ResultsCollector();
     
    142135      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
    143136      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentSuccessRatio", new DoubleValue(0)));
    144 
    145       comparisonFactorModifier.Name = "Modify ComparisonFactor (placeholder)";
    146       comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
     137      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("ComparisonFactor", new DoubleValue(0)));
     138
     139      comparisonFactorModifier1.Name = "Initialize ComparisonFactor (placeholder)";
     140      comparisonFactorModifier1.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
    147141
    148142      analyzer1.Name = "Analyzer (placeholder)";
     
    190184      maxSelectionPressureComparator.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
    191185
     186      comparisonFactorModifier2.Name = "Update ComparisonFactor (placeholder)";
     187      comparisonFactorModifier2.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
     188
    192189      analyzer2.Name = "Analyzer (placeholder)";
    193190      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
     
    206203      #region Create operator graph
    207204      OperatorGraph.InitialOperator = variableCreator;
    208       variableCreator.Successor = comparisonFactorModifier;
    209       comparisonFactorModifier.Successor = analyzer1;
     205      variableCreator.Successor = comparisonFactorModifier1;
     206      comparisonFactorModifier1.Successor = analyzer1;
    210207      analyzer1.Successor = resultsCollector1;
    211208      resultsCollector1.Successor = resultsCollector2;
     
    214211      generationsCounter.Successor = maxGenerationsComparator;
    215212      maxGenerationsComparator.Successor = maxSelectionPressureComparator;
    216       maxSelectionPressureComparator.Successor = analyzer2;
     213      maxSelectionPressureComparator.Successor = comparisonFactorModifier2;
     214      comparisonFactorModifier2.Successor = analyzer2;
    217215      analyzer2.Successor = resultsCollector3;
    218216      resultsCollector3.Successor = conditionalBranch1;
Note: See TracChangeset for help on using the changeset viewer.