Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/21/15 17:42:18 (9 years ago)
Author:
pfleck
Message:

#2269

  • Changed the age type from int to double.
  • Changed EldersSelector to make use of a ScopeTreeLookupParameter.
  • Removed unused operators in LayerUpdator.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/Analyzers/OldestAverageYoungestAgeAnalyzer.cs

    r12996 r13046  
    3636  public sealed class OldestAverageYoungestAgeAnalyzer : AlgorithmOperator, IAnalyzer {
    3737    #region Parameter properties
    38     public IScopeTreeLookupParameter<IntValue> AgeParameter {
    39       get { return (IScopeTreeLookupParameter<IntValue>)Parameters["Age"]; }
     38    public IScopeTreeLookupParameter<DoubleValue> AgeParameter {
     39      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Age"]; }
    4040    }
    41     public IValueLookupParameter<IntValue> CurrentOldestAgeParameter {
    42       get { return (IValueLookupParameter<IntValue>)Parameters["CurrentOldestAge"]; }
     41    public IValueLookupParameter<DoubleValue> CurrentOldestAgeParameter {
     42      get { return (IValueLookupParameter<DoubleValue>)Parameters["CurrentOldestAge"]; }
    4343    }
    44     public IValueLookupParameter<IntValue> CurrentAverageAgeParameter {
    45       get { return (IValueLookupParameter<IntValue>)Parameters["CurrentAverageAge"]; }
     44    public IValueLookupParameter<DoubleValue> CurrentAverageAgeParameter {
     45      get { return (IValueLookupParameter<DoubleValue>)Parameters["CurrentAverageAge"]; }
    4646    }
    47     public IValueLookupParameter<IntValue> CurrentYoungestAgeParameter {
    48       get { return (IValueLookupParameter<IntValue>)Parameters["CurrentYoungestAge"]; }
     47    public IValueLookupParameter<DoubleValue> CurrentYoungestAgeParameter {
     48      get { return (IValueLookupParameter<DoubleValue>)Parameters["CurrentYoungestAge"]; }
    4949    }
    5050    public IValueLookupParameter<DataTable> AgesParameter {
     
    7979      : base() {
    8080      #region Create parameters
    81       Parameters.Add(new ScopeTreeLookupParameter<IntValue>("Age", "The value which represents the age of a solution."));
    82       Parameters.Add(new ValueLookupParameter<IntValue>("CurrentOldestAge", "The oldest age value found in the current population."));
    83       Parameters.Add(new ValueLookupParameter<IntValue>("CurrentAverageAge", "The average age value of all solutions in the current population."));
    84       Parameters.Add(new ValueLookupParameter<IntValue>("CurrentYoungestAge", "The youngest age value found in the current population."));
     81      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Age", "The value which represents the age of a solution."));
     82      Parameters.Add(new ValueLookupParameter<DoubleValue>("CurrentOldestAge", "The oldest age value found in the current population."));
     83      Parameters.Add(new ValueLookupParameter<DoubleValue>("CurrentAverageAge", "The average age value of all solutions in the current population."));
     84      Parameters.Add(new ValueLookupParameter<DoubleValue>("CurrentYoungestAge", "The youngest age value found in the current population."));
    8585      Parameters.Add(new ValueLookupParameter<DataTable>("Ages", "The data table to store the current oldest, current average, current youngest age value."));
    8686      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection where the analysis values should be stored."));
     
    103103      oldestAverageYoungestAgeCalculator.YoungestAgeParameter.ActualName = CurrentYoungestAgeParameter.Name;
    104104
    105       dataTableValuesCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentOldestAge", null, CurrentOldestAgeParameter.Name));
    106       dataTableValuesCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentAverageAge", null, CurrentAverageAgeParameter.Name));
    107       dataTableValuesCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentYoungestAge", null, CurrentYoungestAgeParameter.Name));
     105      dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentOldestAge", null, CurrentOldestAgeParameter.Name));
     106      dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentAverageAge", null, CurrentAverageAgeParameter.Name));
     107      dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentYoungestAge", null, CurrentYoungestAgeParameter.Name));
    108108      dataTableValuesCollector.DataTableParameter.ActualName = AgesParameter.Name;
    109109
    110       //resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentOldestAge", null, CurrentOldestAgeParameter.Name));
    111       //resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentAverageAge", null, CurrentAverageAgeParameter.Name));
    112       //resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("CurrentYoungestAge", null, CurrentYoungestAgeParameter.Name));
    113110      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>(AgesParameter.Name));
    114111      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
Note: See TracChangeset for help on using the changeset viewer.