Changeset 15091 for trunk/sources
- Timestamp:
- 06/29/17 15:26:16 (7 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
r14185 r15091 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using HeuristicLab.Analysis; … … 179 180 Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "Maximal number of iterations.", new IntValue(1000))); 180 181 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer())); 181 Parameters.Add(new ValueParameter<DoubleValue>("Inertia", "Inertia weight on a particle's movement (omega).", new DoubleValue( 1)));182 Parameters.Add(new ValueParameter<DoubleValue>("PersonalBestAttraction", "Weight for particle's pull towards its personal best soution (phi_p).", new DoubleValue( -0.01)));183 Parameters.Add(new ValueParameter<DoubleValue>("NeighborBestAttraction", "Weight for pull towards the neighborhood best solution or global best solution in case of a totally connected topology (phi_g).", new DoubleValue( 3.7)));182 Parameters.Add(new ValueParameter<DoubleValue>("Inertia", "Inertia weight on a particle's movement (omega).", new DoubleValue(0.9))); 183 Parameters.Add(new ValueParameter<DoubleValue>("PersonalBestAttraction", "Weight for particle's pull towards its personal best soution (phi_p).", new DoubleValue(0.05))); 184 Parameters.Add(new ValueParameter<DoubleValue>("NeighborBestAttraction", "Weight for pull towards the neighborhood best solution or global best solution in case of a totally connected topology (phi_g).", new DoubleValue(0.5))); 184 185 Parameters.Add(new ConstrainedValueParameter<IParticleCreator>("ParticleCreator", "Operator that creates a new particle.")); 185 186 Parameters.Add(new ConstrainedValueParameter<IParticleUpdater>("ParticleUpdater", "Operator that updates a particle.")); … … 262 263 UpdateAnalyzers(); 263 264 ParameterizeAnalyzers(); 265 UpdateParticleUpdaterParameter(); 264 266 UpdateTopologyParameters(); 265 267 InitializeParticleCreator(); … … 280 282 281 283 private void InitializeParticleCreator() { 284 ParticleCreatorParameter.ValidValues.Clear(); 282 285 if (Problem != null) { 283 286 IParticleCreator oldParticleCreator = ParticleCreator; 284 287 IParticleCreator defaultParticleCreator = Problem.Operators.OfType<IParticleCreator>().FirstOrDefault(); 285 ParticleCreatorParameter.ValidValues.Clear(); 286 foreach (IParticleCreator Creator in Problem.Operators.OfType<IParticleCreator>().OrderBy(x => x.Name)) { 287 ParticleCreatorParameter.ValidValues.Add(Creator); 288 foreach (var creator in Problem.Operators.OfType<IParticleCreator>().OrderBy(x => x.Name)) { 289 ParticleCreatorParameter.ValidValues.Add(creator); 288 290 } 289 291 if (oldParticleCreator != null) { 290 IParticleCreator creator = ParticleCreatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleCreator.GetType());292 var creator = ParticleCreatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleCreator.GetType()); 291 293 if (creator != null) ParticleCreator = creator; 292 294 else oldParticleCreator = null; … … 328 330 updater.IndexParameter.ActualName = "Iterations"; 329 331 updater.ValueParameter.ActualName = "CurrentInertia"; 330 updater.StartValueParameter. Value = new DoubleValue(1);331 updater.EndValueParameter.Value = new DoubleValue( 1E-10);332 updater.StartValueParameter.ActualName = InertiaParameter.Name; 333 updater.EndValueParameter.Value = new DoubleValue(0.70); 332 334 } 333 335 } … … 346 348 347 349 private void UpdateTopologyInitializer() { 348 ITopologyInitializer oldTopologyInitializer = TopologyInitializer;350 var oldTopologyInitializer = TopologyInitializer; 349 351 TopologyInitializerParameter.ValidValues.Clear(); 350 352 foreach (ITopologyInitializer topologyInitializer in ApplicationManager.Manager.GetInstances<ITopologyInitializer>().OrderBy(x => x.Name)) { 351 353 TopologyInitializerParameter.ValidValues.Add(topologyInitializer); 352 354 } 355 353 356 if (oldTopologyInitializer != null && TopologyInitializerParameter.ValidValues.Any(x => x.GetType() == oldTopologyInitializer.GetType())) 354 357 TopologyInitializer = TopologyInitializerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTopologyInitializer.GetType()); … … 357 360 358 361 private void ParameterizeTopologyUpdaters() { 359 foreach (var updater in TopologyUpdaterParameter.ValidValues) { 360 var multiPsoUpdater = updater as MultiPSOTopologyUpdater; 361 if (multiPsoUpdater != null) { 362 multiPsoUpdater.CurrentIterationParameter.ActualName = "Iterations"; 363 } 364 } 365 } 366 367 private void UpdateTopologyParameters() { 368 ITopologyUpdater oldTopologyUpdater = TopologyUpdater; 369 IParticleUpdater oldParticleUpdater = ParticleUpdater; 370 ClearTopologyParameters(); 371 if (Problem != null) { 372 IParticleUpdater defaultParticleUpdater = null; 373 if (TopologyInitializer != null) { 374 foreach (ITopologyUpdater topologyUpdater in ApplicationManager.Manager.GetInstances<ITopologyUpdater>()) 375 TopologyUpdaterParameter.ValidValues.Add(topologyUpdater); 376 defaultParticleUpdater = Problem.Operators.OfType<ILocalParticleUpdater>().FirstOrDefault(); 377 foreach (IParticleUpdater particleUpdater in Problem.Operators.OfType<ILocalParticleUpdater>().OrderBy(x => x.Name)) 378 ParticleUpdaterParameter.ValidValues.Add(particleUpdater); 379 } else { 380 defaultParticleUpdater = Problem.Operators.OfType<IGlobalParticleUpdater>().FirstOrDefault(); 381 foreach (IParticleUpdater particleUpdater in Problem.Operators.OfType<IGlobalParticleUpdater>().OrderBy(x => x.Name)) 382 ParticleUpdaterParameter.ValidValues.Add(particleUpdater); 383 } 384 if (oldTopologyUpdater != null) { 385 ITopologyUpdater newTopologyUpdater = TopologyUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleUpdater.GetType()); 386 if (newTopologyUpdater != null) TopologyUpdater = newTopologyUpdater; 387 } 362 foreach (var updater in TopologyUpdaterParameter.ValidValues.OfType<MultiPSOTopologyUpdater>()) { 363 updater.CurrentIterationParameter.ActualName = "Iterations"; 364 } 365 } 366 367 private void UpdateParticleUpdaterParameter() { 368 var oldParticleUpdater = ParticleUpdater; 369 ParticleUpdaterParameter.ValidValues.Clear(); 370 if (Problem != null) { 371 var defaultParticleUpdater = Problem.Operators.OfType<IParticleUpdater>().FirstOrDefault(); 372 373 foreach (var particleUpdater in Problem.Operators.OfType<IParticleUpdater>().OrderBy(x => x.Name)) 374 ParticleUpdaterParameter.ValidValues.Add(particleUpdater); 375 388 376 if (oldParticleUpdater != null) { 389 IParticleUpdater newParticleUpdater = ParticleUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleUpdater.GetType());377 var newParticleUpdater = ParticleUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldParticleUpdater.GetType()); 390 378 if (newParticleUpdater != null) ParticleUpdater = newParticleUpdater; 391 379 else oldParticleUpdater = null; … … 393 381 if (oldParticleUpdater == null && defaultParticleUpdater != null) 394 382 ParticleUpdater = defaultParticleUpdater; 395 396 ParameterizeTopologyUpdaters(); 397 } 398 } 399 400 private void ClearTopologyParameters() { 383 } 384 } 385 386 private void UpdateTopologyParameters() { 387 ITopologyUpdater oldTopologyUpdater = TopologyUpdater; 401 388 TopologyUpdaterParameter.ValidValues.Clear(); 402 ParticleUpdaterParameter.ValidValues.Clear(); 389 if (Problem != null) { 390 if (TopologyInitializerParameter.Value != null) { 391 foreach (ITopologyUpdater topologyUpdater in ApplicationManager.Manager.GetInstances<ITopologyUpdater>()) 392 TopologyUpdaterParameter.ValidValues.Add(topologyUpdater); 393 394 if (oldTopologyUpdater != null) { 395 ITopologyUpdater newTopologyUpdater = TopologyUpdaterParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldTopologyUpdater.GetType()); 396 if (newTopologyUpdater != null) TopologyUpdater = newTopologyUpdater; 397 } 398 ParameterizeTopologyUpdaters(); 399 } 400 } 403 401 } 404 402 -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RandomTopologyInitializer.cs
r14185 r15091 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 31 32 [Item("Random Topology Initializer", "Randomly connectes every particle with k other particles.")] 32 33 [StorableClass] 33 public sealed class RandomTopologyInitializer : TopologyInitializer {34 public sealed class RandomTopologyInitializer : TopologyInitializer, IStochasticOperator { 34 35 #region Parameters 35 36 public ILookupParameter<IRandom> RandomParameter { … … 40 41 } 41 42 #endregion 42 43 #region Parameter Values 44 private IRandom Random { 45 get { return RandomParameter.ActualValue; } 46 } 47 private int NrOfConnections { 48 get { return NrOfConnectionsParameter.ActualValue.Value; } 49 } 50 #endregion 51 43 52 44 #region Construction & Cloning 53 45 [StorableConstructor] … … 65 57 66 58 public override IOperation Apply() { 67 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(SwarmSize); 68 for (int i = 0; i < SwarmSize; i++) { 69 var numbers = Enumerable.Range(0, SwarmSize).ToList(); 59 var random = RandomParameter.ActualValue; 60 var swarmSize = SwarmSizeParameter.ActualValue.Value; 61 var nrOfConnections = NrOfConnectionsParameter.ActualValue.Value; 62 63 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(swarmSize); 64 for (int i = 0; i < swarmSize; i++) { 65 var numbers = Enumerable.Range(0, swarmSize).ToList(); 70 66 numbers.RemoveAt(i); 71 var selectedNumbers = new List<int>( NrOfConnections);72 for (int j = 0; j < NrOfConnections && numbers.Count > 0; j++) {73 int index = Random.Next(numbers.Count);67 var selectedNumbers = new List<int>(nrOfConnections); 68 for (int j = 0; j < nrOfConnections && numbers.Count > 0; j++) { 69 int index = random.Next(numbers.Count); 74 70 selectedNumbers.Add(numbers[index]); 75 71 numbers.RemoveAt(index); … … 77 73 neighbors[i] = new IntArray(selectedNumbers.ToArray()); 78 74 } 79 Neighbors = neighbors;75 NeighborsParameter.ActualValue = neighbors; 80 76 return base.Apply(); 81 77 } -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/RingTopologyInitializer.cs
r14185 r15091 43 43 44 44 public override IOperation Apply() { 45 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(SwarmSize); 46 for (int i = 0; i < SwarmSize; i++) { 47 neighbors[i] = new IntArray(new[] { (SwarmSize + i - 1) % SwarmSize, (i + 1) % SwarmSize }); 45 var swarmSize = SwarmSizeParameter.ActualValue.Value; 46 47 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(swarmSize); 48 for (int i = 0; i < swarmSize; i++) { 49 neighbors[i] = new IntArray(new[] { (swarmSize + i - 1) % swarmSize, (i + 1) % swarmSize }); 48 50 } 49 Neighbors = neighbors;51 NeighborsParameter.ActualValue = neighbors; 50 52 return base.Apply(); 51 53 } -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/TopologyInitializer.cs
r14185 r15091 40 40 get { return (IScopeTreeLookupParameter<IntArray>)Parameters["Neighbors"]; } 41 41 } 42 43 42 public ILookupParameter<IntValue> SwarmSizeParameter { 44 43 get { return (ILookupParameter<IntValue>)Parameters["SwarmSize"]; } 45 }46 47 #endregion48 49 #region Parameter Values50 protected ItemArray<IntArray> Neighbors {51 get { return NeighborsParameter.ActualValue; }52 set { NeighborsParameter.ActualValue = value; }53 }54 protected int SwarmSize {55 get { return SwarmSizeParameter.ActualValue.Value; }56 44 } 57 45 #endregion -
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/VonNeumannTopologyInitializer.cs
r14185 r15091 44 44 45 45 public override IOperation Apply() { 46 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(SwarmSize); 47 for (int i = 0; i < SwarmSize; i++) { 46 var swarmSize = SwarmSizeParameter.ActualValue.Value; 47 48 ItemArray<IntArray> neighbors = new ItemArray<IntArray>(swarmSize); 49 for (int i = 0; i < swarmSize; i++) { 48 50 neighbors[i] = new IntArray(new[] { 49 ( SwarmSize + i-2) % SwarmSize,50 ( SwarmSize + i-1) % SwarmSize,51 (i+1) % SwarmSize,52 (i+2) % SwarmSize51 (swarmSize + i-2) % swarmSize, 52 (swarmSize + i-1) % swarmSize, 53 (i+1) % swarmSize, 54 (i+2) % swarmSize 53 55 }); 54 56 } 55 Neighbors = neighbors;57 NeighborsParameter.ActualValue = neighbors; 56 58 return base.Apply(); 57 59 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj
r15067 r15091 132 132 <Compile Include="ParticleOperators\RealVectorSwarmUpdater.cs" /> 133 133 <Compile Include="ParticleOperators\RealVectorTotallyConnectedParticleUpdater.cs" /> 134 <Compile Include="ParticleOperators\RealVectorVelocityInitializer.cs" /> 134 135 <Compile Include="Plugin.cs" /> 135 136 <Compile Include="RealVectorCreator.cs" /> -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorParticleCreator.cs
r14185 r15091 26 26 namespace HeuristicLab.Encodings.RealVectorEncoding { 27 27 public interface IRealVectorParticleCreator : IParticleCreator, IRealVectorOperator { 28 ILookupParameter<IntValue> ProblemSizeParameter { get; }29 28 ILookupParameter<RealVector> RealVectorParameter { get; } 30 29 ILookupParameter<RealVector> PersonalBestParameter { get; } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorParticleUpdater.cs
r14185 r15091 27 27 public interface IRealVectorParticleUpdater : IParticleUpdater, IRealVectorOperator { 28 28 ILookupParameter<RealVector> VelocityParameter { get; } 29 ILookupParameter<Double Matrix> CurrentVelocityBoundsParameter { get; }29 ILookupParameter<DoubleValue> CurrentMaxVelocityParameter { get; } 30 30 ILookupParameter<RealVector> RealVectorParameter { get; } 31 31 ILookupParameter<DoubleMatrix> BoundsParameter { get; } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorNeighborhoodParticleUpdater.cs
r14185 r15091 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Optimization;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 25 … … 28 27 [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 28 [StorableClass] 30 public sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater , ILocalParticleUpdater{29 public sealed class RealVectorNeighborhoodParticleUpdater : RealVectorParticleUpdater { 31 30 32 31 #region Construction & Cloning … … 41 40 42 41 public override IOperation Apply() { 43 double inertia = Inertia.Value; 44 double personalBestAttraction = PersonalBestAttraction.Value; 45 double neighborBestAttraction = NeighborBestAttraction.Value; 46 47 RealVector velocity = new RealVector(Velocity.Length); 48 RealVector position = new RealVector(RealVector.Length); 49 double r_p = Random.NextDouble(); 50 double r_g = Random.NextDouble(); 51 52 for (int i = 0; i < velocity.Length; i++) { 53 velocity[i] = 54 Velocity[i] * inertia + 55 (PersonalBest[i] - RealVector[i]) * personalBestAttraction * r_p + 56 (BestPoint[i] - RealVector[i]) * neighborBestAttraction * r_g; 57 } 58 59 MoveParticle(velocity, position); 42 UpdateVelocity(); 43 UpdatePosition(); 60 44 61 45 return base.Apply(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleCreator.cs
r14185 r15091 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Operators; 26 using HeuristicLab.Optimization; 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 30 31 [Item("RealVectorParticleCreator", "Creates a particle with position, zero velocity vector and personal best.")] 31 32 [StorableClass] 32 public class RealVectorParticleCreator : AlgorithmOperator, IRealVectorParticleCreator {33 public class RealVectorParticleCreator : AlgorithmOperator, IRealVectorParticleCreator, IStochasticOperator { 33 34 34 35 #region Parameters 35 public ILookupParameter<I ntValue> ProblemSizeParameter {36 get { return (ILookupParameter<I ntValue>)Parameters["ProblemSize"]; }36 public ILookupParameter<IRandom> RandomParameter { 37 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 37 38 } 38 39 public IValueLookupParameter<DoubleMatrix> BoundsParameter { … … 48 49 get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; } 49 50 } 50 #endregion 51 52 #region Parameter Values 53 protected int ProblemSize { 54 get { return ProblemSizeParameter.ActualValue.Value; } 55 } 56 protected RealVector Velocity { 57 set { VelocityParameter.ActualValue = value; } 51 public ILookupParameter<ISolutionCreator> SolutionCreatorParameter { 52 get { return (ILookupParameter<ISolutionCreator>)Parameters["SolutionCreator"]; } 58 53 } 59 54 #endregion 60 55 61 56 #region Construction & Cloning 62 57 [StorableConstructor] … … 65 60 public RealVectorParticleCreator() 66 61 : base() { 67 Parameters.Add(new LookupParameter<I ntValue>("ProblemSize", "The dimension of the problem."));62 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use.")); 68 63 Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension.")); 69 64 Parameters.Add(new LookupParameter<RealVector>("RealVector", "Particle's current solution")); 70 65 Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution.")); 71 66 Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity.")); 67 Parameters.Add(new LookupParameter<ISolutionCreator>("SolutionCreator", "The operator that creates the initial position.")); 72 68 73 UniformRandomRealVectorCreator realVectorCreater = new UniformRandomRealVectorCreator();69 Placeholder realVectorCreater = new Placeholder(); 74 70 Assigner personalBestPositionAssigner = new Assigner(); 71 RealVectorVelocityInitializer velocityInitializer = new RealVectorVelocityInitializer(); 75 72 76 73 OperatorGraph.InitialOperator = realVectorCreater; 77 74 78 realVectorCreater.RealVectorParameter.ActualName = RealVectorParameter.Name; 79 realVectorCreater.LengthParameter.ActualName = ProblemSizeParameter.Name; 80 realVectorCreater.BoundsParameter.ActualName = BoundsParameter.Name; 75 realVectorCreater.OperatorParameter.ActualName = SolutionCreatorParameter.Name; 81 76 realVectorCreater.Successor = personalBestPositionAssigner; 82 77 83 78 personalBestPositionAssigner.LeftSideParameter.ActualName = PersonalBestParameter.Name; 84 79 personalBestPositionAssigner.RightSideParameter.ActualName = RealVectorParameter.Name; 85 personalBestPositionAssigner.Successor = null; 80 personalBestPositionAssigner.Successor = velocityInitializer; 81 82 velocityInitializer.BoundsParameter.ActualName = BoundsParameter.Name; 83 velocityInitializer.RandomParameter.ActualName = RandomParameter.Name; 84 velocityInitializer.RealVectorParameter.ActualName = RealVectorParameter.Name; 85 velocityInitializer.VelocityParameter.ActualName = VelocityParameter.Name; 86 velocityInitializer.Successor = null; 86 87 } 87 88 public override IDeepCloneable Clone(Cloner cloner) { … … 89 90 } 90 91 #endregion 91 92 public override IOperation Apply() {93 Velocity = new RealVector(ProblemSize);94 return base.Apply();95 }96 97 98 92 } 99 93 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs
r14185 r15091 51 51 get { return (ILookupParameter<RealVector>)Parameters["NeighborBest"]; } 52 52 } 53 public LookupParameter<RealVector> BestRealVectorParameter {54 get { return (LookupParameter<RealVector>)Parameters["BestRealVector"]; }55 }56 53 public ILookupParameter<RealVector> RealVectorParameter { 57 54 get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; } … … 60 57 get { return (ILookupParameter<DoubleMatrix>)Parameters["Bounds"]; } 61 58 } 62 public ILookupParameter<Double Matrix> CurrentVelocityBoundsParameter {63 get { return (ILookupParameter<Double Matrix>)Parameters["CurrentVelocityBounds"]; }59 public ILookupParameter<DoubleValue> CurrentMaxVelocityParameter { 60 get { return (ILookupParameter<DoubleValue>)Parameters["CurrentMaxVelocity"]; } 64 61 } 65 62 public ILookupParameter<DoubleValue> InertiaParameter { … … 73 70 } 74 71 #endregion 75 76 #region Parameter Values 77 protected IRandom Random { 78 get { return RandomParameter.ActualValue; } 79 } 80 protected RealVector Velocity { 81 get { return VelocityParameter.ActualValue; } 82 set { VelocityParameter.ActualValue = value; } 83 } 84 protected RealVector PersonalBest { 85 get { return PersonalBestParameter.ActualValue; } 86 } 87 protected RealVector BestPoint { 88 get { return BestRealVectorParameter.ActualValue; } 89 } 90 protected RealVector RealVector { 91 get { return RealVectorParameter.ActualValue; } 92 set { RealVectorParameter.ActualValue = value; } 93 } 94 protected RealVector NeighborBest { 95 get { return NeighborBestParameter.ActualValue; } 96 } 97 protected DoubleMatrix Bounds { 98 get { return BoundsParameter.ActualValue; } 99 } 100 protected DoubleMatrix CurrentVelocityBounds { 101 get { return CurrentVelocityBoundsParameter.ActualValue; } 102 } 103 protected DoubleValue Inertia { 104 get { return InertiaParameter.ActualValue; } 105 } 106 protected DoubleValue PersonalBestAttraction { 107 get { return PersonalBestAttractionParameter.ActualValue; } 108 } 109 protected DoubleValue NeighborBestAttraction { 110 get { return NeighborBestAttractionParameter.ActualValue; } 111 } 112 #endregion 113 72 114 73 #region Construction & Cloning 115 74 [StorableConstructor] … … 122 81 Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity.")); 123 82 Parameters.Add(new LookupParameter<RealVector>("PersonalBest", "Particle's personal best solution.")); 124 Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best position."));125 83 Parameters.Add(new LookupParameter<RealVector>("NeighborBest", "Best neighboring solution.")); 126 84 Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem.")); 127 Parameters.Add(new LookupParameter<Double Matrix>("CurrentVelocityBounds", "Upper and lower boundsfor the particle's velocity vector."));85 Parameters.Add(new LookupParameter<DoubleValue>("CurrentMaxVelocity", "Maximum for the particle's velocity vector.")); 128 86 Parameters.Add(new LookupParameter<DoubleValue>("CurrentInertia", "The weight for the particle's velocity vector.")); 129 87 Parameters.Add(new LookupParameter<DoubleValue>("PersonalBestAttraction", "The weight for the particle's personal best position.")); … … 132 90 #endregion 133 91 134 protected void MoveParticle(RealVector velocity, RealVector position) { 135 BoundsChecker.Apply(velocity, CurrentVelocityBounds); 92 protected void UpdateVelocity() { 93 var velocity = VelocityParameter.ActualValue; 94 var position = RealVectorParameter.ActualValue; 95 var inertia = InertiaParameter.ActualValue.Value; 96 var personalBest = PersonalBestParameter.ActualValue; 97 var personalBestAttraction = PersonalBestAttractionParameter.ActualValue.Value; 98 var neighborBest = NeighborBestParameter.ActualValue; 99 var neighborBestAttraction = NeighborBestAttractionParameter.ActualValue.Value; 100 101 var random = RandomParameter.ActualValue; 102 136 103 for (int i = 0; i < velocity.Length; i++) { 137 position[i] = RealVector[i] + velocity[i]; 104 double r_p = random.NextDouble(); 105 double r_g = random.NextDouble(); 106 velocity[i] = 107 velocity[i] * inertia + 108 (personalBest[i] - position[i]) * personalBestAttraction * r_p + 109 (neighborBest[i] - position[i]) * neighborBestAttraction * r_g; 138 110 } 111 112 var maxVelocity = CurrentMaxVelocityParameter.ActualValue.Value; 113 var speed = Math.Sqrt(velocity.DotProduct(velocity)); 114 if (speed > maxVelocity) { 115 for (var i = 0; i < velocity.Length; i++) { 116 velocity[i] *= maxVelocity / speed; 117 } 118 } 119 } 120 121 protected void UpdatePosition() { 122 var velocity = VelocityParameter.ActualValue; 123 var position = RealVectorParameter.ActualValue; 124 125 for (int i = 0; i < velocity.Length; i++) { 126 position[i] += velocity[i]; 127 } 128 129 var bounds = BoundsParameter.ActualValue; 139 130 for (int i = 0; i < position.Length; i++) { 140 double min = Bounds[i % Bounds.Rows, 0];141 double max = Bounds[i % Bounds.Rows, 1];131 double min = bounds[i % bounds.Rows, 0]; 132 double max = bounds[i % bounds.Rows, 1]; 142 133 if (position[i] < min) { 143 int reflectionCount = (int)Math.Truncate((min - position[i]) / (max - min)) + 1; 144 double reflection = (min - position[i]) % (max - min); 145 if (IsOdd(reflectionCount)) { 146 position[i] = min + reflection; 147 velocity[i] = -velocity[i]; 148 149 } else { 150 position[i] = max - reflection; 151 } 134 position[i] = min; 135 velocity[i] = -0.5 * velocity[i]; // SPSO 2011 152 136 } 153 137 if (position[i] > max) { 154 int reflectionCount = (int)Math.Truncate((position[i] - max) / (max - min)) + 1; 155 double reflection = (position[i] - max) % (max - min); 156 if (IsOdd(reflectionCount)) { 157 position[i] = max - reflection; 158 velocity[i] = -velocity[i]; 159 } else { 160 position[i] = min + reflection; 161 } 138 position[i] = max; 139 velocity[i] = -0.5 * velocity[i]; // SPSO 2011 162 140 } 163 141 } 164 165 RealVector = position;166 Velocity = velocity;167 }168 169 private static bool IsOdd(int number) {170 return number % 2 == 1;171 142 } 172 143 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
r15071 r15091 76 76 get { return (IScopeTreeLookupParameter<IntArray>)Parameters["Neighbors"]; } 77 77 } 78 public IValueLookupParameter<Double Matrix> VelocityBoundsParameter {79 get { return (ValueLookupParameter<Double Matrix>)Parameters["VelocityBounds"]; }80 } 81 public ILookupParameter<Double Matrix> CurrentVelocityBoundsParameter {82 get { return (ILookupParameter<Double Matrix>)Parameters["CurrentVelocityBounds"]; }78 public IValueLookupParameter<DoubleValue> MaxVelocityParameter { 79 get { return (ValueLookupParameter<DoubleValue>)Parameters["MaxVelocity"]; } 80 } 81 public ILookupParameter<DoubleValue> CurrentMaxVelocityParameter { 82 get { return (ILookupParameter<DoubleValue>)Parameters["CurrentMaxVelocity"]; } 83 83 } 84 84 public LookupParameter<ResultCollection> ResultsParameter { … … 86 86 } 87 87 88 #region Velocity Bounds Updating 89 public ILookupParameter<DoubleValue> VelocityBoundsScaleParameter { 90 get { return (ILookupParameter<DoubleValue>)Parameters["VelocityBoundsScale"]; } 91 } 92 public IConstrainedValueParameter<IDiscreteDoubleValueModifier> VelocityBoundsScalingOperatorParameter { 93 get { return (IConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["VelocityBoundsScalingOperator"]; } 94 } 95 public IValueLookupParameter<DoubleValue> VelocityBoundsStartValueParameter { 96 get { return (IValueLookupParameter<DoubleValue>)Parameters["VelocityBoundsStartValue"]; } 97 } 98 public IValueLookupParameter<DoubleValue> VelocityBoundsEndValueParameter { 99 get { return (IValueLookupParameter<DoubleValue>)Parameters["VelocityBoundsEndValue"]; } 100 } 101 public ILookupParameter<IntValue> VelocityBoundsIndexParameter { 102 get { return (ILookupParameter<IntValue>)Parameters["VelocityBoundsIndex"]; } 103 } 104 public IValueLookupParameter<IntValue> VelocityBoundsStartIndexParameter { 105 get { return (IValueLookupParameter<IntValue>)Parameters["VelocityBoundsStartIndex"]; } 106 } 107 public IValueLookupParameter<IntValue> VelocityBoundsEndIndexParameter { 108 get { return (IValueLookupParameter<IntValue>)Parameters["VelocityBoundsEndIndex"]; } 88 #region Max Velocity Updating 89 public IConstrainedValueParameter<IDiscreteDoubleValueModifier> MaxVelocityScalingOperatorParameter { 90 get { return (IConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["MaxVelocityScalingOperator"]; } 91 } 92 public IValueLookupParameter<DoubleValue> FinalMaxVelocityParameter { 93 get { return (IValueLookupParameter<DoubleValue>)Parameters["FinalMaxVelocity"]; } 94 } 95 public ILookupParameter<IntValue> MaxVelocityIndexParameter { 96 get { return (ILookupParameter<IntValue>)Parameters["MaxVelocityIndex"]; } 97 } 98 public IValueLookupParameter<IntValue> MaxVelocityStartIndexParameter { 99 get { return (IValueLookupParameter<IntValue>)Parameters["MaxVelocityStartIndex"]; } 100 } 101 public IValueLookupParameter<IntValue> MaxVelocityEndIndexParameter { 102 get { return (IValueLookupParameter<IntValue>)Parameters["MaxVelocityEndIndex"]; } 109 103 } 110 104 #endregion … … 132 126 Parameters.Add(new ScopeTreeLookupParameter<IntArray>("Neighbors", "The list of neighbors for each particle.")); 133 127 Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false.")); 134 Parameters.Add(new ValueLookupParameter<Double Matrix>("VelocityBounds", "Maximum velocity for each dimension.", new DoubleMatrix(new double[,] { { -1, 1 } })));135 Parameters.Add(new LookupParameter<Double Matrix>("CurrentVelocityBounds", "Current value of velocity bounds."));128 Parameters.Add(new ValueLookupParameter<DoubleValue>("MaxVelocity", "Speed limit for each particle.", new DoubleValue(1))); 129 Parameters.Add(new LookupParameter<DoubleValue>("CurrentMaxVelocity", "Current value of the speed limit.")); 136 130 Parameters.Add(new LookupParameter<ResultCollection>("Results", "Results")); 137 131 138 132 #region Velocity Bounds Updating 139 Parameters.Add(new LookupParameter<DoubleValue>("VelocityBoundsScale", "Scale parameter.")); 140 Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("VelocityBoundsScalingOperator", "Modifies the value")); 141 Parameters.Add(new ValueLookupParameter<DoubleValue>("VelocityBoundsStartValue", "The start value of 'Value'.", new DoubleValue(1))); 142 Parameters.Add(new ValueLookupParameter<DoubleValue>("VelocityBoundsEndValue", "The end value of 'Value'.", new DoubleValue(1E-10))); 143 Parameters.Add(new LookupParameter<IntValue>("VelocityBoundsIndex", "The current index.", "Iterations")); 144 Parameters.Add(new ValueLookupParameter<IntValue>("VelocityBoundsStartIndex", "The start index at which to start modifying 'Value'.", new IntValue(0))); 145 Parameters.Add(new ValueLookupParameter<IntValue>("VelocityBoundsEndIndex", "The end index by which 'Value' should have reached 'EndValue'.", "MaxIterations")); 146 VelocityBoundsStartIndexParameter.Hidden = true; 147 VelocityBoundsEndIndexParameter.Hidden = true; 133 Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("MaxVelocityScalingOperator", "Modifies the value")); 134 Parameters.Add(new ValueLookupParameter<DoubleValue>("FinalMaxVelocity", "The value of maximum velocity if PSO has reached maximum iterations.", new DoubleValue(1E-10))); 135 Parameters.Add(new LookupParameter<IntValue>("MaxVelocityIndex", "The current index.", "Iterations")); 136 Parameters.Add(new ValueLookupParameter<IntValue>("MaxVelocityStartIndex", "The start index at which to start modifying 'Value'.", new IntValue(0))); 137 Parameters.Add(new ValueLookupParameter<IntValue>("MaxVelocityEndIndex", "The end index by which 'Value' should have reached 'EndValue'.", "MaxIterations")); 138 MaxVelocityStartIndexParameter.Hidden = true; 139 MaxVelocityEndIndexParameter.Hidden = true; 148 140 #endregion 149 141 150 142 Initialize(); 151 RegisterEvents();152 143 } 153 144 … … 167 158 Parameters.Remove("BestQuality"); 168 159 } 169 RegisterEvents(); 170 } 171 172 private void RegisterEvents() { 173 VelocityBoundsStartValueParameter.ValueChanged += new EventHandler(VelocityBoundsStartValueParameter_ValueChanged); 174 VelocityBoundsStartValueParameter.Value.ValueChanged += new EventHandler(VelocityBoundsStartValueParameter_Value_ValueChanged); 175 } 176 177 void VelocityBoundsStartValueParameter_Value_ValueChanged(object sender, EventArgs e) { 178 UpdateVelocityBoundsParamater(); 179 } 180 181 void UpdateVelocityBoundsParamater() { 182 if (VelocityBoundsParameter.Value == null) { 183 VelocityBoundsParameter.Value = new DoubleMatrix(1, 2); 184 } else if (VelocityBoundsParameter.Value.Columns != 2) { 185 VelocityBoundsParameter.Value = new DoubleMatrix(VelocityBoundsParameter.Value.Rows, 2); 186 } 187 if (VelocityBoundsStartValueParameter.Value != null) { 188 DoubleMatrix matrix = VelocityBoundsParameter.Value; 189 for (int i = 0; i < matrix.Rows; i++) { 190 matrix[i, 0] = (-1) * VelocityBoundsStartValueParameter.Value.Value; 191 matrix[i, 1] = VelocityBoundsStartValueParameter.Value.Value; 192 } 193 } 194 } 195 196 void VelocityBoundsStartValueParameter_ValueChanged(object sender, EventArgs e) { 197 if (VelocityBoundsStartValueParameter.Value != null) { 198 VelocityBoundsStartValueParameter.Value.ValueChanged += new EventHandler(VelocityBoundsStartValueParameter_Value_ValueChanged); 199 } 200 UpdateVelocityBoundsParamater(); 201 } 202 160 } 203 161 private void Initialize() { 204 162 ResultsCollector = new ResultsCollector(); 205 ResultsCollector.CollectedValues.Add(Current VelocityBoundsParameter);206 ResultsCollector.CollectedValues.Add( VelocityBoundsParameter);163 ResultsCollector.CollectedValues.Add(CurrentMaxVelocityParameter); 164 ResultsCollector.CollectedValues.Add(MaxVelocityParameter); 207 165 208 166 foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>()) { 209 VelocityBoundsScalingOperatorParameter.ValidValues.Add(op);210 op.ValueParameter.ActualName = VelocityBoundsScaleParameter.Name;211 op.StartValueParameter.ActualName = VelocityBoundsStartValueParameter.Name;212 op.EndValueParameter.ActualName = VelocityBoundsEndValueParameter.Name;213 op.IndexParameter.ActualName = VelocityBoundsIndexParameter.Name;214 op.StartIndexParameter.ActualName = VelocityBoundsStartIndexParameter.Name;215 op.EndIndexParameter.ActualName = VelocityBoundsEndIndexParameter.Name;216 } 217 VelocityBoundsScalingOperatorParameter.Value = null;167 MaxVelocityScalingOperatorParameter.ValidValues.Add(op); 168 op.ValueParameter.ActualName = CurrentMaxVelocityParameter.Name; 169 op.StartValueParameter.ActualName = MaxVelocityParameter.Name; 170 op.EndValueParameter.ActualName = FinalMaxVelocityParameter.Name; 171 op.IndexParameter.ActualName = MaxVelocityIndexParameter.Name; 172 op.StartIndexParameter.ActualName = MaxVelocityStartIndexParameter.Name; 173 op.EndIndexParameter.ActualName = MaxVelocityEndIndexParameter.Name; 174 } 175 MaxVelocityScalingOperatorParameter.Value = null; 218 176 } 219 177 220 178 public override IOperation Apply() { 221 179 var max = MaximizationParameter.ActualValue.Value; 180 // Update of the personal bests 222 181 var points = RealVectorParameter.ActualValue; 223 182 var qualities = QualityParameter.ActualValue; 224 183 var particles = points.Select((p, i) => new { Particle = p, Index = i }) 225 184 .Zip(qualities, (p, q) => Tuple.Create(p.Index, p.Particle, q.Value)).ToList(); 226 UpdateGlobalBest(max, particles); 185 UpdatePersonalBest(max, particles); 186 187 // SPSO: update of the neighbor bests from the personal bests 188 var personalBestPoints = PersonalBestParameter.ActualValue; 189 var personalBestQualities = PersonalBestQualityParameter.ActualValue; 190 particles = personalBestPoints.Select((p, i) => new { Particle = p, Index = i }) 191 .Zip(personalBestQualities, (p, q) => Tuple.Create(p.Index, p.Particle, q.Value)).ToList(); 227 192 UpdateNeighborBest(max, particles); 228 UpdatePersonalBest(max, particles); 229 return UpdateVelocityBounds(); 230 } 231 232 private void UpdateGlobalBest(bool maximization, IList<Tuple<int, RealVector, double>> particles) { 233 var best = maximization ? particles.MaxItems(x => x.Item3).First() : particles.MinItems(x => x.Item3).First(); 234 var bestQuality = SwarmBestQualityParameter.ActualValue; 235 if (bestQuality == null) { 236 SwarmBestQualityParameter.ActualValue = new DoubleValue(best.Item3); 237 } else bestQuality.Value = best.Item3; 238 BestRealVectorParameter.ActualValue = (RealVector)best.Item2.Clone(); 193 194 var next = new OperationCollection() { base.Apply() }; 195 next.Insert(0, ExecutionContext.CreateChildOperation(ResultsCollector)); 196 if (MaxVelocityScalingOperatorParameter.Value != null) { 197 next.Insert(0, ExecutionContext.CreateChildOperation(MaxVelocityScalingOperatorParameter.Value)); 198 } else CurrentMaxVelocityParameter.ActualValue = new DoubleValue(MaxVelocityParameter.ActualValue.Value); 199 return next; 239 200 } 240 201 … … 253 214 NeighborBestParameter.ActualValue = neighborBest; 254 215 NeighborBestQualityParameter.ActualValue = neighborBestQuality; 216 } else { 217 // Neighbor best = Global best 218 var best = maximization ? particles.MaxItems(x => x.Item3).First() : particles.MinItems(x => x.Item3).First(); 219 NeighborBestParameter.ActualValue = new ItemArray<RealVector>(particles.Select(x => best.Item2)); 220 NeighborBestQualityParameter.ActualValue = new ItemArray<DoubleValue>(particles.Select(x => new DoubleValue(best.Item3))); 255 221 } 256 222 } … … 268 234 !maximization && p.Item3 < personalBestQuality[p.Item1].Value) { 269 235 personalBestQuality[p.Item1].Value = p.Item3; 270 personalBest[p.Item1] = p.Item2;236 personalBest[p.Item1] = (RealVector)p.Item2.Clone(); 271 237 } 272 238 } 273 239 PersonalBestParameter.ActualValue = personalBest; 274 }275 276 private IOperation UpdateVelocityBounds() {277 var currentVelocityBounds = CurrentVelocityBoundsParameter.ActualValue;278 279 if (currentVelocityBounds == null) {280 currentVelocityBounds = (DoubleMatrix)VelocityBoundsParameter.ActualValue.Clone();281 CurrentVelocityBoundsParameter.ActualValue = currentVelocityBounds;282 }283 if (VelocityBoundsScalingOperatorParameter.Value == null)284 return new OperationCollection() {285 ExecutionContext.CreateChildOperation(ResultsCollector),286 base.Apply()287 };288 289 var velocityBoundsScale = VelocityBoundsScaleParameter.ActualValue;290 var velocityBoundsStartValue = VelocityBoundsStartValueParameter.ActualValue;291 292 if (velocityBoundsScale == null && velocityBoundsStartValue != null) {293 velocityBoundsScale = new DoubleValue(velocityBoundsStartValue.Value);294 VelocityBoundsScaleParameter.ActualValue = velocityBoundsScale;295 }296 for (int i = 0; i < currentVelocityBounds.Rows; i++) {297 for (int j = 0; j < currentVelocityBounds.Columns; j++) {298 if (currentVelocityBounds[i, j] >= 0) {299 currentVelocityBounds[i, j] = velocityBoundsScale.Value;300 } else {301 currentVelocityBounds[i, j] = (-1) * velocityBoundsScale.Value;302 }303 }304 }305 306 return new OperationCollection() {307 ExecutionContext.CreateChildOperation(ResultsCollector),308 ExecutionContext.CreateChildOperation(VelocityBoundsScalingOperatorParameter.Value),309 base.Apply()310 };311 240 } 312 241 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorTotallyConnectedParticleUpdater.cs
r14185 r15091 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.PluginInfrastructure; 26 28 27 29 namespace HeuristicLab.Encodings.RealVectorEncoding { 28 30 [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 31 [StorableClass] 30 public sealed class RealVectorTotallyConnectedParticleUpdater : RealVectorParticleUpdater, IGlobalParticleUpdater { 32 [NonDiscoverableType] 33 [Obsolete("Same as the RealVectorNeighborhoodParticleUpdate")] 34 internal sealed class RealVectorTotallyConnectedParticleUpdater : RealVectorParticleUpdater { 31 35 32 36 #region Construction & Cloning … … 41 45 42 46 public override IOperation Apply() { 43 double inertia = Inertia.Value; 44 double personalBestAttraction = PersonalBestAttraction.Value; 45 double neighborBestAttraction = NeighborBestAttraction.Value; 46 47 RealVector velocity = new RealVector(Velocity.Length); 48 RealVector position = new RealVector(RealVector.Length); 49 double r_p = Random.NextDouble(); 50 double r_g = Random.NextDouble(); 51 52 for (int i = 0; i < velocity.Length; i++) { 53 velocity[i] = 54 Velocity[i] * inertia + 55 (PersonalBest[i] - RealVector[i]) * personalBestAttraction * r_p + 56 (BestPoint[i] - RealVector[i]) * neighborBestAttraction * r_g; 57 } 58 59 MoveParticle(velocity, position); 47 UpdateVelocity(); 48 UpdatePosition(); 60 49 61 50 return base.Apply(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs
r14185 r15091 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 77 78 } 78 79 80 public double DotProduct(RealVector other) { 81 if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length."); 82 var dotProd = 0.0; 83 for (var i = 0; i < Length; i++) 84 dotProd += this[i] * other[i]; 85 return dotProd; 86 } 79 87 } 80 88 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEncoding.cs
r14185 r15091 280 280 particleCreator.RealVectorParameter.ActualName = Name; 281 281 particleCreator.BoundsParameter.ActualName = BoundsParameter.Name; 282 particleCreator.ProblemSizeParameter.ActualName = LengthParameter.Name;283 282 } 284 283 } -
trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r15080 r15091 191 191 <Compile Include="Interfaces\IDiscreteDoubleMatrixModifier.cs" /> 192 192 <Compile Include="Algorithms\HeuristicOptimizationEngineAlgorithm.cs" /> 193 <Compile Include="Interfaces\IGlobalParticleUpdater.cs" />194 193 <Compile Include="Interfaces\ILocalImprovementOperator.cs" /> 195 <Compile Include="Interfaces\ILocalParticleUpdater.cs" />196 194 <Compile Include="Algorithms\HeuristicOptimizationAlgorithm.cs" /> 197 195 <Compile Include="Interfaces\IMultiNeighborhoodShakingOperator.cs" /> -
trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IParticleCreator.cs
r14185 r15091 27 27 /// </summary> 28 28 public interface IParticleCreator : ISolutionCreator { 29 ILookupParameter<ISolutionCreator> SolutionCreatorParameter { get; } 29 30 } 30 31 } -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs
r15069 r15091 359 359 op.BoundsParameter.ActualName = BoundsParameter.Name; 360 360 op.BoundsParameter.Hidden = true; 361 op.ProblemSizeParameter.ActualName = ProblemSizeParameter.Name;362 op.ProblemSizeParameter.Hidden = true;363 361 } 364 362 foreach (var op in Operators.OfType<IRealVectorParticleUpdater>()) {
Note: See TracChangeset
for help on using the changeset viewer.