Changeset 12157 for branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState
- Timestamp:
- 03/09/15 09:39:47 (10 years ago)
- Location:
- branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/AlpsSsGeneticAlgorithm.cs
r12153 r12157 131 131 var randomCreator = new RandomCreator(); 132 132 var workingScopeCreator = new NamedSubScopesCreator() { Name = "Create WorkingScope and Layers-Scope" }; 133 var layersProcessor = new SubScopesProcessor();133 var layersProcessor = new NamedSubScopeProcessor() { Name = "Process Layers-Scope" }; 134 134 var layerCreator = new SubScopesCreator() { Name = "Create Layer" }; 135 135 var layerProcessor = new /*Layer*/UniformSubScopesProcessor(); … … 152 152 workingScopeCreator.Successor = layersProcessor; 153 153 154 layersProcessor. Operators.Add(new EmptyOperator());155 layersProcessor.Operator s.Add(layerCreator);154 layersProcessor.TargetScopeParameter.ActualName = "Layers"; 155 layersProcessor.Operator = layerCreator; 156 156 157 157 layerCreator.NumberOfSubScopesParameter.ActualName = "NumberOfLayers"; -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/HeuristicLab.Algorithms.ALPS.SteadyState-3.3.csproj
r12153 r12157 138 138 <Compile Include="AlpsSsGeneticAlgorithmMainOperator.cs" /> 139 139 <Compile Include="AlpsSsMover.cs" /> 140 <Compile Include="NamedSubScopeProcessor.cs" /> 140 141 <Compile Include="NamedSubScopesCreator.cs" /> 141 142 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/ALPS/HeuristicLab.Algorithms.ALPS.SteadyState/3.3/NamedSubScopesCreator.cs
r12153 r12157 51 51 52 52 public override IOperation Apply() { 53 var intermediateParameters = new LayerIntermediateParameter(); 53 54 foreach (string name in NamesParameter.Value) { 54 ExecutionContext.Scope.SubScopes.Add(new Scope(name)); 55 var scope = new Scope(name); 56 ExecutionContext.Scope.SubScopes.Add(scope); 57 intermediateParameters.Add(new ValueParameter<IScope>(name, scope)); 55 58 } 56 return base.Apply(); 59 60 var intermediateContext = new ExecutionContext(ExecutionContext.Parent, intermediateParameters, ExecutionContext.Scope); 61 return Successor != null ? intermediateContext.CreateChildOperation(Successor) : null; 57 62 } 58 63 }
Note: See TracChangeset
for help on using the changeset viewer.