Changeset 13781 for branches/IslandALPS
- Timestamp:
- 04/21/16 15:30:02 (8 years ago)
- Location:
- branches/IslandALPS/IslandALPS/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorithm.cs
r13777 r13781 576 576 private void PopulationSize_ValueChanged(object sender, EventArgs e) { 577 577 ParameterizeSelectors(); 578 ParametrizeMigration(); 578 579 } 579 580 … … 604 605 605 606 private void MigrationRate_ValueChanged(object sender, EventArgs e) { 606 var migrationSize = (int)Math.Ceiling(MigrationRateParameter.Value.Value * PopulationSize.Value); 607 foreach (var selector in EmigrantsSelectorParameter.ValidValues) { 608 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(migrationSize); 609 } 607 ParametrizeMigration(); 610 608 } 611 609 … … 772 770 773 771 private void ParametrizeMigration() { 774 var migrationSize = (int) Math.Ceiling(MigrationRateParameter.Value.Value*PopulationSize.Value); 772 var migrationSize = (int)Math.Ceiling(MigrationRateParameter.Value.Value * PopulationSize.Value); 773 EmigrantsSelectorParameter.ValidValues.Clear(); 775 774 foreach (var selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name)) { 776 775 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(migrationSize); … … 782 781 } 783 782 783 ImmigrationReplacerParameter.ValidValues.Clear(); 784 784 foreach (var replacer in ApplicationManager.Manager.GetInstances<IReplacer>().OrderBy(x => x.Name)) { 785 785 ParameterizeStochasticOperatorForLayer(replacer); … … 787 787 } 788 788 789 MigratorParameter.ValidValues.Clear(); 789 790 MigratorParameter.ValidValues.Add(new LayerMigrator()); 790 791 } -
branches/IslandALPS/IslandALPS/3.3/Offspring Selection/IslandAlpsOffspringSelectionAlgorithm.cs
r13778 r13781 546 546 547 547 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(); 552 549 } 553 550 … … 626 623 private void PopulationSize_ValueChanged(object sender, EventArgs e) { 627 624 ParameterizeSelectors(); 625 ParametrizeMigration(); 628 626 } 629 627 … … 795 793 private void ParametrizeMigration() { 796 794 var migrationSize = (int) Math.Ceiling(MigrationRateParameter.Value.Value*PopulationSize.Value); 795 EmigrantsSelectorParameter.ValidValues.Clear(); 797 796 foreach (var selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name)) { 798 797 selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(migrationSize); … … 804 803 } 805 804 805 ImmigrationReplacerParameter.ValidValues.Clear(); 806 806 foreach (var replacer in ApplicationManager.Manager.GetInstances<IReplacer>().OrderBy(x => x.Name)) { 807 807 ParameterizeStochasticOperatorForLayer(replacer); … … 809 809 } 810 810 811 MigratorParameter.ValidValues.Clear(); 811 812 MigratorParameter.ValidValues.Add(new LayerMigrator()); 812 813 }
Note: See TracChangeset
for help on using the changeset viewer.