Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/10/19 12:16:18 (5 years ago)
Author:
mkommend
Message:

#3020: Adapated AfterDeserializationHook of genetic algorithms to check if the mutator parameter already has the correct type.
In detail the following algorithms have been adapted: ALPS-GA, ALPS-OSGA, GA, Island-GA, NSGA-2, Island-OSGA, OSGA, SASEGASA.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs

    r17180 r17198  
    2222using System;
    2323using System.Linq;
     24using HEAL.Attic;
    2425using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
     
    3031using HeuristicLab.Optimization.Operators;
    3132using HeuristicLab.Parameters;
    32 using HEAL.Attic;
    3333using HeuristicLab.PluginInfrastructure;
    3434using HeuristicLab.Random;
     
    282282
    283283      var optionalMutatorParameter = MutatorParameter as OptionalConstrainedValueParameter<IManipulator>;
    284       if (optionalMutatorParameter != null) {
     284      var mutatorParameter = MutatorParameter as ConstrainedValueParameter<IManipulator>;
     285      if (mutatorParameter == null && optionalMutatorParameter != null) {
    285286        Parameters.Remove(optionalMutatorParameter);
    286287        Parameters.Add(new ConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
Note: See TracChangeset for help on using the changeset viewer.