- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 7 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Encodings.RealVectorEncoding
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorNeighborhoodParticleUpdater.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Encodings.RealVectorEncoding { 28 29 [Item("Neighborhood Particle Updater", "Updates the particle's position using (among other things) the best neighbor's position. Point = Point + Velocity*Inertia + (PersonalBestPoint-Point)*Phi_P*r_p + (BestNeighborPoint-Point)*Phi_G*r_g.")] 29 30 [StorableClass] 30 public sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater, ILocalParticleUpdater { 31 [NonDiscoverableType] 32 [Obsolete("Use SPSO2011ParticleUpdater")] 33 internal sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater { 31 34 32 35 #region Construction & Cloning -
branches/Async/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleCreator.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; 25 26 using HeuristicLab.Operators; 27 using HeuristicLab.Optimization; 26 28 using HeuristicLab.Parameters; 27 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.PluginInfrastructure; 28 31 29 32 namespace HeuristicLab.Encodings.RealVectorEncoding { 30 33 [Item("RealVectorParticleCreator", "Creates a particle with position, zero velocity vector and personal best.")] 31 34 [StorableClass] 32 public class RealVectorParticleCreator : AlgorithmOperator, IRealVectorParticleCreator { 35 [NonDiscoverableType] 36 [Obsolete("Use SPSOParticleCreator")] 37 internal class RealVectorParticleCreator : AlgorithmOperator, IRealVectorParticleCreator { 33 38 34 39 #region Parameters … … 47 52 public ILookupParameter<RealVector> VelocityParameter { 48 53 get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; } 54 } 55 public ILookupParameter<ISolutionCreator> SolutionCreatorParameter { 56 get { return (ILookupParameter<ISolutionCreator>)Parameters["SolutionCreator"]; } 49 57 } 50 58 #endregion … … 70 78 Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution.")); 71 79 Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity.")); 80 Parameters.Add(new LookupParameter<ISolutionCreator>("SolutionCreator", "The operator that creates the initial position.")); 72 81 73 82 UniformRandomRealVectorCreator realVectorCreater = new UniformRandomRealVectorCreator(); … … 94 103 return base.Apply(); 95 104 } 96 97 105 106 [StorableHook(HookType.AfterDeserialization)] 107 private void AfterDeserialization() { 108 if (!Parameters.ContainsKey("SolutionCreator")) 109 Parameters.Add(new LookupParameter<ISolutionCreator>("SolutionCreator", "The operator that creates the initial position.")); 110 } 98 111 } 99 112 } -
branches/Async/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 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 LookupParameter<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) { -
branches/Async/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 35 35 [Item("RealVectorSwarmUpdater", "Updates personal best point and quality as well as global best point and quality.")] 36 36 [StorableClass] 37 public sealed class RealVectorSwarmUpdater : SingleSuccessorOperator, IRealVectorSwarmUpdater, ISingleObjectiveOperator { 37 [NonDiscoverableType] 38 [Obsolete("Use SPSOSwarmUpdater")] 39 internal sealed class RealVectorSwarmUpdater : SingleSuccessorOperator, IRealVectorSwarmUpdater, ISingleObjectiveOperator { 38 40 39 41 [Storable] -
branches/Async/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.PluginInfrastructure; 26 27 27 28 namespace HeuristicLab.Encodings.RealVectorEncoding { 28 29 [Item("Totally Connected Particle Updater", "Updates the particle's position using (among other things) the global best position. Use together with the empty topology initialzer. Point = Point + Velocity*Inertia + (PersonalBestPoint-Point)*Phi_P*r_p + (BestPoint-Point)*Phi_G*r_g")] 29 30 [StorableClass] 30 public sealed class RealVectorTotallyConnectedParticleUpdater : RealVectorParticleUpdater, IGlobalParticleUpdater { 31 [NonDiscoverableType] 32 [Obsolete("Use SPSO2011ParticleUpdater")] 33 internal sealed class RealVectorTotallyConnectedParticleUpdater : RealVectorParticleUpdater { 31 34 32 35 #region Construction & Cloning
Note: See TracChangeset
for help on using the changeset viewer.