Changeset 3358


Ignore:
Timestamp:
04/15/10 18:12:23 (11 years ago)
Author:
mkofler
Message:

Worked on particle swarm optimization algorithm #852 (WIP)

Location:
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3
Files:
1 added
2 edited

Legend:

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

    r3348 r3358  
    143143      foreach (IRealVectorEncoder encoder in Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name)) {
    144144        EncoderParameter.ValidValues.Add(encoder);
    145         //encoder.RealVectorParameter.ActualName
     145        encoder.RealVectorParameter.ActualName = "Position";
    146146      }
    147147      if (oldEncoder != null) {
  • trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs

    r3348 r3358  
    2323      get { return (ValueLookupParameter<IOperator>)Parameters["Encoder"]; }
    2424    }
     25    public ValueLookupParameter<IOperator> EvaluatorParameter {
     26      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
     27    }
    2528    #endregion
    2629
     
    3639      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
    3740      Parameters.Add(new ValueLookupParameter<IOperator>("Encoder", "The encoding operator that maps a solution to a position vector."));
     41      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions."));
    3842      #endregion
    3943
     
    4347      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
    4448      Placeholder encoder = new Placeholder();
     49      Placeholder evaluator = new Placeholder();
    4550
    4651      encoder.Name = "Encoder (placeholder)";
    4752      encoder.OperatorParameter.ActualName = EncoderParameter.Name;
     53
     54      evaluator.Name = "Evaluator (placeholder)";
     55      evaluator.OperatorParameter.ActualName = EvaluatorParameter.Name;
    4856      #endregion
    4957
     
    5260      variableCreator.Successor = uniformSubScopesProcessor;
    5361      uniformSubScopesProcessor.Operator = encoder;
    54       uniformSubScopesProcessor.Successor = null;
     62      uniformSubScopesProcessor.Successor = evaluator;
    5563      #endregion
    5664    }
Note: See TracChangeset for help on using the changeset viewer.