Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13857 for branches/IslandALPS


Ignore:
Timestamp:
05/25/16 12:08:56 (9 years ago)
Author:
pkuelzer
Message:

#2558 Added SucessRatio and SelectionPressure Analyzer

Location:
branches/IslandALPS/IslandALPS/3.3/Offspring Selection
Files:
2 edited

Legend:

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

    r13781 r13857  
    218218    [Storable] private readonly BestAverageWorstQualityAnalyzer layerQualityAnalyzer;
    219219    [Storable] private readonly BestAverageWorstQualityAnalyzer groupQualityAnalyzer;
     220    [Storable] private readonly ValueAnalyzer layerSelectionPressureAnalyzer;
     221    [Storable] private readonly ValueAnalyzer currentSucessRatioAnalyzer;
    220222
    221223    #endregion
     
    240242      layerQualityAnalyzer = cloner.Clone(original.layerQualityAnalyzer);
    241243      groupQualityAnalyzer = cloner.Clone(original.groupQualityAnalyzer);
     244      layerSelectionPressureAnalyzer = cloner.Clone(original.layerSelectionPressureAnalyzer);
     245      currentSucessRatioAnalyzer = cloner.Clone(currentSucessRatioAnalyzer);
    242246      //terminator
    243247      generationsTerminator = cloner.Clone(original.generationsTerminator);
     
    295299      layerQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
    296300      groupQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
     301      layerSelectionPressureAnalyzer = new ValueAnalyzer();
     302      currentSucessRatioAnalyzer = new ValueAnalyzer();
    297303      #endregion
    298304
     
    696702      GroupAnalyzer.Operators.Add(groupQualityAnalyzer, false);
    697703      LayerAnalyzer.Operators.Add(layerQualityAnalyzer, false);
     704      LayerAnalyzer.Operators.Add(layerSelectionPressureAnalyzer, false);
     705      LayerAnalyzer.Operators.Add(currentSucessRatioAnalyzer, false);
    698706      IslandAnalyzer.Operators.Add(islandQualityAnalyzer, false);
     707
    699708      Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
     709
    700710      //depth for each analyzer gets set when added
    701711      if (Problem != null) {
     
    707717        }
    708718      }
     719      //setting the right depth because adding analyzer sets the depth
     720      layerSelectionPressureAnalyzer.ValueParameter.Depth = 0;
     721      currentSucessRatioAnalyzer.ValueParameter.Depth = 0;
     722
    709723    }
    710724
     
    859873      groupQualityAnalyzer.ResultsParameter.Hidden = true;
    860874
     875      layerSelectionPressureAnalyzer.Name = "SelectionPressureAnalyzer Layer";
     876      layerSelectionPressureAnalyzer.ResultsParameter.ActualName = "LayerResults";
     877      layerSelectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
     878      layerSelectionPressureAnalyzer.ValuesParameter.ActualName = "SelectionPressure History";
     879
     880      currentSucessRatioAnalyzer.Name = "CurrentSuccessRatio Analyzer";
     881      currentSucessRatioAnalyzer.ResultsParameter.ActualName = "Results";
     882      currentSucessRatioAnalyzer.ValueParameter.ActualName = "CurrentSuccessRatio";
     883      currentSucessRatioAnalyzer.ValuesParameter.ActualName = "Success Ratio History";
     884
    861885      if (Problem != null) {
    862886        SetAnalyzerParameter(layerQualityAnalyzer);
  • branches/IslandALPS/IslandALPS/3.3/Offspring Selection/IslandAlpsOffspringSelectionAlgorithmMainLoop.cs

    r13734 r13857  
    302302      layerVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>(LayerParametername, new IntValue(0)));
    303303      layerVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>(LayerResultsParametername));
     304      layerVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
     305      layerVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentSuccessRatio", new DoubleValue(0)));
    304306
    305307      groupVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>(GroupResultsParametername));
Note: See TracChangeset for help on using the changeset viewer.