Changeset 12270 for branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState
- Timestamp:
- 03/31/15 11:44:41 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithm.cs
r12220 r12270 143 143 var initializeAgeProcessor = new UniformSubScopesProcessor(); 144 144 var initializeAge = new VariableCreator() { Name = "Initialize Age" }; 145 var initialize EvaluatedSolutions = new ExpressionCalculator() { Name = "InitializeEvaluatedSolutions" };146 var initialize ResultEvaluatedSolutions = new Assigner() { Name = "Initialize ResultEvaluatedSolutions" };145 var initializeLocalEvaluatedSolutions = new ExpressionCalculator() { Name = "Initialize local EvaluatedSolutions" }; 146 var initializeEvaluatedSolutions = new Assigner() { Name = "Initialize EvaluatedSolutions" }; 147 147 var initializePopulationSize = new Assigner() { Name = "Initialize PopulationSize" }; 148 148 var resultsCollector = new ResultsCollector(); … … 155 155 randomCreator.Successor = workingScopeCreator; 156 156 157 workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "LayersScope", "ElitesScope"});157 workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "LayersScope", }); 158 158 workingScopeCreator.Successor = layersProcessor; 159 159 160 160 layersProcessor.TargetScopeParameter.ActualName = "LayersScope"; 161 161 layersProcessor.Operator = layerCreator; 162 layersProcessor.Successor = initialize EvaluatedSolutions;162 layersProcessor.Successor = initializeLocalEvaluatedSolutions; 163 163 164 164 layerCreator.NumberOfSubScopesParameter.ActualName = "NumberOfLayers"; … … 183 183 initializeAge.CollectedValues.Add(new ValueParameter<IntValue>("LastMove", new IntValue(1))); 184 184 185 initialize EvaluatedSolutions.ExpressionResultParameter.ActualName = "EvaluatedSolutions";186 initialize EvaluatedSolutions.ExpressionParameter.Value = new StringValue("LayerSize NumberOfLayers * toint");187 initialize EvaluatedSolutions.CollectedValues.Add(new LookupParameter<IntValue>("LayerSize"));188 initialize EvaluatedSolutions.CollectedValues.Add(new LookupParameter<IntValue>("NumberOfLayers"));189 initialize EvaluatedSolutions.Successor = initializeResultEvaluatedSolutions;190 191 initialize ResultEvaluatedSolutions.LeftSideParameter.ActualName = "ResultEvaluatedSolutions";192 initialize ResultEvaluatedSolutions.RightSideParameter.ActualName = "EvaluatedSolutions";193 initialize ResultEvaluatedSolutions.Successor = initializePopulationSize;185 initializeLocalEvaluatedSolutions.ExpressionResultParameter.ActualName = "LocalEvaluatedSolutions"; 186 initializeLocalEvaluatedSolutions.ExpressionParameter.Value = new StringValue("LayerSize NumberOfLayers * toint"); 187 initializeLocalEvaluatedSolutions.CollectedValues.Add(new LookupParameter<IntValue>("LayerSize")); 188 initializeLocalEvaluatedSolutions.CollectedValues.Add(new LookupParameter<IntValue>("NumberOfLayers")); 189 initializeLocalEvaluatedSolutions.Successor = initializeEvaluatedSolutions; 190 191 initializeEvaluatedSolutions.LeftSideParameter.ActualName = "EvaluatedSolutions"; 192 initializeEvaluatedSolutions.RightSideParameter.ActualName = "LocalEvaluatedSolutions"; 193 initializeEvaluatedSolutions.Successor = initializePopulationSize; 194 194 195 195 initializePopulationSize.LeftSideParameter.ActualName = "PopulationSize"; … … 197 197 initializePopulationSize.Successor = resultsCollector; 198 198 199 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "ResultEvaluatedSolutions"));199 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions")); 200 200 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults", "Result set for each layer", "LayerResults", 2)); 201 201 resultsCollector.Successor = mainLoop; -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithmMainLoop.cs
r12223 r12270 98 98 var resetTargetIndex = new Assigner() { Name = "TargetIndex = MatingPoolSize" }; 99 99 var tryMoveUp = new AlpsSsMover() { Name = "Try Move Up" }; 100 var increment Evaluations = new IntCounter() { Name = "Incr.EvaluatedSolutions" };100 var incrementLocalEvaluations = new IntCounter() { Name = "Incr. local EvaluatedSolutions" }; 101 101 var incrementBatchIterations = new IntCounter() { Name = "Incr. BatchIterations" }; 102 102 var batchFinishedComperator = new Comparator() { Name = "BatchFinished = BatchIterations >= BatchSize" }; 103 103 var batchFinishedBranch = new ConditionalBranch() { Name = "BatchFinished?" }; 104 104 var incrIterations = new IntCounter() { Name = "Incr. Iterations" }; 105 var update ResultEvaluatedSolutions = new IntCounter() { Name = "Update ResultEvaluatedSolutions" };105 var updateEvaluatedSolutions = new IntCounter() { Name = "Update EvaluatedSolutions" }; 106 106 var layerAnalyzerProcessor = new UniformSubScopesProcessor(); 107 107 var layerAnalyzer = new Placeholder() { Name = "LayerAnalyzer (Placeholder)" }; … … 176 176 177 177 initializeAge.LeftSideParameter.ActualName = "EvalsCreated"; 178 initializeAge.RightSideParameter.ActualName = " EvaluatedSolutions";178 initializeAge.RightSideParameter.ActualName = "LocalEvaluatedSolutions"; 179 179 180 180 layerSorter.ValueParameter.ActualName = "Quality"; … … 220 220 resetTargetIndex.Successor = createRandomIndividual; 221 221 222 tryMoveUp.Successor = increment Evaluations;223 224 increment Evaluations.ValueParameter.ActualName = "EvaluatedSolutions";225 increment Evaluations.Increment = new IntValue(1);222 tryMoveUp.Successor = incrementLocalEvaluations; 223 224 incrementLocalEvaluations.ValueParameter.ActualName = "LocalEvaluatedSolutions"; 225 incrementLocalEvaluations.Increment = new IntValue(1); 226 226 227 227 incrementBatchIterations.ValueParameter.ActualName = "BatchIterations"; … … 240 240 incrIterations.ValueParameter.ActualName = "Iterations"; 241 241 incrIterations.Increment = new IntValue(1); 242 incrIterations.Successor = update ResultEvaluatedSolutions;243 244 update ResultEvaluatedSolutions.ValueParameter.ActualName = "ResultEvaluatedSolutions";245 update ResultEvaluatedSolutions.IncrementParameter.ActualName = "BatchSize";246 update ResultEvaluatedSolutions.IncrementParameter.Value = null;247 update ResultEvaluatedSolutions.Successor = layerAnalyzerProcessor;242 incrIterations.Successor = updateEvaluatedSolutions; 243 244 updateEvaluatedSolutions.ValueParameter.ActualName = "EvaluatedSolutions"; 245 updateEvaluatedSolutions.IncrementParameter.ActualName = "BatchSize"; 246 updateEvaluatedSolutions.IncrementParameter.Value = null; 247 updateEvaluatedSolutions.Successor = layerAnalyzerProcessor; 248 248 249 249 layerAnalyzerProcessor.Operator = layerAnalyzer; -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/SteadyStateMatingPoolCreator.cs
r12220 r12270 71 71 Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions")); 72 72 Parameters.Add(new LookupParameter<IntValue>("PopulationSize")); 73 74 73 } 75 74
Note: See TracChangeset
for help on using the changeset viewer.