Changeset 3654


Ignore:
Timestamp:
05/05/10 22:08:17 (12 years ago)
Author:
abeham
Message:

#999

  • updated Island OSGA to soon to be changed analyzers
Location:
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3
Files:
2 edited

Legend:

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

    r3616 r3654  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    3334using HeuristicLab.PluginInfrastructure;
    3435using HeuristicLab.Random;
    35 using HeuristicLab.Selection;
    3636
    3737namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
     
    121121      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
    122122    }
     123    private ValueParameter<MultiAnalyzer<IMultiPopulationAnalyzer>> AnalyzerParameter {
     124      get { return (ValueParameter<MultiAnalyzer<IMultiPopulationAnalyzer>>)Parameters["Analyzer"]; }
     125    }
     126    private ValueParameter<MultiAnalyzer<IPopulationAnalyzer>> IslandAnalyzerParameter {
     127      get { return (ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>)Parameters["IslandAnalyzer"]; }
     128    }
    123129    #endregion
    124130
     
    211217      get { return OffspringSelectionBeforeMutationParameter.Value; }
    212218      set { OffspringSelectionBeforeMutationParameter.Value = value; }
     219    }
     220    public MultiAnalyzer<IMultiPopulationAnalyzer> Analyzer {
     221      get { return AnalyzerParameter.Value; }
     222      set { AnalyzerParameter.Value = value; }
     223    }
     224    public MultiAnalyzer<IPopulationAnalyzer> IslandAnalyzer {
     225      get { return IslandAnalyzerParameter.Value; }
     226      set { IslandAnalyzerParameter.Value = value; }
    213227    }
    214228    private List<ISelector> selectors;
     
    232246      get { return (IslandOffspringSelectionGeneticAlgorithmMainLoop)IslandProcessor.Successor; }
    233247    }
     248    private PopulationBestAverageWorstQualityAnalyzer islandQualityAnalyzer;
     249    //private MultipopulationBestAverageWorstQualityAnalyzer qualityAnalyzer;
    234250    #endregion
    235251
     
    260276      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm.", new DoubleValue(100)));
    261277      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
    262 
     278      Parameters.Add(new ValueParameter<MultiAnalyzer<IMultiPopulationAnalyzer>>("Analyzer", "The operator used to analyze the islands.", new MultiAnalyzer<IMultiPopulationAnalyzer>()));
     279      Parameters.Add(new ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer<IPopulationAnalyzer>()));
     280     
    263281      RandomCreator randomCreator = new RandomCreator();
    264282      SubScopesCreator populationCreator = new SubScopesCreator();
     
    331349      ParameterizeMainLoop();
    332350      ParameterizeSelectors();
     351      ParameterizeAnalyzers();
    333352      UpdateCrossovers();
    334353      UpdateMutators();
     354      UpdateAnalyzers();
    335355      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
    336356      base.OnProblemChanged();
     
    347367      ParameterizeMainLoop();
    348368      ParameterizeSelectors();
     369      ParameterizeAnalyzers();
    349370      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
    350371      base.Problem_EvaluatorChanged(sender, e);
     
    354375      UpdateCrossovers();
    355376      UpdateMutators();
     377      UpdateAnalyzers();
    356378      base.Problem_OperatorsChanged(sender, e);
    357379    }
     
    373395      ParameterizeMainLoop();
    374396      ParameterizeSelectors();
     397      ParameterizeAnalyzers();
    375398    }
    376399    private void MigrationRateParameter_ValueChanged(object sender, EventArgs e) {
     
    401424    private void Initialize() {
    402425      InitializeSelectors();
     426      InitializeAnalyzers();
    403427      UpdateSelectors();
     428      UpdateAnalyzers();
    404429      InitializeComparisonFactorModifiers();
    405430      UpdateComparisonFactorModifiers();
     
    445470      ParameterizeSelectors();
    446471    }
     472    private void InitializeAnalyzers() {
     473      islandQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();
     474      //qualityAnalyzer = new MultipopulationBestAverageWorstQualityAnalyzer();
     475      ParameterizeAnalyzers();
     476    }
    447477    private void InitializeComparisonFactorModifiers() {
    448478      comparisonFactorModifiers = new List<IDiscreteDoubleValueModifier>();
     
    484514      }
    485515    }
     516    private void ParameterizeAnalyzers() {
     517      islandQualityAnalyzer.ResultsParameter.ActualName = "Results";
     518      //qualityAnalyzer.ResultsParameter.ActualName = "Results";
     519      if (Problem != null) {
     520        islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
     521        islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
     522        islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
     523      }
     524    }
    486525    private void ParameterizeComparisonFactorModifiers() {
    487526      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers) {
     
    568607      }
    569608    }
     609    private void UpdateAnalyzers() {
     610      IslandAnalyzer.Operators.Clear();
     611      Analyzer.Operators.Clear();
     612      IslandAnalyzer.Operators.Add(islandQualityAnalyzer);
     613      //Analyzer.Operators.Add(qualityAnalyzer);
     614      if (Problem != null) {
     615        foreach (IPopulationAnalyzer analyzer in Problem.Operators.OfType<IPopulationAnalyzer>().OrderBy(x => x.Name)) {
     616          IslandAnalyzer.Operators.Add(analyzer);
     617        }
     618        foreach (IMultiPopulationAnalyzer analyzer in Problem.Operators.OfType<IMultiPopulationAnalyzer>().OrderBy(x => x.Name))
     619          Analyzer.Operators.Add(analyzer);
     620      }
     621    }
    570622    #endregion
    571623  }
  • trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs

    r3615 r3654  
    126126    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
    127127      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
     128    }
     129    public ValueLookupParameter<IOperator> AnalyzerParameter {
     130      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
     131    }
     132    public ValueLookupParameter<IOperator> IslandAnalyzerParameter {
     133      get { return (ValueLookupParameter<IOperator>)Parameters["IslandAnalyzer"]; }
    128134    }
    129135    #endregion
     
    162168      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
    163169      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
     170      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the islands."));
     171      Parameters.Add(new ValueLookupParameter<IOperator>("IslandAnalyzer", "The operator used to analyze each island."));
    164172      #endregion
    165173
     
    168176      UniformSubScopesProcessor uniformSubScopesProcessor0 = new UniformSubScopesProcessor();
    169177      VariableCreator islandVariableCreator = new VariableCreator();
    170       BestQualityMemorizer islandBestQualityMemorizer1 = new BestQualityMemorizer();
    171       BestAverageWorstQualityCalculator islandBestAverageWorstQualityCalculator1 = new BestAverageWorstQualityCalculator();
    172       DataTableValuesCollector islandDataTableValuesCollector1 = new DataTableValuesCollector();
    173       DataTableValuesCollector islandDataTableValuesCollector2 = new DataTableValuesCollector();
    174       QualityDifferenceCalculator islandQualityDifferenceCalculator1 = new QualityDifferenceCalculator();
    175       Placeholder islandVisualizer1 = new Placeholder();
    176       ResultsCollector islandResultsCollector = new ResultsCollector();
    177       BestQualityMemorizer bestQualityMemorizer1 = new BestQualityMemorizer();
    178       BestQualityMemorizer bestQualityMemorizer2 = new BestQualityMemorizer();
    179       BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator1 = new BestAverageWorstQualityCalculator();
    180       DataTableValuesCollector dataTableValuesCollector1 = new DataTableValuesCollector();
    181       DataTableValuesCollector dataTableValuesCollector2 = new DataTableValuesCollector();
    182       QualityDifferenceCalculator qualityDifferenceCalculator1 = new QualityDifferenceCalculator();
    183       ResultsCollector resultsCollector = new ResultsCollector();
     178      Placeholder islandAnalyzer1 = new Placeholder();
     179      ResultsCollector islandResultsCollector1 = new ResultsCollector();
     180      Placeholder analyzer1 = new Placeholder();
     181      ResultsCollector resultsCollector1 = new ResultsCollector();
     182      ResultsCollector resultsCollector2 = new ResultsCollector();
    184183      Placeholder comparisonFactorModifier = new Placeholder();
    185184      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
    186185      ConditionalBranch islandTerminatedBySelectionPressure1 = new ConditionalBranch();
    187186      OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator();
    188       BestQualityMemorizer islandBestQualityMemorizer2 = new BestQualityMemorizer();
    189       BestAverageWorstQualityCalculator islandBestAverageWorstQualityCalculator2 = new BestAverageWorstQualityCalculator();
    190       DataTableValuesCollector islandDataTableValuesCollector3 = new DataTableValuesCollector();
    191       DataTableValuesCollector islandDataTableValuesCollector4 = new DataTableValuesCollector();
    192       QualityDifferenceCalculator islandQualityDifferenceCalculator2 = new QualityDifferenceCalculator();
    193       Placeholder islandVisualizer2 = new Placeholder();
     187      Placeholder islandAnalyzer2 = new Placeholder();
     188      ResultsCollector islandResultsCollector2 = new ResultsCollector();
    194189      IntCounter islandEvaluatedSolutionsCounter = new IntCounter();
    195190      Assigner islandEvaluatedSolutionsAssigner = new Assigner();
     
    212207      Comparator generationsComparator = new Comparator();
    213208      Comparator terminatedIslandsComparator = new Comparator();
    214       BestQualityMemorizer bestQualityMemorizer3 = new BestQualityMemorizer();
    215       BestQualityMemorizer bestQualityMemorizer4 = new BestQualityMemorizer();
    216       BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator2 = new BestAverageWorstQualityCalculator();
    217       DataTableValuesCollector dataTableValuesCollector3 = new DataTableValuesCollector();
    218       DataTableValuesCollector dataTableValuesCollector4 = new DataTableValuesCollector();
    219       QualityDifferenceCalculator qualityDifferenceCalculator2 = new QualityDifferenceCalculator();
     209      Placeholder analyzer2 = new Placeholder();
     210      ResultsCollector resultsCollector3 = new ResultsCollector();
    220211      ConditionalBranch generationsTerminationCondition = new ConditionalBranch();
    221212      ConditionalBranch terminatedIslandsCondition = new ConditionalBranch();
     
    227218      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
    228219
    229       islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("IslandResults", new ResultCollection()));
     220      islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("Results", new ResultCollection()));
    230221      islandVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>("IslandEvaluatedSolutions", new IntValue(0)));
    231222      islandVariableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("TerminateSelectionPressure", new BoolValue(false)));
    232223      islandVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
    233224
    234       islandBestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality";
    235       islandBestQualityMemorizer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
    236       islandBestQualityMemorizer1.QualityParameter.ActualName = QualityParameter.Name;
    237 
    238       islandBestAverageWorstQualityCalculator1.AverageQualityParameter.ActualName = "CurrentAverageQuality";
    239       islandBestAverageWorstQualityCalculator1.BestQualityParameter.ActualName = "CurrentBestQuality";
    240       islandBestAverageWorstQualityCalculator1.MaximizationParameter.ActualName = MaximizationParameter.Name;
    241       islandBestAverageWorstQualityCalculator1.QualityParameter.ActualName = QualityParameter.Name;
    242       islandBestAverageWorstQualityCalculator1.WorstQualityParameter.ActualName = "CurrentWorstQuality";
    243      
    244       islandDataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
    245       islandDataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
    246       islandDataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
    247       islandDataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    248       islandDataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    249       islandDataTableValuesCollector1.DataTableParameter.ActualName = "BestQualities";
    250 
    251       islandDataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Selection Pressure", null, "SelectionPressure"));
    252       islandDataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Maximum Selection Pressure", null, MaximumSelectionPressureParameter.Name));
    253       islandDataTableValuesCollector2.DataTableParameter.ActualName = "SelectionPressures";
    254 
    255       islandQualityDifferenceCalculator1.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
    256       islandQualityDifferenceCalculator1.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
    257       islandQualityDifferenceCalculator1.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
    258       islandQualityDifferenceCalculator1.SecondQualityParameter.ActualName = "BestQuality";
    259 
    260       islandResultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
    261       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best Quality", null, "CurrentBestQuality"));
    262       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average Quality", null, "CurrentAverageQuality"));
    263       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst Quality", null, "CurrentWorstQuality"));
    264       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    265       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    266       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));
    267       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));
    268       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Curent Comparison Factor", null, "ComparisonFactor"));
    269       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", null, "SelectionPressure"));
    270       islandResultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", null, "CurrentSuccessRatio"));
    271       islandResultsCollector.CollectedValues.Add(new LookupParameter<IItem>("Solution Visualization", null, VisualizationParameter.Name));
    272       islandResultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Qualities"));
    273       islandResultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("SelectionPressures"));
    274       islandResultsCollector.ResultsParameter.ActualName = "IslandResults";
    275 
    276       bestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality";
    277       bestQualityMemorizer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
    278       bestQualityMemorizer1.QualityParameter.ActualName = "BestQuality";
    279 
    280       bestQualityMemorizer2.BestQualityParameter.ActualName = BestKnownQualityParameter.Name;
    281       bestQualityMemorizer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
    282       bestQualityMemorizer2.QualityParameter.ActualName = "BestQuality";
    283 
    284       bestAverageWorstQualityCalculator1.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
    285       bestAverageWorstQualityCalculator1.BestQualityParameter.ActualName = "CurrentBestBestQuality";
    286       bestAverageWorstQualityCalculator1.MaximizationParameter.ActualName = MaximizationParameter.Name;
    287       bestAverageWorstQualityCalculator1.QualityParameter.ActualName = "CurrentBestQuality";
    288       bestAverageWorstQualityCalculator1.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
    289 
    290       dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
    291       dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
    292       dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
    293       dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    294       dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    295       dataTableValuesCollector1.DataTableParameter.ActualName = "BestQualities";
    296 
    297       dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Maximum Selection Pressure", null, MaximumSelectionPressureParameter.Name));
    298       dataTableValuesCollector2.CollectedValues.Add(new SubScopesLookupParameter<DoubleValue>("Selection Pressure Island", null, "SelectionPressure"));
    299       dataTableValuesCollector2.DataTableParameter.ActualName = "SelectionPressures";
    300 
    301       qualityDifferenceCalculator1.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
    302       qualityDifferenceCalculator1.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
    303       qualityDifferenceCalculator1.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
    304       qualityDifferenceCalculator1.SecondQualityParameter.ActualName = "BestQuality";
    305 
    306       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
    307       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
    308       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions"));
    309       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
    310       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
    311       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
    312       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    313       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    314       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));
    315       resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));
    316       resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("BestQualities"));
    317       resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("SelectionPressures"));
    318       resultsCollector.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("IslandResults", "Result set for each island"));
    319       resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
     225      islandAnalyzer1.Name = "Island Analyzer (placeholder)";
     226      islandAnalyzer1.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
     227
     228      islandResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", null, "SelectionPressure"));
     229      islandResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", null, "CurrentSuccessRatio"));
     230      islandResultsCollector1.ResultsParameter.ActualName = "Results";
     231
     232      analyzer1.Name = "Analyzer (placeholder)";
     233      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
     234
     235      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
     236      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
     237      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions"));
     238      resultsCollector1.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("IslandResults", "Result set for each island", "Results"));
     239      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
     240
     241      resultsCollector2.Name = "Reference Island Results";
     242      resultsCollector2.CopyValue = new BoolValue(false);
     243      resultsCollector2.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("IslandResults", "Result set for each island", "Results"));
     244      resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;
    320245
    321246      comparisonFactorModifier.Name = "ComparisonFactorModifier (Placeholder)";
     
    342267      mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
    343268
    344       islandBestQualityMemorizer2.BestQualityParameter.ActualName = "BestQuality";
    345       islandBestQualityMemorizer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
    346       islandBestQualityMemorizer2.QualityParameter.ActualName = QualityParameter.Name;
    347 
    348       islandBestAverageWorstQualityCalculator2.AverageQualityParameter.ActualName = "CurrentAverageQuality";
    349       islandBestAverageWorstQualityCalculator2.BestQualityParameter.ActualName = "CurrentBestQuality";
    350       islandBestAverageWorstQualityCalculator2.MaximizationParameter.ActualName = MaximizationParameter.Name;
    351       islandBestAverageWorstQualityCalculator2.QualityParameter.ActualName = QualityParameter.Name;
    352       islandBestAverageWorstQualityCalculator2.WorstQualityParameter.ActualName = "CurrentWorstQuality";
    353 
    354       islandDataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
    355       islandDataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
    356       islandDataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
    357       islandDataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    358       islandDataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    359       islandDataTableValuesCollector3.DataTableParameter.ActualName = "BestQualities";
    360 
    361       islandDataTableValuesCollector4.CollectedValues.Add(new LookupParameter<DoubleValue>("Selection Pressure", null, "SelectionPressure"));
    362       islandDataTableValuesCollector4.CollectedValues.Add(new LookupParameter<DoubleValue>("Maximum Selection Pressure", null, MaximumSelectionPressureParameter.Name));
    363       islandDataTableValuesCollector4.DataTableParameter.ActualName = "SelectionPressures";
    364 
    365       islandQualityDifferenceCalculator2.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
    366       islandQualityDifferenceCalculator2.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
    367       islandQualityDifferenceCalculator2.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
    368       islandQualityDifferenceCalculator2.SecondQualityParameter.ActualName = "BestQuality";
     269      islandAnalyzer2.Name = "Island Analyzer (placeholder)";
     270      islandAnalyzer2.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
     271
     272      islandResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", null, "SelectionPressure"));
     273      islandResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", null, "CurrentSuccessRatio"));
     274      islandResultsCollector2.ResultsParameter.ActualName = "Results";
    369275
    370276      islandEvaluatedSolutionsCounter.Name = "Update EvaluatedSolutions";
     
    443349      terminatedIslandsComparator.RightSideParameter.ActualName = NumberOfIslandsParameter.Name;
    444350      terminatedIslandsComparator.ResultParameter.ActualName = "TerminateTerminatedIslands";
    445      
    446       bestQualityMemorizer3.BestQualityParameter.ActualName = "BestQuality";
    447       bestQualityMemorizer3.MaximizationParameter.ActualName = MaximizationParameter.Name;
    448       bestQualityMemorizer3.QualityParameter.ActualName = "BestQuality";
    449 
    450       bestQualityMemorizer4.BestQualityParameter.ActualName = BestKnownQualityParameter.Name;
    451       bestQualityMemorizer4.MaximizationParameter.ActualName = MaximizationParameter.Name;
    452       bestQualityMemorizer4.QualityParameter.ActualName = "BestQuality";
    453 
    454       bestAverageWorstQualityCalculator2.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
    455       bestAverageWorstQualityCalculator2.BestQualityParameter.ActualName = "CurrentBestBestQuality";
    456       bestAverageWorstQualityCalculator2.MaximizationParameter.ActualName = MaximizationParameter.Name;
    457       bestAverageWorstQualityCalculator2.QualityParameter.ActualName = "CurrentBestQuality";
    458       bestAverageWorstQualityCalculator2.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
    459 
    460       dataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
    461       dataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
    462       dataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
    463       dataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
    464       dataTableValuesCollector3.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
    465       dataTableValuesCollector3.DataTableParameter.ActualName = "BestQualities";
    466 
    467       dataTableValuesCollector4.CollectedValues.Add(new LookupParameter<DoubleValue>("Maximum Selection Pressure", null, MaximumSelectionPressureParameter.Name));
    468       dataTableValuesCollector4.CollectedValues.Add(new SubScopesLookupParameter<DoubleValue>("Selection Pressure Island", null, "SelectionPressure"));
    469       dataTableValuesCollector4.DataTableParameter.ActualName = "SelectionPressures";
    470 
    471       qualityDifferenceCalculator2.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
    472       qualityDifferenceCalculator2.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
    473       qualityDifferenceCalculator2.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
    474       qualityDifferenceCalculator2.SecondQualityParameter.ActualName = "BestQuality";
     351
     352      analyzer2.Name = "Analyzer (placeholder)";
     353      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
     354
     355      resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
     356      resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
     357      resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions"));
     358      resultsCollector3.ResultsParameter.ActualName = ResultsParameter.Name;
    475359
    476360      generationsTerminationCondition.Name = "Terminate (MaxGenerations) ?";
     
    485369      variableCreator.Successor = uniformSubScopesProcessor0;
    486370      uniformSubScopesProcessor0.Operator = islandVariableCreator;
    487       uniformSubScopesProcessor0.Successor = bestQualityMemorizer1;
    488       islandVariableCreator.Successor = islandBestQualityMemorizer1;
    489       islandBestQualityMemorizer1.Successor = islandBestAverageWorstQualityCalculator1;
    490       islandBestAverageWorstQualityCalculator1.Successor = islandDataTableValuesCollector1;
    491       islandDataTableValuesCollector1.Successor = islandDataTableValuesCollector2;
    492       islandDataTableValuesCollector2.Successor = islandQualityDifferenceCalculator1;
    493       islandQualityDifferenceCalculator1.Successor = islandVisualizer1;
    494       islandVisualizer1.Successor = islandResultsCollector;
    495       islandResultsCollector.Successor = null;
    496       bestQualityMemorizer1.Successor = bestQualityMemorizer2;
    497       bestQualityMemorizer2.Successor = bestAverageWorstQualityCalculator1;
    498       bestAverageWorstQualityCalculator1.Successor = dataTableValuesCollector1;
    499       dataTableValuesCollector1.Successor = dataTableValuesCollector2;
    500       dataTableValuesCollector2.Successor = qualityDifferenceCalculator1;
    501       qualityDifferenceCalculator1.Successor = resultsCollector;
    502       resultsCollector.Successor = comparisonFactorModifier;
     371      uniformSubScopesProcessor0.Successor = analyzer1;
     372      islandVariableCreator.Successor = islandAnalyzer1;
     373      islandAnalyzer1.Successor = islandResultsCollector1;
     374      islandResultsCollector1.Successor = null;
     375      analyzer1.Successor = resultsCollector1;
     376      resultsCollector1.Successor = resultsCollector2;
     377      resultsCollector2.Successor = comparisonFactorModifier;
    503378      comparisonFactorModifier.Successor = uniformSubScopesProcessor1;
    504379      uniformSubScopesProcessor1.Operator = islandTerminatedBySelectionPressure1;
     
    507382      islandTerminatedBySelectionPressure1.FalseBranch = mainOperator;
    508383      islandTerminatedBySelectionPressure1.Successor = null;
    509       mainOperator.Successor = islandBestQualityMemorizer2;
    510       islandBestQualityMemorizer2.Successor = islandBestAverageWorstQualityCalculator2;
    511       islandBestAverageWorstQualityCalculator2.Successor = islandDataTableValuesCollector3;
    512       islandDataTableValuesCollector3.Successor = islandDataTableValuesCollector4;
    513       islandDataTableValuesCollector4.Successor = islandQualityDifferenceCalculator2;
    514       islandQualityDifferenceCalculator2.Successor = islandVisualizer2;
    515       islandVisualizer2.Successor = islandEvaluatedSolutionsCounter;
     384      mainOperator.Successor = islandAnalyzer2;
     385      islandAnalyzer2.Successor = islandResultsCollector2;
     386      islandResultsCollector2.Successor = islandEvaluatedSolutionsCounter;
    516387      islandEvaluatedSolutionsCounter.Successor = islandEvaluatedSolutionsAssigner;
    517388      islandEvaluatedSolutionsAssigner.Successor = islandSelectionPressureComparator;
     
    538409      immigrationReplacer.Successor = null;
    539410      generationsComparator.Successor = terminatedIslandsComparator;
    540       terminatedIslandsComparator.Successor = bestQualityMemorizer3;
    541       bestQualityMemorizer3.Successor = bestQualityMemorizer4;
    542       bestQualityMemorizer4.Successor = bestAverageWorstQualityCalculator2;
    543       bestAverageWorstQualityCalculator2.Successor = dataTableValuesCollector3;
    544       dataTableValuesCollector3.Successor = dataTableValuesCollector4;
    545       dataTableValuesCollector4.Successor = qualityDifferenceCalculator2;
    546       qualityDifferenceCalculator2.Successor = generationsTerminationCondition;
     411      terminatedIslandsComparator.Successor = analyzer2;
     412      analyzer2.Successor = resultsCollector3;
     413      resultsCollector3.Successor = generationsTerminationCondition;
    547414      generationsTerminationCondition.TrueBranch = null;
    548415      generationsTerminationCondition.FalseBranch = terminatedIslandsCondition;
Note: See TracChangeset for help on using the changeset viewer.