Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/10 17:19:34 (14 years ago)
Author:
abeham
Message:

#893

  • Fixed wiring of iteration based operators like the michalewicz manipulators for real vector encoding
File:
1 edited

Legend:

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

    r3704 r3750  
    304304      ParameterizeSelectors();
    305305      ParameterizeAnalyzers();
     306      ParameterizeIterationBasedOperators();
    306307      UpdateCrossovers();
    307308      UpdateMutators();
     
    327328    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
    328329      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     330      ParameterizeIterationBasedOperators();
    329331      UpdateCrossovers();
    330332      UpdateMutators();
     
    431433      }
    432434    }
     435    private void ParameterizeIterationBasedOperators() {
     436      if (Problem != null) {
     437        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
     438          op.IterationsParameter.ActualName = "Generations";
     439          op.MaximumIterationsParameter.ActualName = "MaximumGenerations";
     440        }
     441      }
     442    }
    433443    private void UpdateCrossovers() {
    434444      ICrossover oldCrossover = CrossoverParameter.Value;
Note: See TracChangeset for help on using the changeset viewer.