Changeset 12357
- Timestamp:
- 04/29/15 10:50:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TerminationCriteria/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
r12304 r12357 160 160 OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator(); 161 161 IntCounter generationsCounter = new IntCounter(); 162 //Comparator maxGenerationsComparator = new Comparator();163 //Comparator maxSelectionPressureComparator = new Comparator();164 //Comparator maxEvaluatedSolutionsComparator = new Comparator();165 162 Placeholder comparisonFactorModifier = new Placeholder(); 166 163 Placeholder analyzer2 = new Placeholder(); 167 164 var termination = new TerminationOperator(); 168 //ConditionalBranch conditionalBranch1 = new ConditionalBranch();169 //ConditionalBranch conditionalBranch2 = new ConditionalBranch();170 //ConditionalBranch conditionalBranch3 = new ConditionalBranch();171 165 172 166 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class OffspringSelectionGeneticAlgorithm expects this to be called Generations … … 210 204 generationsCounter.ValueParameter.ActualName = "Generations"; 211 205 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 227 206 comparisonFactorModifier.Name = "Update ComparisonFactor (placeholder)"; 228 207 comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name; … … 230 209 analyzer2.Name = "Analyzer (placeholder)"; 231 210 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";241 211 #endregion 242 212 … … 248 218 resultsCollector1.Successor = mainOperator; 249 219 mainOperator.Successor = generationsCounter; 250 generationsCounter.Successor = comparisonFactorModifier; //maxGenerationsComparator; 251 //maxGenerationsComparator.Successor = maxSelectionPressureComparator; 252 //maxSelectionPressureComparator.Successor = maxEvaluatedSolutionsComparator; 253 //maxEvaluatedSolutionsComparator.Successor = comparisonFactorModifier; 220 generationsCounter.Successor = comparisonFactorModifier; 254 221 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; 265 223 termination.ContinueBranch = mainOperator; 266 224 #endregion
Note: See TracChangeset
for help on using the changeset viewer.