Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/30/15 16:26:07 (8 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.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs

    r12504 r13094  
    405405      ParameterizeSelectors();
    406406
    407       foreach (IMigrator migrator in ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name))
     407      foreach (IMigrator migrator in ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name)) {
     408        // BackwardsCompatibility3.3
     409        // Set the migration direction to counterclockwise
     410        var unidirectionalRing = migrator as UnidirectionalRingMigrator;
     411        if (unidirectionalRing != null) unidirectionalRing.ClockwiseMigrationDirection = new BoolValue(false);
    408412        MigratorParameter.ValidValues.Add(migrator);
     413      }
    409414
    410415      foreach (IDiscreteDoubleValueModifier modifier in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
Note: See TracChangeset for help on using the changeset viewer.