- Timestamp:
- 01/17/11 17:24:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
r5311 r5312 283 283 284 284 public override void Prepare() { 285 if (Problem != null) base.Prepare(); 285 if (Problem != null) { 286 base.Prepare(); 287 if (OmegaUpdater != null && OmegaUpdater.StartValueParameter.Value != null) { 288 this.OmegaParameter.ActualValue = new DoubleValue(OmegaUpdaterParameter.Value.StartValueParameter.Value.Value); 289 } 290 if (VelocityBoundsUpdater != null && VelocityBoundsUpdater.StartValueParameter.Value != null && VelocityBoundsParameter.ActualValue != null) { 291 DoubleMatrix matrix = VelocityBoundsParameter.ActualValue; 292 for (int i = 0; i < matrix.Rows; i++) { 293 for (int j = 0; j < matrix.Columns; j++) { 294 if (matrix[i, j] >= 0) { 295 matrix[i, j] = VelocityBoundsUpdater.StartValueParameter.Value.Value; 296 } else { 297 matrix[i, j] = (-1) * VelocityBoundsUpdater.StartValueParameter.Value.Value; 298 } 299 } 300 } 301 } 302 } 286 303 } 287 304
Note: See TracChangeset
for help on using the changeset viewer.