Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12357


Ignore:
Timestamp:
04/29/15 10:50:08 (10 years ago)
Author:
pfleck
Message:

#2027 Removed obsolete manual termination criteria operators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TerminationCriteria/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs

    r12304 r12357  
    160160      OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator();
    161161      IntCounter generationsCounter = new IntCounter();
    162       //Comparator maxGenerationsComparator = new Comparator();
    163       //Comparator maxSelectionPressureComparator = new Comparator();
    164       //Comparator maxEvaluatedSolutionsComparator = new Comparator();
    165162      Placeholder comparisonFactorModifier = new Placeholder();
    166163      Placeholder analyzer2 = new Placeholder();
    167164      var termination = new TerminationOperator();
    168       //ConditionalBranch conditionalBranch1 = new ConditionalBranch();
    169       //ConditionalBranch conditionalBranch2 = new ConditionalBranch();
    170       //ConditionalBranch conditionalBranch3 = new ConditionalBranch();
    171165
    172166      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class OffspringSelectionGeneticAlgorithm expects this to be called Generations
     
    210204      generationsCounter.ValueParameter.ActualName = "Generations";
    211205
    212       //maxGenerationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
    213       //maxGenerationsComparator.LeftSideParameter.ActualName = "Generations";
    214       //maxGenerationsComparator.ResultParameter.ActualName = "TerminateMaximumGenerations";
    215       //maxGenerationsComparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
    216 
    217       //maxSelectionPressureComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
    218       //maxSelectionPressureComparator.LeftSideParameter.ActualName = "SelectionPressure";
    219       //maxSelectionPressureComparator.ResultParameter.ActualName = "TerminateSelectionPressure";
    220       //maxSelectionPressureComparator.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
    221 
    222       //maxEvaluatedSolutionsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
    223       //maxEvaluatedSolutionsComparator.LeftSideParameter.ActualName = EvaluatedSolutionsParameter.Name;
    224       //maxEvaluatedSolutionsComparator.ResultParameter.ActualName = "TerminateEvaluatedSolutions";
    225       //maxEvaluatedSolutionsComparator.RightSideParameter.ActualName = "MaximumEvaluatedSolutions";
    226 
    227206      comparisonFactorModifier.Name = "Update ComparisonFactor (placeholder)";
    228207      comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
     
    230209      analyzer2.Name = "Analyzer (placeholder)";
    231210      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
    232 
    233       //conditionalBranch1.Name = "MaximumSelectionPressure reached?";
    234       //conditionalBranch1.ConditionParameter.ActualName = "TerminateSelectionPressure";
    235 
    236       //conditionalBranch2.Name = "MaximumGenerations reached?";
    237       //conditionalBranch2.ConditionParameter.ActualName = "TerminateMaximumGenerations";
    238 
    239       //conditionalBranch3.Name = "MaximumEvaluatedSolutions reached?";
    240       //conditionalBranch3.ConditionParameter.ActualName = "TerminateEvaluatedSolutions";
    241211      #endregion
    242212
     
    248218      resultsCollector1.Successor = mainOperator;
    249219      mainOperator.Successor = generationsCounter;
    250       generationsCounter.Successor = comparisonFactorModifier; //maxGenerationsComparator;
    251       //maxGenerationsComparator.Successor = maxSelectionPressureComparator;
    252       //maxSelectionPressureComparator.Successor = maxEvaluatedSolutionsComparator;
    253       //maxEvaluatedSolutionsComparator.Successor = comparisonFactorModifier;
     220      generationsCounter.Successor = comparisonFactorModifier;
    254221      comparisonFactorModifier.Successor = analyzer2;
    255       analyzer2.Successor = termination; //conditionalBranch1;
    256       //conditionalBranch1.FalseBranch = conditionalBranch2;
    257       //conditionalBranch1.TrueBranch = null;
    258       //conditionalBranch1.Successor = null;
    259       //conditionalBranch2.FalseBranch = conditionalBranch3;
    260       //conditionalBranch2.TrueBranch = null;
    261       //conditionalBranch2.Successor = null;
    262       //conditionalBranch3.FalseBranch = mainOperator;
    263       //conditionalBranch3.TrueBranch = null;
    264       //conditionalBranch3.Successor = null;
     222      analyzer2.Successor = termination;
    265223      termination.ContinueBranch = mainOperator;
    266224      #endregion
Note: See TracChangeset for help on using the changeset viewer.