Index: /branches/HeuristicLab.MetaOptimization/HeuristicLab.MetaOptimization.Test/Program.cs
===================================================================
--- /branches/HeuristicLab.MetaOptimization/HeuristicLab.MetaOptimization.Test/Program.cs	(revision 5356)
+++ /branches/HeuristicLab.MetaOptimization/HeuristicLab.MetaOptimization.Test/Program.cs	(revision 5357)
@@ -39,5 +39,5 @@
     static void Main(string[] args) {
       ContentManager.Initialize(new PersistenceContentManager());
-
+      
       //TestTableBuilder();
       //TestShorten();
@@ -51,5 +51,5 @@
       //TestCombinations3();
       //TestEnumeratorCollectionEnumerator();
-      //TestCombinations4();
+      //TestCombinations4(); return;
       //TestAlgorithmPerformanceIssue();
       //TestWaitAny();
@@ -566,8 +566,8 @@
       });
 
-      ConfigurePopulationSize(algorithmVc, 12, 100, 1);
+      ConfigurePopulationSize(algorithmVc, 0, 20, 1);
       //ConfigureMutationRate(algorithmVc, 0.0, 1.0, 0.01);
       //ConfigureMutationOperator(algorithmVc);
-      ConfigureElites(algorithmVc, 0, 10, 1);
+      ConfigureElites(algorithmVc, 0, 30, 1);
       //ConfigureSelectionOperator(algorithmVc, true);
       return algorithmVc;
Index: /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterCombinationsEnumerator.cs
===================================================================
--- /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterCombinationsEnumerator.cs	(revision 5356)
+++ /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterCombinationsEnumerator.cs	(revision 5357)
@@ -109,4 +109,5 @@
             }
           }
+          enumerators.Reverse(); // this makes the list of combinations better readable
         }
       }
Index: /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ValueConfiguration.cs
===================================================================
--- /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ValueConfiguration.cs	(revision 5356)
+++ /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/ValueConfiguration.cs	(revision 5357)
@@ -214,12 +214,10 @@
       get {
         StringBuilder sb = new StringBuilder();
-        if (this.Optimize) {
-          if (this.ParameterConfigurations.Count > 0) {
-            var parameterInfos = new List<string>();
-            foreach (var pc in this.ParameterConfigurations) {
-              if (pc.Optimize) parameterInfos.Add(pc.ParameterInfoString);
-            }
-            sb.Append(string.Join(", ", parameterInfos.ToArray()));
-          }
+        if (this.Optimize && this.ParameterConfigurations.Count > 0) {
+          var parameterInfos = new List<string>();
+          foreach (var pc in this.ParameterConfigurations) {
+            if (pc.Optimize) parameterInfos.Add(pc.ParameterInfoString);
+          }
+          sb.Append(string.Join(", ", parameterInfos.ToArray()));
         }
         return sb.ToString();
@@ -273,6 +271,6 @@
       var list = new List<IOptimizable>();
       foreach (var pc in ParameterConfigurations) {
-        if(pc.Optimize) {
-          if(pc.ValueConfigurations.CheckedItems.Count() > 1) list.Add(pc); // only add if there are more than 1 choices. otherwise it makes no sense to optimize which VC is selected
+        if (pc.Optimize) {
+          if (pc.ValueConfigurations.CheckedItems.Count() > 1) list.Add(pc); // only add if there are more than 1 choices. otherwise it makes no sense to optimize which VC is selected
           list.AddRange(pc.GetAllOptimizables());
         }
Index: /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/ParameterConfigurationEvaluator.cs
===================================================================
--- /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/ParameterConfigurationEvaluator.cs	(revision 5356)
+++ /branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/ParameterConfigurationEvaluator.cs	(revision 5357)
@@ -21,7 +21,8 @@
   [Item("ParameterConfigurationEvaluator", "A base class for operators which evaluate Meta Optimization solutions.")]
   [StorableClass]
-  public class ParameterConfigurationEvaluator : SingleSuccessorOperator, IParameterConfigurationEvaluator {
-    private const double PenaltyQuality = 100000.0; // todo: use something better
-
+  public class ParameterConfigurationEvaluator : SingleSuccessorOperator, IParameterConfigurationEvaluator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
     public ILookupParameter<DoubleValue> QualityParameter {
       get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
@@ -56,4 +57,5 @@
     public ParameterConfigurationEvaluator()
       : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used to initialize the new random permutation."));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of the ParameterVector."));
       Parameters.Add(new LookupParameter<TypeValue>(MetaOptimizationProblem.AlgorithmTypeParameterName, "Missing description."));
@@ -76,4 +78,5 @@
 
     public override IOperation Apply() {
+      IRandom random = RandomParameter.ActualValue;
       ParameterConfigurationTree parameterConfiguration = ParameterConfigurationParameter.ActualValue;
       IAlgorithm algorithm = (IAlgorithm)Activator.CreateInstance(AlgorithmTypeParameter.ActualValue.Value);
@@ -87,5 +90,11 @@
         Console.WriteLine("Used Cache for {0}", parameterConfiguration.ParameterInfoString);
       } else {
-        runs = ExecuteAlgorithm(parameterConfiguration, algorithm, problems);
+        do {
+          runs = ExecuteAlgorithm(parameterConfiguration, algorithm, problems, Repetitions.Value, GenerationsParameter.ActualValue != null ? GenerationsParameter.ActualValue.Value : 0);
+          if (runs == null) {
+            Repair(parameterConfiguration, random);
+            parameterConfiguration.Parameterize(algorithm);
+          }
+        } while (runs == null);
       }
 
@@ -111,4 +120,12 @@
 
       return base.Apply();
+    }
+
+    /// <summary>
+    /// This method should repair an invalid parameterConfiguration.
+    /// The strategy is to just randomize parameter settings. It's not guaranteed to be a vaild setting
+    /// </summary>
+    private void Repair(ParameterConfigurationTree parameterConfiguration, IRandom random) {
+      parameterConfiguration.Randomize(random);
     }
 
@@ -127,5 +144,12 @@
     }
 
-    private RunCollection ExecuteAlgorithm(ParameterConfigurationTree parameterConfiguration, IAlgorithm algorithm, IItemList<IProblem> problems) {
+    /// <summary>
+    /// Executes an algorithm 
+    /// </summary>
+    /// <param name="parameterConfiguration"></param>
+    /// <param name="algorithm"></param>
+    /// <param name="problems"></param>
+    /// <returns></returns>
+    private static RunCollection ExecuteAlgorithm(ParameterConfigurationTree parameterConfiguration, IAlgorithm algorithm, IItemList<IProblem> problems, int repetitions, int currentGeneration) {
       IAlgorithm algorithmClone = (IAlgorithm)algorithm.Clone();
       var parameterNames = new List<string>();
@@ -145,5 +169,5 @@
         algorithmClone.Problem = (IProblem)problem.Clone();
 
-        for (int i = 0; i < Repetitions.Value; i++) {
+        for (int i = 0; i < repetitions; i++) {
           algorithmClone.Prepare();
 
@@ -152,6 +176,11 @@
 
           if (algorithmClone.ExecutionState == ExecutionState.Paused) {
-            // this parametercombination was bad. set penalty for this solution
-            // TODO!
+            // the parameter settings were invalid. 
+            // (1) set penalty for this solution. 
+            //     it's difficult to create penalty values for BestQuality and ExecutionTime. Maybe ReferenceQuality * X (but what about ExecutionTime?)
+            //     therefore use repair instead.
+            
+            // (2) repair and retry
+            return null;
           }
           int problemIndex = problems.IndexOf(problem) + 1;
@@ -159,5 +188,5 @@
           CleanRun(run, resultNames, parameterNames);
           run.Results.Add("Meta.FromCache", new BoolValue(false));
-          run.Results.Add("Meta.Generation", new IntValue(GenerationsParameter.ActualValue != null ? GenerationsParameter.ActualValue.Value : 0));
+          run.Results.Add("Meta.Generation", new IntValue(currentGeneration));
           run.Results.Add("Meta.ProblemIndex", new IntValue(problemIndex));
           int runCountOfThisProblem = algorithmClone.Runs.Where(x => ((IntValue)x.Results["Meta.ProblemIndex"]).Value == problemIndex).Count();
@@ -173,5 +202,5 @@
     /// only keep the results which are important and the parameters which were optimized
     /// </summary>
-    private void CleanRun(IRun run, IEnumerable<string> resultsToKeep, IEnumerable<string> parametersToKeep) {
+    private static void CleanRun(IRun run, IEnumerable<string> resultsToKeep, IEnumerable<string> parametersToKeep) {
       var resultsToRemove = new List<string>();
       var parametersToRemove = new List<string>();
