Changeset 12094
- Timestamp:
- 02/27/15 11:09:33 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs
r12071 r12094 178 178 private GeneticAlgorithmMainLoop CreatePreparedGeneticAlgorithmMainLoop() { 179 179 var mainLoop = new GeneticAlgorithmMainLoop(); 180 var numberOfSelectedSubScopesCalculator = new NumberOfSelectedSubScopesCalculator();180 var numberOfSelectedSubScopesCalculator = new ExpressionCalculator() { Name = "NumberOfSelectedSubScopes = (PopulationSize - Elites) * 2" }; 181 181 var selector = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Selector"); 182 182 var crossover = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Crossover"); … … 186 186 // Operator starts with numberOfSelectedSubScopesCalculator 187 187 mainLoop.OperatorGraph.InitialOperator = numberOfSelectedSubScopesCalculator; 188 numberOfSelectedSubScopesCalculator.CollectedValues.Add(new LookupParameter<IntValue>("PopulationSize")); 189 numberOfSelectedSubScopesCalculator.CollectedValues.Add(new LookupParameter<IntValue>("Elites")); 190 numberOfSelectedSubScopesCalculator.ExpressionResultParameter.ActualName = "NumberOfSelectedSubScopes"; 191 numberOfSelectedSubScopesCalculator.ExpressionParameter.Value = new StringValue("PopulationSize Elites - 2 * toint"); 188 192 numberOfSelectedSubScopesCalculator.Successor = selector; 189 193
Note: See TracChangeset
for help on using the changeset viewer.