Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AgeDistributionAnalyzer.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AgeDistributionAnalyzer.cs	(revision 11620)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AgeDistributionAnalyzer.cs	(revision 11620)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ALPS {
+  // Based on QualityDistributionAnalyzer
+  [Item("AgeDistributionAnalyzer", "Analyzes the distribution of the ages in that it adds a Histogram of them into the result collection.")]
+  [StorableClass]
+  public sealed class AgeDistributionAnalyzer : SingleSuccessorOperator, IAnalyzer, IIterationBasedOperator {
+
+    #region Parameter Properties
+    public IScopeTreeLookupParameter<IntValue> AgeParameter {
+      get { return (IScopeTreeLookupParameter<IntValue>)Parameters["Age"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    private ValueParameter<StringValue> HistogramNameParameter {
+      get { return (ValueParameter<StringValue>)Parameters["HistogramName"]; }
+    }
+    private ValueParameter<BoolValue> StoreHistoryParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["StoreHistory"]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
+    }
+    #endregion
+
+    public bool EnabledByDefault { get { return false; } }
+
+    public string HistogramName {
+      get { return HistogramNameParameter.Value.Value; }
+      set { HistogramNameParameter.Value.Value = value; }
+    }
+    public bool StoreHistory {
+      get { return StoreHistoryParameter.Value.Value; }
+      set { StoreHistoryParameter.Value.Value = value; }
+    }
+
+    [StorableConstructor]
+    private AgeDistributionAnalyzer(bool deserializing)
+      : base(deserializing) { }
+    private AgeDistributionAnalyzer(AgeDistributionAnalyzer original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AgeDistributionAnalyzer(this, cloner);
+    }
+    public AgeDistributionAnalyzer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<IntValue>("Age", "The value which represents the age of a solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection where the analysis values should be stored."));
+      Parameters.Add(new FixedValueParameter<StringValue>("HistogramName", "The name of the histogram that gets injected in to the results collection.", new StringValue("Age Distribution")));
+      Parameters.Add(new FixedValueParameter<BoolValue>("StoreHistory", "True if the history should be stored in addition to the current distribution", new BoolValue(false)));
+      Parameters.Add(new LookupParameter<IntValue>("Iterations", "Optional: A value indicating the current iteration."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "Unused", new IntValue(-1)));
+
+      AgeParameter.Hidden = true;
+      ResultsParameter.Hidden = true;
+      IterationsParameter.Hidden = true;
+      MaximumIterationsParameter.Hidden = true;
+    }
+
+    public override IOperation Apply() {
+      DataTable ageDistribution = null;
+      ResultCollection results = ResultsParameter.ActualValue;
+      string description = "Shows the age distributions in the current population.";
+      if (results.ContainsKey(HistogramName)) {
+        ageDistribution = results[HistogramName].Value as DataTable;
+      } else {
+        ageDistribution = new DataTable("Population Age Distribution", description);
+        ageDistribution.VisualProperties.XAxisTitle = AgeParameter.ActualName;
+        ageDistribution.VisualProperties.YAxisTitle = "Frequency";
+        results.Add(new Result(HistogramName, description, ageDistribution));
+      }
+      DataRow row;
+      if (!ageDistribution.Rows.TryGetValue("AgeDistribution", out row)) {
+        row = new DataRow("AgeDistribution");
+        row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
+        ageDistribution.Rows.Add(row);
+      }
+      var ages = AgeParameter.ActualValue;
+      row.Values.Replace(ages.Select(x => (double)x.Value));
+
+      if (StoreHistory) {
+        string historyResultName = HistogramName + " History";
+        DataTableHistory adHistory = null;
+        if (results.ContainsKey(historyResultName)) {
+          adHistory = results[historyResultName].Value as DataTableHistory;
+        } else {
+          adHistory = new DataTableHistory();
+          results.Add(new Result(historyResultName, adHistory));
+        }
+        DataTable table = (DataTable)ageDistribution.Clone();
+        IntValue iteration = IterationsParameter.ActualValue;
+        if (iteration != null) {
+          string iterationName = IterationsParameter.ActualName;
+          if (iterationName.EndsWith("s")) iterationName = iterationName.Remove(iterationName.Length - 1);
+          string appendix = " at " + iterationName + " " + iteration.Value.ToString();
+          table.Name += appendix;
+          table.Rows["AgeDistribution"].VisualProperties.DisplayName += appendix;
+        }
+        adHistory.Add(table);
+      }
+      return base.Apply();
+    }
+  }
+}
Index: anches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AgeDiversityAnalyzer.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AgeDiversityAnalyzer.cs	(revision 11619)
+++ 	(revision )
@@ -1,137 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Algorithms.ALPS {
-  // Based on QualityDiversityAnalyzer
-  [Item("AgeDiversityAnalyzer", "Analyzes the distribution of the ages in that it adds a Histogram of them into the result collection.")]
-  [StorableClass]
-  public sealed class AgeDiversityAnalyzer : SingleSuccessorOperator, IAnalyzer, IIterationBasedOperator {
-
-    #region Parameter Properties
-    public IScopeTreeLookupParameter<IntValue> AgeParameter {
-      get { return (IScopeTreeLookupParameter<IntValue>)Parameters["Age"]; }
-    }
-    public ValueLookupParameter<ResultCollection> ResultsParameter {
-      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
-    }
-    private ValueParameter<StringValue> HistogramNameParameter {
-      get { return (ValueParameter<StringValue>)Parameters["HistogramName"]; }
-    }
-    private ValueParameter<BoolValue> StoreHistoryParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["StoreHistory"]; }
-    }
-    public ILookupParameter<IntValue> IterationsParameter {
-      get { return (ILookupParameter<IntValue>)Parameters["Iterations"]; }
-    }
-    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
-    }
-    #endregion
-
-    public bool EnabledByDefault { get { return false; } }
-
-    public string HistogramName {
-      get { return HistogramNameParameter.Value.Value; }
-      set { HistogramNameParameter.Value.Value = value; }
-    }
-    public bool StoreHistory {
-      get { return StoreHistoryParameter.Value.Value; }
-      set { StoreHistoryParameter.Value.Value = value; }
-    }
-
-    [StorableConstructor]
-    private AgeDiversityAnalyzer(bool deserializing)
-      : base(deserializing) { }
-    private AgeDiversityAnalyzer(AgeDiversityAnalyzer original, Cloner cloner)
-      : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new AgeDiversityAnalyzer(this, cloner);
-    }
-    public AgeDiversityAnalyzer()
-      : base() {
-      Parameters.Add(new ScopeTreeLookupParameter<IntValue>("Age", "The value which represents the age of a solution."));
-      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection where the analysis values should be stored."));
-      Parameters.Add(new FixedValueParameter<StringValue>("HistogramName", "The name of the histogram that gets injected in to the results collection.", new StringValue("Age Distribution")));
-      Parameters.Add(new FixedValueParameter<BoolValue>("StoreHistory", "True if the history should be stored in addition to the current distribution", new BoolValue(false)));
-      Parameters.Add(new LookupParameter<IntValue>("Iterations", "Optional: A value indicating the current iteration."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "Unused", new IntValue(-1)));
-
-      AgeParameter.Hidden = true;
-      ResultsParameter.Hidden = true;
-      IterationsParameter.Hidden = true;
-      MaximumIterationsParameter.Hidden = true;
-    }
-
-    public override IOperation Apply() {
-      DataTable ageDistribution = null;
-      ResultCollection results = ResultsParameter.ActualValue;
-      string description = "Shows the age distributions in the current population.";
-      if (results.ContainsKey(HistogramName)) {
-        ageDistribution = results[HistogramName].Value as DataTable;
-      } else {
-        ageDistribution = new DataTable("Population Age Distribution", description);
-        ageDistribution.VisualProperties.XAxisTitle = AgeParameter.ActualName;
-        ageDistribution.VisualProperties.YAxisTitle = "Frequency";
-        results.Add(new Result(HistogramName, description, ageDistribution));
-      }
-      DataRow row;
-      if (!ageDistribution.Rows.TryGetValue("AgeDistribution", out row)) {
-        row = new DataRow("AgeDistribution");
-        row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
-        ageDistribution.Rows.Add(row);
-      }
-      var ages = AgeParameter.ActualValue;
-      row.Values.Replace(ages.Select(x => (double)x.Value));
-
-      if (StoreHistory) {
-        string historyResultName = HistogramName + " History";
-        DataTableHistory adHistory = null;
-        if (results.ContainsKey(historyResultName)) {
-          adHistory = results[historyResultName].Value as DataTableHistory;
-        } else {
-          adHistory = new DataTableHistory();
-          results.Add(new Result(historyResultName, adHistory));
-        }
-        DataTable table = (DataTable)ageDistribution.Clone();
-        IntValue iteration = IterationsParameter.ActualValue;
-        if (iteration != null) {
-          string iterationName = IterationsParameter.ActualName;
-          if (iterationName.EndsWith("s")) iterationName = iterationName.Remove(iterationName.Length - 1);
-          string appendix = " at " + iterationName + " " + iteration.Value.ToString();
-          table.Name += appendix;
-          table.Rows["AgeDistribution"].VisualProperties.DisplayName += appendix;
-        }
-        adHistory.Add(table);
-      }
-      return base.Apply();
-    }
-  }
-}
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs	(revision 11619)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs	(revision 11620)
@@ -21,4 +21,6 @@
 
 using System;
+using System.Collections;
+using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Analysis;
@@ -359,4 +361,25 @@
       ParameterizeSelectors();
     }
+    private void AgeGapParameter_ValueChanged(object sender, EventArgs e) {
+      AgeGap.ValueChanged += AgeGap_ValueChanged;
+      RecalculateAgeLimits();
+    }
+    private void AgeGap_ValueChanged(object sender, EventArgs e) {
+      RecalculateAgeLimits();
+    }
+    private void AgingSchemeParameter_ValueChanged(object sender, EventArgs e) {
+      AgingScheme.ValueChanged += AgingScheme_ValueChanged;
+      RecalculateAgeLimits();
+    }
+    private void AgingScheme_ValueChanged(object sender, EventArgs e) {
+      RecalculateAgeLimits();
+    }
+    private void NumberOfLayersParameter_ValueChanged(object sender, EventArgs e) {
+      NumberOfLayers.ValueChanged += NumberOfLayers_ValueChanged;
+      RecalculateAgeLimits();
+    }
+    private void NumberOfLayers_ValueChanged(object sender, EventArgs e) {
+      RecalculateAgeLimits();
+    }
     #endregion
 
@@ -369,4 +392,10 @@
       if (Problem != null)
         Problem.Evaluator.QualityParameter.ActualNameChanged += Evaluator_QualityParameter_ActualNameChanged;
+      AgeGapParameter.ValueChanged += AgeGapParameter_ValueChanged;
+      AgeGap.ValueChanged += AgeGap_ValueChanged;
+      AgingSchemeParameter.ValueChanged += AgingSchemeParameter_ValueChanged;
+      AgingScheme.ValueChanged += AgingScheme_ValueChanged;
+      NumberOfLayersParameter.ValueChanged += NumberOfLayersParameter_ValueChanged;
+      NumberOfLayers.ValueChanged += NumberOfLayers_ValueChanged;
     }
     private void ParameterizeSolutionsCreator() {
@@ -450,5 +479,4 @@
       }
     }
-
     #endregion
 
@@ -497,4 +525,42 @@
     }
     #endregion
+
+    private void RecalculateAgeLimits() {
+      IEnumerable<int> scheme;
+      switch (AgingScheme.Value) {
+        case AgingSchemes.Linear: scheme = LinearAgingScheme(); break;
+        case AgingSchemes.Fibonacci: scheme = FibonacciAgingScheme(); break;
+        case AgingSchemes.Polynomial: scheme = PolynomialAgingScheme(2); break;
+        case AgingSchemes.Exponential: scheme = ExponentialAgingScheme(2); break;
+        default: throw new NotSupportedException("Aging Scheme " + AgingScheme.Value + " is not supported.");
+      }
+
+      int ageGap = AgeGap.Value;
+      AgeLimits = new IntArray(scheme.Select(a => a * ageGap).Take(NumberOfLayers.Value).ToArray());
+    }
+
+    // 1 2 3 4 5 6 7
+    private static IEnumerable<int> LinearAgingScheme() {
+      for (int i = 0; ; i++)
+        yield return i + 1;
+    }
+    // 1 2 3 5 8 13 21
+    private static IEnumerable<int> FibonacciAgingScheme() {
+      for (int i = 1, next = 2, temp; ; temp = next, next = i + next, i = temp)
+        yield return i;
+    }
+    // (n^2): 1 2 4 9 16 25 36
+    private static IEnumerable<int> PolynomialAgingScheme(double exp) {
+      yield return 1;
+      yield return 2;
+      for (int i = 2; ; i++)
+        yield return (int)Math.Pow(i, exp);
+
+    }
+    // 1 2 4 8 16 32 64
+    private static IEnumerable<int> ExponentialAgingScheme(double @base) {
+      for (int i = 0; ; i++)
+        yield return (int)Math.Pow(@base, i);
+    }
   }
 }
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj	(revision 11619)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj	(revision 11620)
@@ -78,5 +78,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="AgeDiversityAnalyzer.cs" />
+    <Compile Include="AgeDistributionAnalyzer.cs" />
     <Compile Include="AgingScheme.cs" />
     <Compile Include="AlpsGeneticAlgorithm.cs" />
