Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/25/15 23:24:01 (9 years ago)
Author:
abeham
Message:

#2521:

  • Adapted single-objective test function problem to new problem infrastructure
  • Added additional interfaces to RealVectorEncoding
  • Fixed IParticleUpdater interface (must implement IStochasticOperator if it contains a Random parameter)
Location:
branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3
Files:
3 added
19 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj

    r11961 r13403  
    115115  <ItemGroup>
    116116    <Compile Include="Creators\NormalDistributedRealVectorCreator.cs" />
     117    <Compile Include="Interfaces\IRealVectorAdditiveMoveQualityOperator.cs" />
     118    <Compile Include="Interfaces\IRealVectorBoundedOperator.cs" />
    117119    <Compile Include="Interfaces\IRealVectorMultiNeighborhoodShakingOperator.cs" />
     120    <Compile Include="Interfaces\IRealVectorSolutionsOperator.cs" />
     121    <Compile Include="Interfaces\IRealVectorSolutionOperator.cs" />
    118122    <Compile Include="ParticleOperators\RealVectorParticleCreator.cs" />
    119123    <Compile Include="Crossovers\BlendAlphaBetaCrossover.cs" />
     
    157161    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterManipulator.cs" />
    158162    <Compile Include="Interfaces\IRealVectorStdDevStrategyParameterOperator.cs" />
    159     <Compile Include="Interfaces\IAdditiveRealVectorMoveOperator.cs" />
     163    <Compile Include="Interfaces\IRealVectorAdditiveMoveOperator.cs" />
    160164    <Compile Include="Interfaces\IRealVectorBoundsChecker.cs" />
    161165    <Compile Include="Interfaces\IRealVectorMoveGenerator.cs" />
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorAdditiveMoveOperator.cs

    r13402 r13403  
    2323
    2424namespace HeuristicLab.Encodings.RealVectorEncoding {
    25   public interface IAdditiveRealVectorMoveOperator : IRealVectorMoveOperator {
     25  public interface IRealVectorAdditiveMoveOperator : IRealVectorMoveOperator {
    2626    ILookupParameter<AdditiveMove> AdditiveMoveParameter { get; }
    2727  }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorAdditiveMoveQualityOperator.cs

    r13393 r13403  
    2121
    2222using HeuristicLab.Core;
     23using HeuristicLab.Data;
    2324
    2425namespace HeuristicLab.Encodings.RealVectorEncoding {
    25   public interface IAdditiveRealVectorMoveOperator : IRealVectorMoveOperator {
    26     ILookupParameter<AdditiveMove> AdditiveMoveParameter { get; }
     26  public interface IRealVectorAdditiveMoveQualityOperator : IRealVectorAdditiveMoveOperator {
     27    ILookupParameter<DoubleValue> MoveQualityParameter { get; }
    2728  }
    2829}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCreator.cs

    r13361 r13403  
    2828  /// An interface which represents an operator for creating vectors of real-valued data.
    2929  /// </summary>
    30   public interface IRealVectorCreator : IRealVectorOperator, ISolutionCreator<RealVector> {
     30  public interface IRealVectorCreator : IRealVectorSolutionOperator, IRealVectorBoundedOperator, ISolutionCreator<RealVector> {
    3131    IValueLookupParameter<IntValue> LengthParameter { get; }
    32     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    33     ILookupParameter<RealVector> RealVectorParameter { get; }
    3432  }
    3533}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCrossover.cs

    r12012 r13403  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2423using HeuristicLab.Optimization;
    2524
     
    2827  /// An interface which represents an operator for crossing vectors of real-valued data.
    2928  /// </summary>
    30   public interface IRealVectorCrossover : IRealVectorOperator, ICrossover {
     29  public interface IRealVectorCrossover : IRealVectorBoundedOperator, ICrossover {
    3130    ILookupParameter<ItemArray<RealVector>> ParentsParameter { get; }
    3231    ILookupParameter<RealVector> ChildParameter { get; }
    33     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    3432  }
    3533}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorManipulator.cs

    r12012 r13403  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2422using HeuristicLab.Optimization;
    2523
     
    2826  /// An interface which represents an operator for manipulating vectors of real-valued data.
    2927  /// </summary>
    30   public interface IRealVectorManipulator : IRealVectorOperator, IManipulator {
    31     ILookupParameter<RealVector> RealVectorParameter { get; }
    32     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
     28  public interface IRealVectorManipulator : IRealVectorSolutionOperator, IRealVectorBoundedOperator, IManipulator {
    3329  }
    3430}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveGenerator.cs

    r12012 r13403  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2422using HeuristicLab.Optimization;
    2523
    2624namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorMoveGenerator : IRealVectorMoveOperator, IMoveGenerator {
    28     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
     25  public interface IRealVectorMoveGenerator : IRealVectorMoveOperator, IRealVectorBoundedOperator, IMoveGenerator {
    2926  }
    3027}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveOperator.cs

    r12012 r13403  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    2322using HeuristicLab.Optimization;
    2423
    2524namespace HeuristicLab.Encodings.RealVectorEncoding {
    26   public interface IRealVectorMoveOperator : IRealVectorOperator, IMoveOperator {
    27     ILookupParameter<RealVector> RealVectorParameter { get; }
     25  public interface IRealVectorMoveOperator : IRealVectorSolutionOperator, IMoveOperator {
    2826  }
    2927}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMultiNeighborhoodShakingOperator.cs

    r12012 r13403  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2422
    2523namespace HeuristicLab.Encodings.RealVectorEncoding {
    26   public interface IRealVectorMultiNeighborhoodShakingOperator : IRealVectorOperator {
    27     ILookupParameter<RealVector> RealVectorParameter { get; }
    28     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
     24  public interface IRealVectorMultiNeighborhoodShakingOperator : IRealVectorSolutionOperator, IRealVectorBoundedOperator {
    2925  }
    3026}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorParticleCreator.cs

    r12012 r13403  
    2020#endregion
    2121
    22 using HeuristicLab.Optimization;
    2322using HeuristicLab.Core;
    2423using HeuristicLab.Data;
     24using HeuristicLab.Optimization;
    2525
    2626namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorParticleCreator : IParticleCreator, IRealVectorOperator {
     27  public interface IRealVectorParticleCreator : IParticleCreator, IRealVectorSolutionOperator, IRealVectorBoundedOperator {
    2828    ILookupParameter<IntValue> ProblemSizeParameter { get; }
    29     ILookupParameter<RealVector> RealVectorParameter { get; }
    3029    ILookupParameter<RealVector> PersonalBestParameter { get; }
    31     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    3230    ILookupParameter<RealVector> VelocityParameter { get; }
    3331  }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorParticleUpdater.cs

    r12012 r13403  
    2525
    2626namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorParticleUpdater : IParticleUpdater, IRealVectorOperator {
     27  public interface IRealVectorParticleUpdater : IParticleUpdater, IRealVectorSolutionOperator, IRealVectorBoundedOperator {
    2828    ILookupParameter<RealVector> VelocityParameter { get; }
    2929    ILookupParameter<DoubleMatrix> CurrentVelocityBoundsParameter { get; }
    30     ILookupParameter<RealVector> RealVectorParameter { get; }
    31     ILookupParameter<DoubleMatrix> BoundsParameter { get; }
    3230    ILookupParameter<RealVector> PersonalBestParameter { get; }
    3331    ILookupParameter<RealVector> NeighborBestParameter { get; }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCreator.cs

    r12012 r13403  
    2525
    2626namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorStdDevStrategyParameterCreator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterCreator {
     27  public interface IRealVectorStdDevStrategyParameterCreator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterCreator, IRealVectorBoundedOperator {
    2828    ILookupParameter<RealVector> StrategyParameterParameter { get; }
    2929    IValueLookupParameter<IntValue> LengthParameter { get; }
    30     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    3130  }
    3231}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterManipulator.cs

    r12012 r13403  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2423using HeuristicLab.Optimization;
    2524
    2625namespace HeuristicLab.Encodings.RealVectorEncoding {
    27   public interface IRealVectorStdDevStrategyParameterManipulator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterManipulator {
     26  public interface IRealVectorStdDevStrategyParameterManipulator : IRealVectorStdDevStrategyParameterOperator, IStrategyParameterManipulator, IRealVectorBoundedOperator {
    2827    ILookupParameter<RealVector> StrategyParameterParameter { get; }
    29     IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
    3028  }
    3129}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorSwarmUpdater.cs

    r12012 r13403  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Optimization; 
     23using HeuristicLab.Optimization;
    2424
    2525namespace HeuristicLab.Encodings.RealVectorEncoding {
    26   public interface IRealVectorSwarmUpdater : ISwarmUpdater, IRealVectorOperator {
     26  public interface IRealVectorSwarmUpdater : ISwarmUpdater, IRealVectorSolutionsOperator {
    2727    IScopeTreeLookupParameter<RealVector> NeighborBestParameter { get; }
    2828    IScopeTreeLookupParameter<RealVector> PersonalBestParameter { get; }
    29     IScopeTreeLookupParameter<RealVector> RealVectorParameter { get; }
    3029  }
    3130}
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveGenerator.cs

    r12012 r13403  
    3131  [Item("AdditiveMoveGenerator", "Base class for all additive move generators.")]
    3232  [StorableClass]
    33   public abstract class AdditiveMoveGenerator : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, IMoveGenerator, IStochasticOperator {
     33  public abstract class AdditiveMoveGenerator : SingleSuccessorOperator, IRealVectorAdditiveMoveOperator, IMoveGenerator, IStochasticOperator {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    4343    public ILookupParameter<AdditiveMove> AdditiveMoveParameter {
    4444      get { return (LookupParameter<AdditiveMove>)Parameters["AdditiveMove"]; }
    45     }
    46     protected ScopeParameter CurrentScopeParameter {
    47       get { return (ScopeParameter)Parameters["CurrentScope"]; }
    4845    }
    4946    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
     
    5956      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector for which moves should be generated."));
    6057      Parameters.Add(new LookupParameter<AdditiveMove>("AdditiveMove", "The moves that should be generated in subscopes."));
    61       Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    6258      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled."));
    6359    }
     
    7268        moveScopes[i].Variables.Add(new Variable(AdditiveMoveParameter.ActualName, moves[i]));
    7369      }
    74       CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
     70      ExecutionContext.Scope.SubScopes.AddRange(moveScopes);
    7571      return base.Apply();
    7672    }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveMaker.cs

    r12012 r13403  
    3131  [Item("AdditiveMoveMaker", "Peforms an additive move on a given real vector and updates the quality.")]
    3232  [StorableClass]
    33   public class AdditiveMoveMaker : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, IMoveMaker, ISingleObjectiveOperator {
     33  public class AdditiveMoveMaker : SingleSuccessorOperator, IRealVectorAdditiveMoveQualityOperator, IMoveMaker, ISingleObjectiveOperator {
    3434    public override bool CanChangeName {
    3535      get { return false; }
     
    6363    }
    6464
     65    public static void Apply(RealVector realVector, AdditiveMove move) {
     66      realVector[move.Dimension] += move.MoveDistance;
     67    }
     68
    6569    public override IOperation Apply() {
    66       AdditiveMove move = AdditiveMoveParameter.ActualValue;
    67       RealVector realVector = RealVectorParameter.ActualValue;
    68       DoubleValue moveQuality = MoveQualityParameter.ActualValue;
    69       DoubleValue quality = QualityParameter.ActualValue;
     70      Apply(RealVectorParameter.ActualValue, AdditiveMoveParameter.ActualValue);
     71      var moveQuality = MoveQualityParameter.ActualValue;
     72      var quality = QualityParameter.ActualValue;
    7073
    71       realVector[move.Dimension] += move.MoveDistance;
    7274      quality.Value = moveQuality.Value;
    7375
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuChecker.cs

    r12012 r13403  
    3232  [Item("AdditiveMoveTabuChecker", "Prevents falling back into ranges that have been moved over before.")]
    3333  [StorableClass]
    34   public class AdditiveMoveTabuChecker : SingleSuccessorOperator, IAdditiveRealVectorMoveOperator, ITabuChecker {
     34  public class AdditiveMoveTabuChecker : SingleSuccessorOperator, IRealVectorAdditiveMoveQualityOperator, ITabuChecker {
    3535    public override bool CanChangeName {
    3636      get { return false; }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuMaker.cs

    r12012 r13403  
    2929  [Item("AdditiveMoveTabuMaker", "Sets the move tabu.")]
    3030  [StorableClass]
    31   public class AdditiveMoveTabuMaker : TabuMaker, IAdditiveRealVectorMoveOperator {
     31  public class AdditiveMoveTabuMaker : TabuMaker, IRealVectorAdditiveMoveQualityOperator {
    3232    public ILookupParameter<AdditiveMove> AdditiveMoveParameter {
    3333      get { return (ILookupParameter<AdditiveMove>)Parameters["AdditiveMove"]; }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorParticleUpdater.cs

    r12012 r13403  
    5757      get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
    5858    }
    59     public ILookupParameter<DoubleMatrix> BoundsParameter {
    60       get { return (ILookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
     59    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
     60      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
    6161    }
    6262    public ILookupParameter<DoubleMatrix> CurrentVelocityBoundsParameter {
     
    124124      Parameters.Add(new LookupParameter<RealVector>("BestRealVector", "Global best position."));
    125125      Parameters.Add(new LookupParameter<RealVector>("NeighborBest", "Best neighboring solution."));
    126       Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem."));
     126      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem."));
    127127      Parameters.Add(new LookupParameter<DoubleMatrix>("CurrentVelocityBounds", "Upper and lower bounds for the particle's velocity vector."));
    128128      Parameters.Add(new LookupParameter<DoubleValue>("CurrentInertia", "The weight for the particle's velocity vector."));
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs

    r12012 r13403  
    5454      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["NeighborBestQuality"]; }
    5555    }
    56     public IScopeTreeLookupParameter<RealVector> RealVectorParameter {
    57       get { return (IScopeTreeLookupParameter<RealVector>)Parameters["RealVector"]; }
     56    public IScopeTreeLookupParameter<RealVector> RealVectorsParameter {
     57      get { return (IScopeTreeLookupParameter<RealVector>)Parameters["RealVectors"]; }
    5858    }
    5959    public IScopeTreeLookupParameter<RealVector> PersonalBestParameter {
     
    131131      set { NeighborBestQualityParameter.ActualValue = value; }
    132132    }
    133     private ItemArray<RealVector> RealVector {
    134       get { return RealVectorParameter.ActualValue; }
     133    private ItemArray<RealVector> RealVectors {
     134      get { return RealVectorsParameter.ActualValue; }
    135135    }
    136136    private ItemArray<RealVector> PersonalBest {
     
    186186      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("PersonalBestQuality", "Particles' personal best qualities."));
    187187      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("NeighborBestQuality", "Best neighbor particles' qualities."));
    188       Parameters.Add(new ScopeTreeLookupParameter<RealVector>("RealVector", "Particles' positions."));
     188      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("RealVectors", "Particles' positions."));
    189189      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("PersonalBest", "Particles' personal best positions."));
    190190      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("NeighborBest", "Neighborhood (or global in case of totally connected neighborhood) best particle positions."));
     
    288288        SwarmBestQuality = new DoubleValue();
    289289      SwarmBestQuality.Value = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value);
    290       BestRealVector = (RealVector)RealVector[Quality.FindIndex(v => v.Value == SwarmBestQuality.Value)].Clone();
     290      BestRealVector = (RealVector)RealVectors[Quality.FindIndex(v => v.Value == SwarmBestQuality.Value)].Clone();
    291291    }
    292292
     
    296296        var neighborBestQuality = new ItemArray<DoubleValue>(Neighbors.Length);
    297297        for (int n = 0; n < Neighbors.Length; n++) {
    298           var pairs = Quality.Zip(RealVector, (q, p) => new { Quality = q, Point = p })
     298          var pairs = Quality.Zip(RealVectors, (q, p) => new { Quality = q, Point = p })
    299299            .Where((p, i) => i == n || Neighbors[n].Contains(i));
    300300          var bestNeighbor = Maximization ?
     
    312312      if (PersonalBestQuality.Length == 0)
    313313        PersonalBestQuality = (ItemArray<DoubleValue>)Quality.Clone();
    314       for (int i = 0; i < RealVector.Length; i++) {
     314      for (int i = 0; i < RealVectors.Length; i++) {
    315315        if (Maximization && Quality[i].Value > PersonalBestQuality[i].Value ||
    316316          !Maximization && Quality[i].Value < PersonalBestQuality[i].Value) {
    317317          PersonalBestQuality[i].Value = Quality[i].Value;
    318           PersonalBest[i] = RealVector[i];
     318          PersonalBest[i] = RealVectors[i];
    319319        }
    320320      }
  • branches/ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEncoding.cs

    r13396 r13403  
    171171          typeof (IRealVectorBoundsChecker),
    172172          typeof (IRealVectorMoveOperator),
    173           typeof (IRealVectorMoveGenerator)
     173          typeof (IRealVectorMoveGenerator),
     174          typeof (IRealVectorSolutionOperator),
     175          typeof (IRealVectorSolutionsOperator),
     176          typeof (IRealVectorBoundedOperator)
    174177      };
    175178    }
     
    209212      ConfigureMoveGenerators(operators.OfType<IRealVectorMoveGenerator>());
    210213      ConfigureMoveOperators(operators.OfType<IRealVectorMoveOperator>());
    211       ConfigureAdditiveMoveOperator(operators.OfType<IAdditiveRealVectorMoveOperator>());
     214      ConfigureAdditiveMoveOperator(operators.OfType<IRealVectorAdditiveMoveOperator>());
     215      ConfigureRealVectorSolutionOperators(operators.OfType<IRealVectorSolutionOperator>());
     216      ConfigureRealVectorSolutionsOperators(operators.OfType<IRealVectorSolutionsOperator>());
     217      ConfigureRealVectorBoundedOperators(operators.OfType<IRealVectorBoundedOperator>());
    212218    }
    213219
     
    215221    private void ConfigureCreators(IEnumerable<IRealVectorCreator> creators) {
    216222      foreach (var creator in creators) {
    217         creator.RealVectorParameter.ActualName = Name;
    218223        creator.LengthParameter.ActualName = LengthParameter.Name;
    219         creator.BoundsParameter.ActualName = BoundsParameter.Name;
    220224      }
    221225    }
     
    224228        crossover.ChildParameter.ActualName = Name;
    225229        crossover.ParentsParameter.ActualName = Name;
    226         crossover.BoundsParameter.ActualName = BoundsParameter.Name;
    227230      }
    228231    }
    229232    private void ConfigureManipulators(IEnumerable<IRealVectorManipulator> manipulators) {
    230233      foreach (var manipulator in manipulators) {
    231         manipulator.RealVectorParameter.ActualName = Name;
    232         manipulator.BoundsParameter.ActualName = BoundsParameter.Name;
    233         manipulator.BoundsParameter.Hidden = true;
    234234        var sm = manipulator as ISelfAdaptiveManipulator;
    235235        if (sm != null) {
     
    272272    }
    273273    private void ConfigureSwarmUpdaters(IEnumerable<IRealVectorSwarmUpdater> swarmUpdaters) {
    274       foreach (var su in swarmUpdaters) {
    275         su.RealVectorParameter.ActualName = Name;
    276       }
     274      // swarm updaters don't have additional parameters besides the solution parameter
    277275    }
    278276    private void ConfigureParticleCreators(IEnumerable<IRealVectorParticleCreator> particleCreators) {
    279277      foreach (var particleCreator in particleCreators) {
    280         particleCreator.RealVectorParameter.ActualName = Name;
    281         particleCreator.BoundsParameter.ActualName = BoundsParameter.Name;
    282278        particleCreator.ProblemSizeParameter.ActualName = LengthParameter.Name;
    283279      }
    284280    }
    285281    private void ConfigureParticleUpdaters(IEnumerable<IRealVectorParticleUpdater> particleUpdaters) {
    286       foreach (var particleUpdater in particleUpdaters) {
    287         particleUpdater.RealVectorParameter.ActualName = Name;
    288         particleUpdater.BoundsParameter.ActualName = BoundsParameter.Name;
    289       }
     282      // particle updaters don't have additional parameters besides solution and bounds parameter
    290283    }
    291284    private void ConfigureShakingOperators(IEnumerable<IRealVectorMultiNeighborhoodShakingOperator> shakingOperators) {
    292       foreach (var shakingOperator in shakingOperators) {
    293         shakingOperator.RealVectorParameter.ActualName = Name;
    294         shakingOperator.BoundsParameter.ActualName = BoundsParameter.Name;
    295       }
     285      // shaking operators don't have additional parameters besides solution and bounds parameter
    296286    }
    297287    private void ConfigureBoundsCheckers(IEnumerable<IRealVectorBoundsChecker> boundsCheckers) {
     
    302292    }
    303293    private void ConfigureMoveOperators(IEnumerable<IRealVectorMoveOperator> moveOperators) {
    304       foreach (var moveOperator in moveOperators)
    305         moveOperator.RealVectorParameter.ActualName = Name;
    306     }
    307 
     294      // move operators don't have additional parameters besides the solution parameter
     295    }
    308296    private void ConfigureMoveGenerators(IEnumerable<IRealVectorMoveGenerator> moveGenerators) {
    309       foreach (var moveGenerator in moveGenerators)
    310         moveGenerator.BoundsParameter.ActualName = BoundsParameter.Name;
    311     }
    312 
    313     private void ConfigureAdditiveMoveOperator(IEnumerable<IAdditiveRealVectorMoveOperator> additiveMoveOperators) {
     297      // move generators don't have additional parameters besides solution and bounds parameter
     298    }
     299    private void ConfigureAdditiveMoveOperator(IEnumerable<IRealVectorAdditiveMoveOperator> additiveMoveOperators) {
    314300      foreach (var additiveMoveOperator in additiveMoveOperators) {
    315301        additiveMoveOperator.AdditiveMoveParameter.ActualName = Name + ".AdditiveMove";
     302      }
     303    }
     304    private void ConfigureRealVectorSolutionOperators(IEnumerable<IRealVectorSolutionOperator> solutionOperators) {
     305      foreach (var solutionOperator in solutionOperators)
     306        solutionOperator.RealVectorParameter.ActualName = Name;
     307    }
     308    private void ConfigureRealVectorSolutionsOperators(IEnumerable<IRealVectorSolutionsOperator> solutionsOperators) {
     309      foreach (var solutionsOperator in solutionsOperators)
     310        solutionsOperator.RealVectorsParameter.ActualName = Name;
     311    }
     312    private void ConfigureRealVectorBoundedOperators(IEnumerable<IRealVectorBoundedOperator> boundedOperators) {
     313      foreach (var boundedOperator in boundedOperators) {
     314        boundedOperator.BoundsParameter.ActualName = BoundsParameter.Name;
    316315      }
    317316    }
Note: See TracChangeset for help on using the changeset viewer.