Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
- Timestamp:
- 03/18/19 17:24:30 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
r13403 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.PluginInfrastructure; 29 30 30 31 namespace HeuristicLab.Encodings.RealVectorEncoding { … … 32 33 [Item("RealVectorParticleUpdater", "Updates a certain particle taking the current position and velocity into account, as well as the best point and the best point in a local neighborhood.")] 33 34 [StorableClass] 34 public abstract class RealVectorParticleUpdater : SingleSuccessorOperator, IRealVectorParticleUpdater { 35 [NonDiscoverableType] 36 [Obsolete("Use SPSO2011ParticleUpdater")] 37 internal abstract class RealVectorParticleUpdater : SingleSuccessorOperator, IRealVectorParticleUpdater { 35 38 36 39 public override bool CanChangeName { … … 62 65 public ILookupParameter<DoubleMatrix> CurrentVelocityBoundsParameter { 63 66 get { return (ILookupParameter<DoubleMatrix>)Parameters["CurrentVelocityBounds"]; } 67 } 68 public ILookupParameter<DoubleValue> CurrentMaxVelocityParameter { 69 get { return (ILookupParameter<DoubleValue>)Parameters["CurrentMaxVelocity"]; } 64 70 } 65 71 public ILookupParameter<DoubleValue> InertiaParameter { … … 126 132 Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem.")); 127 133 Parameters.Add(new LookupParameter<DoubleMatrix>("CurrentVelocityBounds", "Upper and lower bounds for the particle's velocity vector.")); 134 Parameters.Add(new LookupParameter<DoubleValue>("CurrentMaxVelocity", "Maximum for the particle's velocity vector.")); 128 135 Parameters.Add(new LookupParameter<DoubleValue>("CurrentInertia", "The weight for the particle's velocity vector.")); 129 136 Parameters.Add(new LookupParameter<DoubleValue>("PersonalBestAttraction", "The weight for the particle's personal best position.")); … … 131 138 } 132 139 #endregion 140 141 [StorableHook(HookType.AfterDeserialization)] 142 private void AfterDeserialization() { 143 if (!Parameters.ContainsKey("CurrentMaxVelocity")) 144 Parameters.Add(new LookupParameter<DoubleValue>("CurrentMaxVelocity", "Maximum for the particle's velocity vector.")); 145 } 133 146 134 147 protected void MoveParticle(RealVector velocity, RealVector position) {
Note: See TracChangeset
for help on using the changeset viewer.