Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

Location:
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs

    r3816 r4068  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Data;
    2829using HeuristicLab.Encodings.RealVectorEncoding;
     30using HeuristicLab.Operators;
    2931using HeuristicLab.Optimization;
    30 using HeuristicLab.Operators;
    3132using HeuristicLab.Optimization.Operators;
    3233using HeuristicLab.Parameters;
    3334using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    34 using HeuristicLab.PluginInfrastructure;
    3535using HeuristicLab.Random;
    36 using HeuristicLab.Analysis;
    3736
    3837namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
     
    5756      set { AnalyzerParameter.Value = value; }
    5857    }
    59     #endregion 
     58    #endregion
    6059
    6160    #region Parameter Properties
     
    131130      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
    132131      randomCreator.SetSeedRandomlyParameter.Value = null;
    133      
     132
    134133      solutionsCreator.NumberOfSolutionsParameter.ActualName = SwarmSizeParameter.Name;
    135      
     134
    136135      encoder.OperatorParameter.ActualName = "Encoder";
    137      
     136
    138137      velocityVectorCreator.BoundsParameter.ActualName = "ZeroBounds";
    139138      velocityVectorCreator.RealVectorParameter.ActualName = "Velocity";
     
    210209      UpdateEncoders();
    211210      UpdateAnalyzers();
    212       ParameterizeAnalyzers(); 
     211      ParameterizeAnalyzers();
    213212      bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
    214213      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs

    r3742 r4068  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     23using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2625using HeuristicLab.Operators;
    27 using HeuristicLab.Common;
    28 using HeuristicLab.Core;
     26using HeuristicLab.Optimization;
     27using HeuristicLab.Optimization.Operators;
     28using HeuristicLab.Parameters;
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using HeuristicLab.Parameters;
    31 using HeuristicLab.Data;
    32 using HeuristicLab.Analysis;
    33 using HeuristicLab.Optimization.Operators;
    34 using HeuristicLab.Encodings.RealVectorEncoding;
    35 using HeuristicLab.Optimization;
    3630
    3731namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
     
    7064
    7165    [Storable]
    72     private ParticleUpdater velocityUpdater; 
     66    private ParticleUpdater velocityUpdater;
    7367
    7468    [StorableConstructor]
     
    9892      IntCounter intCounter = new IntCounter();
    9993      ConditionalBranch conditionalBranch = new ConditionalBranch();
    100       velocityUpdater = new ParticleUpdater(); 
     94      velocityUpdater = new ParticleUpdater();
    10195      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
    10296      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
    10397      Placeholder encPlaceholder = new Placeholder();
    104       Placeholder decPlaceholder = new Placeholder(); 
     98      Placeholder decPlaceholder = new Placeholder();
    10599      Placeholder evaluator = new Placeholder();
    106100      Comparator comparator = new Comparator();
     
    134128
    135129      encPlaceholder.OperatorParameter.ActualName = EncoderParameter.ActualName;
    136       decPlaceholder.OperatorParameter.ActualName = DecoderParameter.ActualName; 
     130      decPlaceholder.OperatorParameter.ActualName = DecoderParameter.ActualName;
    137131
    138132      evaluator.Name = "Evaluator (placeholder)";
     
    159153      swarmUpdater.Successor = null;
    160154      intCounter.Successor = resultsCollector1;
    161       resultsCollector1.Successor = analyzer1; 
     155      resultsCollector1.Successor = analyzer1;
    162156      analyzer1.Successor = comparator;
    163157      #endregion
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
     22using HeuristicLab.Core;
     23using HeuristicLab.Data;
     24using HeuristicLab.Encodings.RealVectorEncoding;
    2625using HeuristicLab.Operators;
    2726using HeuristicLab.Parameters;
    28 using HeuristicLab.Encodings.RealVectorEncoding;
    29 using HeuristicLab.Data;
    30 using HeuristicLab.Core;
    3127
    3228namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
     
    7268      double alpha = ((IRandom)RandomParameter.ActualValue).NextDouble();
    7369      double beta = ((IRandom)RandomParameter.ActualValue).NextDouble();
    74       RealVector velocity = (RealVector) VelocityParameter.ActualValue;
     70      RealVector velocity = (RealVector)VelocityParameter.ActualValue;
    7571      for (int i = 0; i < velocity.Length; i++) {
    7672        velocity[i] = velocity[i] + alpha * (BestLocalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]) + beta * (BestGlobalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]);
     
    7975      for (int i = 0; i < CurrentPositionParameter.ActualValue.Length; i++) {
    8076        CurrentPositionParameter.ActualValue[i] = CurrentPositionParameter.ActualValue[i] + VelocityParameter.ActualValue[i];
    81         if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0,0]) {
    82           CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0]; 
    83         } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0,1]) {
    84           CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1]; 
     77        if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0, 0]) {
     78          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0];
     79        } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0, 1]) {
     80          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1];
    8581        }
    8682      }
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Operators;
    27 using HeuristicLab.Common;
    2822using HeuristicLab.Core;
    2923using HeuristicLab.Data;
    30 using HeuristicLab.Parameters;
    3124using HeuristicLab.Encodings.PermutationEncoding;
    3225using HeuristicLab.Encodings.RealVectorEncoding;
    33 using HeuristicLab.Collections;
     26using HeuristicLab.Operators;
    3427using HeuristicLab.Optimization;
     28using HeuristicLab.Parameters;
    3529
    3630namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
     
    5852    }
    5953
    60     public PermutationToRealVectorEncoder() : base() {
     54    public PermutationToRealVectorEncoder()
     55      : base() {
    6156      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation to encode."));
    6257      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting real vector."));
     
    7267      for (int i = 0; i < permutation.Length; i++) {
    7368        realVector[permutation[i]] = max;
    74         max = max - 1; 
     69        max = max - 1;
    7570      }
    7671      RealVectorParameter.ActualValue = realVector;
    77       LengthParameter.ActualValue = new IntValue(realVector.Length); 
     72      LengthParameter.ActualValue = new IntValue(realVector.Length);
    7873      return base.Apply();
    7974    }
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs

    r3742 r4068  
    2020#endregion
    2121
    22 using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.Operators;
    2722using HeuristicLab.Core;
    2823using HeuristicLab.Data;
    2924using HeuristicLab.Encodings.RealVectorEncoding;
     25using HeuristicLab.Operators;
    3026using HeuristicLab.Parameters;
    3127
     
    7874        if (CurrentQualityParameter.ActualValue.Value > LocalBestQualityParameter.ActualValue.Value) {
    7975          LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
    80           BestLocalParameter.ActualValue = (RealVector) CurrentPositionParameter.ActualValue.Clone();
     76          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
    8177        }
    8278        if (CurrentQualityParameter.ActualValue.Value > GlobalBestQualityParameter.ActualValue.Value) {
Note: See TracChangeset for help on using the changeset viewer.