Changeset 1239 for branches/CEDMA-Refactoring-Ticket419
- Timestamp:
- 03/02/09 17:32:39 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffspringSelectionGP.cs
r1238 r1239 39 39 public class OffspringSelectionGP : StandardGP { 40 40 41 private IntData maxEvaluatedSolutions = new IntData(); 42 public int MaxEvaluatedSolutions { 43 get { return maxEvaluatedSolutions.Data; } 44 set { maxEvaluatedSolutions.Data = value; } 45 } 46 41 47 private DoubleData selectionPressureLimit = new DoubleData(); 42 48 public double SelectionPressureLimit { … … 60 66 PopulationSize = 1000; 61 67 Parents = 20; 62 Max Generations = 300;68 MaxEvaluatedSolutions = 1000000; 63 69 SelectionPressureLimit = 300; 64 70 ComparisonFactor = 1.0; … … 69 75 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector(); 70 76 injector.RemoveVariable("TournamentSize"); 77 injector.RemoveVariable("MaxGenerations"); 78 injector.AddVariable(new HeuristicLab.Core.Variable("MaxEvaluatedSolutions", maxEvaluatedSolutions)); 71 79 injector.AddVariable(new HeuristicLab.Core.Variable("ComparisonFactor", comparisonFactor)); 72 80 injector.AddVariable(new HeuristicLab.Core.Variable("SelectionPressureLimit", selectionPressureLimit)); … … 183 191 seq.Name = "Loop Condition"; 184 192 LessThanComparator generationsComparator = new LessThanComparator(); 185 generationsComparator.GetVariableInfo("LeftSide").ActualName = " Generations";186 generationsComparator.GetVariableInfo("RightSide").ActualName = "Max Generations";187 generationsComparator.GetVariableInfo("Result").ActualName = " GenerationsCondition";193 generationsComparator.GetVariableInfo("LeftSide").ActualName = "EvaluatedSolutions"; 194 generationsComparator.GetVariableInfo("RightSide").ActualName = "MaxEvaluatedSolutions"; 195 generationsComparator.GetVariableInfo("Result").ActualName = "EvaluatedSolutionsCondition"; 188 196 189 197 LessThanComparator selPresComparator = new LessThanComparator(); … … 193 201 194 202 ConditionalBranch generationsCond = new ConditionalBranch(); 195 generationsCond.GetVariableInfo("Condition").ActualName = " GenerationsCondition";203 generationsCond.GetVariableInfo("Condition").ActualName = "EvaluatedSolutionsCondition"; 196 204 197 205 ConditionalBranch selPresCond = new ConditionalBranch();
Note: See TracChangeset
for help on using the changeset viewer.