Changeset 12220 for branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState
- Timestamp:
- 03/18/15 14:25:08 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithm.cs
r12192 r12220 134 134 135 135 var randomCreator = new RandomCreator(); 136 var workingScopeCreator = new NamedSubScopesCreator() { Name = "Create Working Scopeand Layers-Scope" };136 var workingScopeCreator = new NamedSubScopesCreator() { Name = "Create Working- and Layers-Scope" }; 137 137 var layersProcessor = new NamedSubScopeProcessor() { Name = "Process Layers-Scope" }; 138 var layerCreator = new SubScopesCreator() { Name = "Create Layer " };139 var layerProcessor = new /*Layer*/UniformSubScopesProcessor();138 var layerCreator = new SubScopesCreator() { Name = "Create Layers" }; 139 var layerProcessor = new UniformSubScopesProcessor(); 140 140 var layerVariableCreator = new VariableCreator() { Name = "Initialize Layer" }; 141 141 var layerNumberCreator = new ScopeIndexAssigner() { Name = "Create Layer Number" }; … … 155 155 randomCreator.Successor = workingScopeCreator; 156 156 157 workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "Layers " });157 workingScopeCreator.NamesParameter.Value = new StringArray(new[] { "WorkingScope", "LayersScope", "ElitesScope" }); 158 158 workingScopeCreator.Successor = layersProcessor; 159 159 160 layersProcessor.TargetScopeParameter.ActualName = "Layers ";160 layersProcessor.TargetScopeParameter.ActualName = "LayersScope"; 161 161 layersProcessor.Operator = layerCreator; 162 162 layersProcessor.Successor = initializeEvaluatedSolutions; … … 198 198 199 199 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "ResultEvaluatedSolutions")); 200 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults", "Result set for each layer", "LayerResults", 2)); 200 201 resultsCollector.Successor = mainLoop; 201 202 … … 204 205 var tournamentSelector = SelectorParameter.ValidValues.OfType<TournamentSelector>().FirstOrDefault(); 205 206 if (tournamentSelector != null) { 206 tournamentSelector.GroupSizeParameter.Value = new IntValue( 5);207 tournamentSelector.GroupSizeParameter.Value = new IntValue(4); 207 208 SelectorParameter.Value = tournamentSelector; 208 209 } -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithmMainLoop.cs
r12192 r12220 86 86 var initializeAge = new Assigner() { Name = "Initialize Age" }; 87 87 var removeEmptySubscope = new SubScopesRemover() { Name = "Remove empty subscope (from solutioncreator)" }; 88 var layerSorter = new SubScopesSorter() { Name = "Sort Layer" }; 88 89 var selectRandomTargetIndex = new RandomIntAssigner(); 89 90 var matingPoolCreator = new SteadyStateMatingPoolCreator() { Name = "Create MatingPool" }; … … 126 127 resultsColletor.Successor = layersProcessor; 127 128 128 layersProcessor.TargetScopeParameter.ActualName = "Layers ";129 layersProcessor.TargetScopeParameter.ActualName = "LayersScope"; 129 130 layersProcessor.Operator = initializeBatchIteration; 130 131 … … 144 145 isLayerZeroBranch.ConditionParameter.ActualName = "IsLayerZero"; 145 146 isLayerZeroBranch.TrueBranch = isDoInitBranch; 146 isLayerZeroBranch.FalseBranch = selectRandomTargetIndex;147 isLayerZeroBranch.FalseBranch = layerSorter; 147 148 isLayerZeroBranch.Successor = tryMoveUp; 148 149 149 150 isDoInitBranch.ConditionParameter.ActualName = "DoInit"; 150 151 isDoInitBranch.TrueBranch = setTargetIndedxToNextInit; 151 isDoInitBranch.FalseBranch = selectRandomTargetIndex;152 isDoInitBranch.FalseBranch = layerSorter; 152 153 153 154 setTargetIndedxToNextInit.LeftSideParameter.ActualName = "TargetIndex"; … … 177 178 initializeAge.RightSideParameter.ActualName = "EvaluatedSolutions"; 178 179 180 layerSorter.ValueParameter.ActualName = "Quality"; 181 layerSorter.DescendingParameter.ActualName = "Maximization"; 182 layerSorter.Successor = selectRandomTargetIndex; 183 179 184 selectRandomTargetIndex.LeftSideParameter.ActualName = "TargetIndex"; 180 selectRandomTargetIndex.MinimumParameter.Value = new IntValue(0); 185 selectRandomTargetIndex.MinimumParameter.ActualName = "Elites"; 186 selectRandomTargetIndex.MinimumParameter.Value = null; 181 187 selectRandomTargetIndex.MaximumParameter.ActualName = "LayerSize"; 182 188 selectRandomTargetIndex.MaximumParameter.Value = null; -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsMover.cs
r12174 r12220 50 50 get { return (ILookupParameter<IScope>)Parameters["WorkingScope"]; } 51 51 } 52 private ILookupParameter<IScope> Layers Parameter {53 get { return (ILookupParameter<IScope>)Parameters["Layers "]; }52 private ILookupParameter<IScope> LayersScopeParameter { 53 get { return (ILookupParameter<IScope>)Parameters["LayersScope"]; } 54 54 } 55 55 public ILookupParameter<IRandom> RandomParameter { … … 92 92 Parameters.Add(new LookupParameter<IntValue>("NumberOfLayers")); 93 93 Parameters.Add(new LookupParameter<IScope>("WorkingScope")); 94 Parameters.Add(new LookupParameter<IScope>("Layers "));94 Parameters.Add(new LookupParameter<IScope>("LayersScope")); 95 95 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use.")); 96 96 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality")); … … 123 123 maximization = MaximizationParameter.ActualValue.Value; 124 124 125 layers = Layers Parameter.ActualValue;125 layers = LayersScopeParameter.ActualValue; 126 126 var newIndividual = (IScope)WorkingScopeParameter.ActualValue.Clone(); 127 127 newIndividual.Name = j.ToString(); -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/SteadyStateMatingPoolCreator.cs
r12192 r12220 35 35 get { return (ILookupParameter<IScope>)Parameters["WorkingScope"]; } 36 36 } 37 private ILookupParameter<IScope> Layers Parameter {38 get { return (ILookupParameter<IScope>)Parameters["Layers "]; }37 private ILookupParameter<IScope> LayersScopeParameter { 38 get { return (ILookupParameter<IScope>)Parameters["LayersScope"]; } 39 39 } 40 40 private ILookupParameter<IntValue> LayerParameter { … … 65 65 : base() { 66 66 Parameters.Add(new LookupParameter<IScope>("WorkingScope")); 67 Parameters.Add(new LookupParameter<IScope>("Layers "));67 Parameters.Add(new LookupParameter<IScope>("LayersScope")); 68 68 Parameters.Add(new LookupParameter<IntValue>("Layer")); 69 69 Parameters.Add(new LookupParameter<IntArray>("AgeLimits")); … … 77 77 int layerNumber = LayerParameter.ActualValue.Value; 78 78 var workingScope = WorkingScopeParameter.ActualValue; 79 var layers = Layers Parameter.ActualValue;79 var layers = LayersScopeParameter.ActualValue; 80 80 var ageLimits = AgeLimitsParameter.ActualValue; 81 81 int numberOfLayers = NumberOfLayersParameter.ActualValue.Value;
Note: See TracChangeset
for help on using the changeset viewer.