Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8406


Ignore:
Timestamp:
08/03/12 11:09:17 (12 years ago)
Author:
jkarder
Message:

#1247:

  • added similarity calculators
  • adjusted event handling
  • reformatted code
Location:
branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3/ExpressionEvaluator.cs

    r8385 r8406  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3/HeuristicLab.Algorithms.RAPGA-3.3.csproj

    r8385 r8406  
    104104    <Compile Include="OffspringRestorer.cs" />
    105105    <Compile Include="ProgressiveOffspringPreserver.cs" />
     106    <Compile Include="SimilarityCalculator\BlindSimilarityCalculator.cs" />
     107    <Compile Include="SimilarityCalculator\QualitySimilarityCalculator.cs" />
    106108    <Compile Include="RAPGA.cs" />
    107109    <Compile Include="RAPGAMainLoop.cs" />
  • branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3/OffspringRestorer.cs

    r8377 r8406  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3/ProgressiveOffspringPreserver.cs

    r8377 r8406  
    11#region License Information
    2 
    32/* HeuristicLab
    43 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/RAPGA/HeuristicLab.Algorithms.RAPGA/3.3/RAPGA.cs

    r8385 r8406  
    322322      base.Problem_OperatorsChanged(sender, e);
    323323    }
    324     void BatchSizeParameter_ValueChanged(object sender, EventArgs e) {
     324    private void SimilarityCalculatorParameter_ValueChanged(object sender, EventArgs e) {
     325      ParameterizeRAPGAMainLoop();
     326    }
     327    private void BatchSizeParameter_ValueChanged(object sender, EventArgs e) {
    325328      BatchSize.ValueChanged += new EventHandler(BatchSize_ValueChanged);
    326329      ParameterizeSelectors();
    327330    }
    328     void BatchSize_ValueChanged(object sender, EventArgs e) {
     331    private void BatchSize_ValueChanged(object sender, EventArgs e) {
    329332      ParameterizeSelectors();
    330333    }
     
    359362      BatchSizeParameter.ValueChanged += new EventHandler(BatchSizeParameter_ValueChanged);
    360363      BatchSize.ValueChanged += new EventHandler(BatchSize_ValueChanged);
     364      SimilarityCalculatorParameter.ValueChanged += new EventHandler(SimilarityCalculatorParameter_ValueChanged);
    361365      if (Problem != null) {
    362366        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     
    472476      ISolutionSimilarityCalculator defaultSimilarityCalculator = Problem.Operators.OfType<ISolutionSimilarityCalculator>().FirstOrDefault();
    473477
     478      SimilarityCalculatorParameter.ValidValues.Add(new BlindSimilarityCalculator());
     479      SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator());
     480
    474481      foreach (ISolutionSimilarityCalculator similarityCalculator in Problem.Operators.OfType<ISolutionSimilarityCalculator>())
    475482        SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator);
Note: See TracChangeset for help on using the changeset viewer.