Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/21/16 15:30:02 (8 years ago)
Author:
pkuelzer
Message:

#2558 migration bug fixed, hopefully

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/IslandALPS/IslandALPS/3.3/Offspring Selection/IslandAlpsOffspringSelectionAlgorithm.cs

    r13778 r13781  
    546546
    547547    private void MigrationRate_ValueChanged(object sender, EventArgs e) {
    548       var migrationSize = (int)Math.Ceiling(MigrationRateParameter.Value.Value * PopulationSize.Value);
    549       foreach (var selector in EmigrantsSelectorParameter.ValidValues) {
    550         selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(migrationSize);
    551       }
     548      ParametrizeMigration();
    552549    }
    553550
     
    626623    private void PopulationSize_ValueChanged(object sender, EventArgs e) {
    627624      ParameterizeSelectors();
     625      ParametrizeMigration();
    628626    }
    629627
     
    795793    private void ParametrizeMigration() {
    796794      var migrationSize = (int) Math.Ceiling(MigrationRateParameter.Value.Value*PopulationSize.Value);
     795      EmigrantsSelectorParameter.ValidValues.Clear();
    797796      foreach (var selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name)) {
    798797        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(migrationSize);
     
    804803      }
    805804
     805      ImmigrationReplacerParameter.ValidValues.Clear();
    806806      foreach (var replacer in ApplicationManager.Manager.GetInstances<IReplacer>().OrderBy(x => x.Name)) {
    807807        ParameterizeStochasticOperatorForLayer(replacer);
     
    809809      }
    810810
     811      MigratorParameter.ValidValues.Clear();
    811812      MigratorParameter.ValidValues.Add(new LayerMigrator());
    812813    }
Note: See TracChangeset for help on using the changeset viewer.