Changeset 1347 for trunk/sources
- Timestamp:
- 03/14/09 23:08:28 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/OffspringSelectionGP.cs
r1287 r1347 35 35 using HeuristicLab.Operators.Programmable; 36 36 using HeuristicLab.Selection.OffspringSelection; 37 using HeuristicLab.Evolutionary; 37 38 38 39 namespace HeuristicLab.GP.StructureIdentification { … … 123 124 CombinedOperator childCreater = new CombinedOperator(); 124 125 childCreater.Name = "Create children"; 126 SequentialProcessor main = new SequentialProcessor(); 125 127 SequentialProcessor seq = new SequentialProcessor(); 126 128 SequentialProcessor offspringSelectionSeq = new SequentialProcessor(); … … 131 133 EmptyOperator emptyOp = new EmptyOperator(); 132 134 OffspringSelector offspringSelector = new OffspringSelector(); 133 OffspringAnalyzer offspringAnalyzer = new OffspringAnalyzer(); 134 SequentialProcessor selectedProc = new SequentialProcessor(); 135 ChildrenInitializer childInitializer = new ChildrenInitializer(); 136 UniformSequentialSubScopesProcessor individualProc = new UniformSequentialSubScopesProcessor(); 137 SequentialProcessor individualSeqProc = new SequentialProcessor(); 135 138 OperatorExtractor crossover = new OperatorExtractor(); 136 139 crossover.Name = "Crossover (extr.)"; 137 140 crossover.GetVariableInfo("Operator").ActualName = "Crossover"; 138 UniformSequentialSubScopesProcessor individualProc = new UniformSequentialSubScopesProcessor();139 SequentialProcessor individualSeqProc = new SequentialProcessor();140 141 StochasticBranch cond = new StochasticBranch(); 141 142 cond.GetVariableInfo("Probability").ActualName = "MutationRate"; … … 148 149 Counter evalCounter = new Counter(); 149 150 evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions"; 151 WeightedOffspringFitnessComparer offspringFitnessComparer = new WeightedOffspringFitnessComparer(); 152 SubScopesRemover parentScopesRemover = new SubScopesRemover(); 150 153 151 154 Sorter sorter = new Sorter(); … … 160 163 validationQualityEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 161 164 165 main.AddSubOperator(seq); 166 seq.AddSubOperator(selector); 167 seq.AddSubOperator(seqSubScopesProc); 162 168 seqSubScopesProc.AddSubOperator(emptyOp); 163 seqSubScopesProc.AddSubOperator(offspringAnalyzer); 164 165 seq.AddSubOperator(offspringSelectionSeq); 166 offspringSelectionSeq.AddSubOperator(selector); 167 offspringSelectionSeq.AddSubOperator(seqSubScopesProc); 168 offspringSelectionSeq.AddSubOperator(offspringSelector); 169 offspringSelector.AddSubOperator(offspringSelectionSeq); 170 171 offspringAnalyzer.AddSubOperator(selectedProc); 172 selectedProc.AddSubOperator(crossover); 173 selectedProc.AddSubOperator(individualProc); 169 seqSubScopesProc.AddSubOperator(offspringSelectionSeq); 170 seq.AddSubOperator(offspringSelector); 171 offspringSelector.AddSubOperator(seq); 172 173 offspringSelectionSeq.AddSubOperator(childInitializer); 174 offspringSelectionSeq.AddSubOperator(individualProc); 175 offspringSelectionSeq.AddSubOperator(sorter); 176 174 177 individualProc.AddSubOperator(individualSeqProc); 178 individualSeqProc.AddSubOperator(crossover); 175 179 individualSeqProc.AddSubOperator(cond); 176 180 cond.AddSubOperator(manipulator); 177 181 individualSeqProc.AddSubOperator(evaluator); 178 182 individualSeqProc.AddSubOperator(evalCounter); 183 individualSeqProc.AddSubOperator(offspringFitnessComparer); 184 individualSeqProc.AddSubOperator(parentScopesRemover); 179 185 180 186 SequentialSubScopesProcessor seqSubScopesProc2 = new SequentialSubScopesProcessor(); 181 seq.AddSubOperator(seqSubScopesProc2);187 main.AddSubOperator(seqSubScopesProc2); 182 188 seqSubScopesProc2.AddSubOperator(emptyOp); 183 189 … … 189 195 validationEvaluator.AddSubOperator(validationQualityEvaluator); 190 196 191 childCreater.OperatorGraph.AddOperator( seq);192 childCreater.OperatorGraph.InitialOperator = seq;197 childCreater.OperatorGraph.AddOperator(main); 198 childCreater.OperatorGraph.InitialOperator = main; 193 199 return childCreater; 194 200 }
Note: See TracChangeset
for help on using the changeset viewer.