Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/30/15 16:26:07 (9 years ago)
Author:
pfleck
Message:

#2495
Added backwards compatibility for IslandGeneticAlgorithm and IslandOffspringSelectionGeneticAlgorithm to still use counterclockwise migration.
The UnidirectionalRingMigrator uses clockwise per default.

File:
1 edited

Legend:

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

    r12504 r13094  
    339339      ParameterizeSelectors();
    340340
    341       foreach (IMigrator migrator in ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name))
     341      foreach (IMigrator migrator in ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name)) {
     342        // BackwardsCompatibility3.3
     343        // Set the migration direction to counterclockwise
     344        var unidirectionalRing = migrator as UnidirectionalRingMigrator;
     345        if (unidirectionalRing != null) unidirectionalRing.ClockwiseMigrationDirection = new BoolValue(false);
    342346        MigratorParameter.ValidValues.Add(migrator);
     347      }
    343348
    344349      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
Note: See TracChangeset for help on using the changeset viewer.