Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/09/15 16:54:53 (9 years ago)
Author:
pfleck
Message:

#2269

  • Removed AgeInheritance enum and used a double [0-1] instead.
  • Added a WeightingReducer that uses the new double-weight for weighting between the lower and higher value.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs

    r12992 r12997  
    7575    public AlpsGeneticAlgorithmMainLoop()
    7676      : base() {
    77       Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
     77      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false.") { Hidden = true });
    7878      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
    7979      Parameters.Add(new LookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations that the algorithm should process."));
     
    232232      // Insert AgeCalculator between crossover and its successor
    233233      var crossoverSuccessor = crossover.Successor;
    234       var ageCalculator = new DataReducer() { Name = "Calculate Age" };
     234      var ageCalculator = new WeightingReducer() { Name = "Calculate Age" };
    235235      crossover.Successor = ageCalculator;
    236236
    237237      ageCalculator.ParameterToReduce.ActualName = "Age";
    238238      ageCalculator.TargetParameter.ActualName = "Age";
    239       ageCalculator.ReductionOperation.Value = null;
    240       ageCalculator.ReductionOperation.ActualName = "AgeInheritanceReduction";
    241       ageCalculator.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign);
     239      ageCalculator.WeightParameter.ActualName = "AgeInheritance";
    242240      ageCalculator.Successor = crossoverSuccessor;
    243241
Note: See TracChangeset for help on using the changeset viewer.