Changeset 5866 for trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
- Timestamp:
- 03/29/11 15:19:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
r5844 r5866 163 163 Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("InertiaUpdater", "Updates the omega parameter.")); 164 164 Parameters.Add(new ConstrainedValueParameter<ISwarmUpdater>("SwarmUpdater", "Encoding-specific parameter which is provided by the problem. May provide additional encoding-specific parameters, such as velocity bounds for real valued problems")); 165 ParticleUpdaterParameter.Hidden = true; 165 166 166 167 RandomCreator randomCreator = new RandomCreator(); 167 168 VariableCreator variableCreator = new VariableCreator(); 168 Assigner assigner = new Assigner();169 Assigner currentInertiaAssigner = new Assigner(); 169 170 solutionsCreator = new SolutionsCreator(); 170 171 SubScopesCounter subScopesCounter = new SubScopesCounter(); 171 172 Placeholder topologyInitializerPlaceholder = new Placeholder(); 172 Placeholder analyzerPlaceholder = new Placeholder();173 173 mainLoop = new ParticleSwarmOptimizationMainLoop(); 174 174 … … 180 180 181 181 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("CurrentIteration", new IntValue(0))); 182 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentVelocityBounds", new DoubleValue(0))); 183 variableCreator.Successor = assigner; 184 185 assigner.Name = "CurrentInertia := Inertia"; 186 assigner.LeftSideParameter.ActualName = "CurrentInertia"; 187 assigner.RightSideParameter.ActualName = "Inertia"; 188 assigner.Successor = solutionsCreator; 182 variableCreator.Successor = currentInertiaAssigner; 183 184 currentInertiaAssigner.Name = "CurrentInertia := Inertia"; 185 currentInertiaAssigner.LeftSideParameter.ActualName = "CurrentInertia"; 186 currentInertiaAssigner.RightSideParameter.ActualName = "Inertia"; 187 currentInertiaAssigner.Successor = solutionsCreator; 189 188 190 189 solutionsCreator.NumberOfSolutionsParameter.ActualName = "SwarmSize";
Note: See TracChangeset
for help on using the changeset viewer.