Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/HeuristicLab.Problems.Programmable.Views-3.3.csproj
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/HeuristicLab.Problems.Programmable.Views-3.3.csproj	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/HeuristicLab.Problems.Programmable.Views-3.3.csproj	(revision 11813)
@@ -40,8 +40,7 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="HeuristicLab.CodeEditor-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+    <Reference Include="HeuristicLab.CodeEditor-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.CodeEditor-3.3.dll</HintPath>
-      <Private>False</Private>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.CodeEditor-3.4.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 11813)
@@ -148,6 +148,6 @@
     <Compile Include="Interfaces\IEncodingOperator.cs" />
     <Compile Include="Interfaces\ISingleObjectiveMoveOperator.cs" />
-    <Compile Include="New\ProgrammableProblem.cs" />
-    <Compile Include="New\MultiObjectiveProgrammableProblem.cs" />
+    <Compile Include="New\BasicProblem.cs" />
+    <Compile Include="New\MultiObjectiveBasicProblem.cs" />
     <Compile Include="New\MultiObjectiveScriptableProblem.cs" />
     <Compile Include="New\Scripts\Templates\CompiledMultiObjectiveProblemDefinition.cs" />
@@ -175,5 +175,5 @@
     <Compile Include="New\Scripts\ProblemDefinitionScript.cs" />
     <Compile Include="New\OneMaxNew.cs" />
-    <Compile Include="New\SingleObjectiveProgrammableProblem.cs" />
+    <Compile Include="New\SingleObjectiveBasicProblem.cs" />
     <Compile Include="New\SingleObjectiveScriptableProblem.cs" />
     <Compile Include="New\Scripts\MultiObjectiveProblemDefinitionScript.cs" />
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/Individual.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/Individual.cs	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/Individual.cs	(revision 11813)
@@ -40,4 +40,5 @@
 
     public abstract IItem this[string name] { get; set; }
+    public abstract TEncoding GetEncoding<TEncoding>() where TEncoding : class, IEncoding;
 
     public Individual Copy() {
@@ -62,12 +63,31 @@
   #region extension methods
   public static class IndividualExtensionMethods {
+    public static BinaryVector BinaryVector(this Individual individual) {
+      var encoding = individual.GetEncoding<BinaryEncoding>();
+      return individual.BinaryVector(encoding.Name);
+    }
     public static BinaryVector BinaryVector(this Individual individual, string name) {
       return (BinaryVector)individual[name];
+    }
+
+    public static IntegerVector IntegerVector(this Individual individual) {
+      var encoding = individual.GetEncoding<IntegerEncoding>();
+      return individual.IntegerVector(encoding.Name);
     }
     public static IntegerVector IntegerVector(this Individual individual, string name) {
       return (IntegerVector)individual[name];
     }
+
+    public static Permutation Permutation(this Individual individual) {
+      var encoding = individual.GetEncoding<PermutationEncoding>();
+      return individual.Permutation(encoding.Name);
+    }
     public static Permutation Permutation(this Individual individual, string name) {
       return (Permutation)individual[name];
+    }
+
+    public static RealVector RealVector(this Individual individual) {
+      var encoding = individual.GetEncoding<RealEncoding>();
+      return individual.RealVector(encoding.Name);
     }
     public static RealVector RealVector(this Individual individual, string name) {
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/MultiEncodingIndividual.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/MultiEncodingIndividual.cs	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/MultiEncodingIndividual.cs	(revision 11813)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 
@@ -46,13 +47,25 @@
     public override IItem this[string name] {
       get {
-        var individual = individuals.FirstOrDefault(i => i.Name == name);
+        var individual = individuals.SingleOrDefault(i => i.Name == name);
         if (individual == null) throw new ArgumentException(string.Format("{0} is not part of the specified encoding.", name));
         return individual[name];
       }
       set {
-        var individual = individuals.FirstOrDefault(i => i.Name == name);
+        var individual = individuals.SingleOrDefault(i => i.Name == name);
         if (individual == null) throw new ArgumentException(string.Format("{0} is not part of the specified encoding.", name));
         individual[name] = value;
       }
+    }
+
+    public override TEncoding GetEncoding<TEncoding>() {
+      TEncoding encoding;
+      try {
+        encoding = (TEncoding)Encoding.Encodings.SingleOrDefault(e => e is TEncoding);
+      }
+      catch (InvalidOperationException) {
+        throw new InvalidOperationException(string.Format("The individual uses multiple {0} .", typeof(TEncoding).GetPrettyName()));
+      }
+      if (encoding == null) throw new InvalidOperationException(string.Format("The individual does not use a {0}.", typeof(TEncoding).GetPrettyName()));
+      return encoding;
     }
 
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/SingleEncodingIndividual.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/SingleEncodingIndividual.cs	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Individuals/SingleEncodingIndividual.cs	(revision 11813)
@@ -21,4 +21,5 @@
 
 using System;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 
@@ -42,4 +43,10 @@
     }
 
+    public override TEncoding GetEncoding<TEncoding>() {
+      TEncoding encoding = Encoding as TEncoding;
+      if (encoding == null) throw new InvalidOperationException(string.Format("The individual does not use a {0}.", typeof(TEncoding).GetPrettyName()));
+      return encoding;
+    }
+
     internal override Individual Copy(IScope scope) {
       SetScopeValue(Name, scope, (IItem)this[Name].Clone());
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/BasicProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/BasicProblem.cs	(revision 11813)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/BasicProblem.cs	(revision 11813)
@@ -0,0 +1,148 @@
+﻿#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;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [StorableClass]
+  public abstract class ProgrammableProblem<TEncoding, TEvaluator> : HeuristicOptimizationProblem<TEvaluator, ISolutionCreator>, IProblemDefinition, IStorableContent
+    where TEncoding : class, IEncoding
+    where TEvaluator : class, IEvaluator {
+
+    public string Filename { get; set; }
+
+    protected IValueParameter<TEncoding> EncodingParameter {
+      get { return (IValueParameter<TEncoding>)Parameters["Encoding"]; }
+    }
+
+    //mkommend necessary for reuse of operators if the encoding changes
+    private TEncoding oldEncoding;
+
+    IEncoding IProblemDefinition.Encoding { get { return Encoding; } }
+    public TEncoding Encoding {
+      get { return EncodingParameter.Value; }
+      protected set {
+        if (value == null) throw new ArgumentNullException("Encoding must not be null.");
+        EncodingParameter.Value = value;
+      }
+    }
+
+    protected override IEnumerable<IItem> GetOperators() {
+      if (Encoding == null) return base.GetOperators();
+      return base.GetOperators().Concat(Encoding.Operators);
+    }
+    public override IEnumerable<IParameterizedItem> ExecutionContextItems {
+      get {
+        if (Encoding == null) return base.ExecutionContextItems;
+        return base.ExecutionContextItems.Concat(new[] { Encoding });
+      }
+    }
+
+    protected ProgrammableProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<TEncoding>("Encoding", "Describes the configuration of the encoding, what the variables are called, what type they are and their bounds if any."));
+      oldEncoding = Encoding;
+      RegisterEvents();
+    }
+
+    protected ProgrammableProblem(ProgrammableProblem<TEncoding, TEvaluator> original, Cloner cloner)
+      : base(original, cloner) {
+      oldEncoding = cloner.Clone(original.oldEncoding);
+      RegisterEvents();
+    }
+
+    [StorableConstructor]
+    protected ProgrammableProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      oldEncoding = Encoding;
+      RegisterEvents();
+    }
+
+    private void RegisterEvents() {
+      EncodingParameter.ValueChanged += (o, e) => OnEncodingChanged();
+    }
+
+    protected virtual void OnEncodingChanged() {
+      if (oldEncoding != null) AdaptEncodingOperators(oldEncoding, Encoding);
+      oldEncoding = Encoding;
+
+      foreach (var op in Operators.OfType<IEncodingOperator>())
+        op.EncodingParameter.ActualName = EncodingParameter.Name;
+
+      var solutionCreatorType = Encoding.GetType().BaseType.GetGenericArguments();
+      var paramType = typeof(ValueParameter<>).MakeGenericType(solutionCreatorType);
+      var solutionCreatorParam = (IParameter)Activator.CreateInstance(paramType, SolutionCreatorParameter.Name, SolutionCreatorParameter.Description,
+        Encoding.SolutionCreator);
+      Parameters.Remove(SolutionCreatorParameter);
+      Parameters.Add(solutionCreatorParam);
+
+      //TODO register solution creator changed event, change access modifier to private
+      //((IValueParameter)solutionCreatorParam).ValueChanged += SolutionCreatorParameter_ValueChanged;      
+
+      OnOperatorsChanged();
+      OnReset();
+    }
+
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      Encoding.SolutionCreator = SolutionCreator;
+    }
+
+    private static void AdaptEncodingOperators(IEncoding oldEncoding, IEncoding newEncoding) {
+      if (oldEncoding.GetType() != newEncoding.GetType()) return;
+
+      if (oldEncoding.GetType() == typeof(MultiEncoding)) {
+        var oldMultiEncoding = (MultiEncoding)oldEncoding;
+        var newMultiEncoding = (MultiEncoding)newEncoding;
+        if (!oldMultiEncoding.Encodings.SequenceEqual(newMultiEncoding.Encodings, new TypeEqualityComparer<IEncoding>())) return;
+
+        var nestedEncodings = oldMultiEncoding.Encodings.Zip(newMultiEncoding.Encodings, (o, n) => new { oldEnc = o, newEnc = n });
+        foreach (var multi in nestedEncodings)
+          AdaptEncodingOperators(multi.oldEnc, multi.newEnc);
+
+        foreach (var op in oldMultiEncoding.Operators.OfType<IMultiEncodingOperator>())
+          foreach (var multi in nestedEncodings)
+            op.ReplaceEncoding(multi.oldEnc, multi.newEnc);
+      }
+
+      var comparer = new TypeEqualityComparer<IOperator>();
+      var cloner = new Cloner();
+      var oldOperators = oldEncoding.Operators;
+      var newOperators = newEncoding.Operators;
+
+
+      var operators = oldOperators.Intersect(newOperators, comparer).Select(op => cloner.Clone(op));
+      operators = operators.Union(newOperators, comparer);
+
+      newEncoding.ConfigureOperators(operators);
+      newEncoding.Operators = operators;
+    }
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveBasicProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveBasicProblem.cs	(revision 11813)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveBasicProblem.cs	(revision 11813)
@@ -0,0 +1,88 @@
+﻿#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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [StorableClass]
+  public abstract class MultiObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, MultiObjectiveEvaluator>, IMultiObjectiveHeuristicOptimizationProblem, IMultiObjectiveProblemDefinition
+  where TEncoding : class, IEncoding {
+    [StorableConstructor]
+    protected MultiObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+
+    protected MultiObjectiveProgrammableProblem(MultiObjectiveProgrammableProblem<TEncoding> original, Cloner cloner)
+      : base(original, cloner) {
+      ParameterizeOperators();
+    }
+
+    protected MultiObjectiveProgrammableProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", new BoolArray()));
+
+      Operators.Add(Evaluator);
+      Operators.Add(new MultiObjectiveAnalyzer());
+
+      ParameterizeOperators();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      ParameterizeOperators();
+    }
+
+    public abstract bool[] Maximization { get; }
+    public abstract double[] Evaluate(Individual individual, IRandom random);
+    public virtual void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) { }
+
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      Parameters["Maximization"].ActualValue = new BoolArray(Maximization);
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeOperators() {
+      foreach (var op in Operators.OfType<IMultiObjectiveEvaluationOperator>())
+        op.EvaluateFunc = Evaluate;
+      foreach (var op in Operators.OfType<IMultiObjectiveAnalysisOperator>())
+        op.AnalyzeAction = Analyze;
+    }
+
+
+    #region IMultiObjectiveHeuristicOptimizationProblem Members
+    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return Parameters["Maximization"]; }
+    }
+    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+    #endregion
+  }
+}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs	(revision 11812)
+++ 	(revision )
@@ -1,88 +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.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [StorableClass]
-  public abstract class MultiObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, MultiObjectiveEvaluator>, IMultiObjectiveHeuristicOptimizationProblem, IMultiObjectiveProblemDefinition
-  where TEncoding : class, IEncoding {
-    [StorableConstructor]
-    protected MultiObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
-
-    protected MultiObjectiveProgrammableProblem(MultiObjectiveProgrammableProblem<TEncoding> original, Cloner cloner)
-      : base(original, cloner) {
-      ParameterizeOperators();
-    }
-
-    protected MultiObjectiveProgrammableProblem()
-      : base() {
-      Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", new BoolArray()));
-
-      Operators.Add(Evaluator);
-      Operators.Add(new MultiObjectiveAnalyzer());
-
-      ParameterizeOperators();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      ParameterizeOperators();
-    }
-
-    public abstract bool[] Maximization { get; }
-    public abstract double[] Evaluate(Individual individual, IRandom random);
-    public virtual void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) { }
-
-    protected override void OnEncodingChanged() {
-      base.OnEncodingChanged();
-      Parameters["Maximization"].ActualValue = new BoolArray(Maximization);
-    }
-
-    protected override void OnEvaluatorChanged() {
-      base.OnEvaluatorChanged();
-      ParameterizeOperators();
-    }
-
-    private void ParameterizeOperators() {
-      foreach (var op in Operators.OfType<IMultiObjectiveEvaluationOperator>())
-        op.EvaluateFunc = Evaluate;
-      foreach (var op in Operators.OfType<IMultiObjectiveAnalysisOperator>())
-        op.AnalyzeAction = Analyze;
-    }
-
-
-    #region IMultiObjectiveHeuristicOptimizationProblem Members
-    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
-      get { return Parameters["Maximization"]; }
-    }
-    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
-      get { return Evaluator; }
-    }
-    #endregion
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs	(revision 11812)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/OneMaxNew.cs	(revision 11813)
@@ -21,6 +21,9 @@
 
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -37,4 +40,6 @@
       : base() {
       Encoding = new BinaryEncoding("BinaryVector", 10);
+      var bestScopeSolutionAnalyzer = Operators.OfType<BestScopeSolutionAnalyzer>().FirstOrDefault();
+      if (bestScopeSolutionAnalyzer != null) Operators.Remove(bestScopeSolutionAnalyzer);
     }
 
@@ -47,8 +52,15 @@
     }
     public override double Evaluate(Individual individual, IRandom random) {
-      return individual.BinaryVector("BinaryVector").Count(b => b);
+      return individual.BinaryVector().Count(b => b);
     }
 
-
+    public override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
+      base.Analyze(individuals, qualities, results);
+      var best = individuals.Zip(qualities, (i, q) => new { Individual = i, Quality = q }).OrderByDescending(z => z.Quality).First();
+      if (!results.ContainsKey("Best Solution")) {
+        results.Add(new Result("Best Solution", typeof(BinaryVector)));
+      }
+      results["Best Solution"].Value = best.Individual.BinaryVector();
+    }
   }
 }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs	(revision 11812)
+++ 	(revision )
@@ -1,146 +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;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [StorableClass]
-  public abstract class ProgrammableProblem<TEncoding, TEvaluator> : HeuristicOptimizationProblem<TEvaluator, ISolutionCreator>, IProblemDefinition, IStorableContent
-    where TEncoding : class, IEncoding
-    where TEvaluator : class, IEvaluator {
-
-    public string Filename { get; set; }
-
-    protected IValueParameter<TEncoding> EncodingParameter {
-      get { return (IValueParameter<TEncoding>)Parameters["Encoding"]; }
-    }
-
-    //mkommend necessary for reuse of operators if the encoding changes
-    private TEncoding oldEncoding;
-
-    IEncoding IProblemDefinition.Encoding { get { return Encoding; } }
-    public TEncoding Encoding {
-      get { return EncodingParameter.Value; }
-      protected set {
-        if (value == null) throw new ArgumentNullException("Encoding must not be null.");
-        EncodingParameter.Value = value;
-      }
-    }
-
-    protected override IEnumerable<IItem> GetOperators() {
-      if (Encoding == null) return base.GetOperators();
-      return base.GetOperators().Concat(Encoding.Operators);
-    }
-    public override IEnumerable<IParameterizedItem> ExecutionContextItems {
-      get {
-        if (Encoding == null) return base.ExecutionContextItems;
-        return base.ExecutionContextItems.Concat(new[] { Encoding });
-      }
-    }
-
-    protected ProgrammableProblem()
-      : base() {
-      Parameters.Add(new ValueParameter<TEncoding>("Encoding", "Describes the configuration of the encoding, what the variables are called, what type they are and their bounds if any."));
-      oldEncoding = Encoding;
-      RegisterEvents();
-    }
-
-    protected ProgrammableProblem(ProgrammableProblem<TEncoding, TEvaluator> original, Cloner cloner)
-      : base(original, cloner) {
-      oldEncoding = cloner.Clone(original.oldEncoding);
-      RegisterEvents();
-    }
-
-    [StorableConstructor]
-    protected ProgrammableProblem(bool deserializing) : base(deserializing) { }
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      oldEncoding = Encoding;
-      RegisterEvents();
-    }
-
-    private void RegisterEvents() {
-      EncodingParameter.ValueChanged += (o, e) => OnEncodingChanged();
-    }
-
-    protected virtual void OnEncodingChanged() {
-      if (oldEncoding != null) AdaptEncodingOperators(oldEncoding, Encoding);
-      oldEncoding = Encoding;
-
-      foreach (var op in Operators.OfType<IEncodingOperator>())
-        op.EncodingParameter.ActualName = EncodingParameter.Name;
-
-      var solutionCreatorType = Encoding.GetType().BaseType.GetGenericArguments();
-      var paramType = typeof(ValueParameter<>).MakeGenericType(solutionCreatorType);
-      var solutionCreatorParam = (IParameter)Activator.CreateInstance(paramType, SolutionCreatorParameter.Name, SolutionCreatorParameter.Description,
-        Encoding.SolutionCreator);
-      Parameters.Remove(SolutionCreatorParameter);
-      Parameters.Add(solutionCreatorParam);
-
-      //TODO register solution creator changed event
-
-      OnOperatorsChanged();
-      OnReset();
-    }
-
-    protected override void OnSolutionCreatorChanged() {
-      base.OnSolutionCreatorChanged();
-      Encoding.SolutionCreator = SolutionCreator;
-    }
-
-    private static void AdaptEncodingOperators(IEncoding oldEncoding, IEncoding newEncoding) {
-      if (oldEncoding.GetType() != newEncoding.GetType()) return;
-
-      if (oldEncoding.GetType() == typeof(MultiEncoding)) {
-        var oldMultiEncoding = (MultiEncoding)oldEncoding;
-        var newMultiEncoding = (MultiEncoding)newEncoding;
-        if (!oldMultiEncoding.Encodings.SequenceEqual(newMultiEncoding.Encodings, new TypeEqualityComparer<IEncoding>())) return;
-
-        var nestedEncodings = oldMultiEncoding.Encodings.Zip(newMultiEncoding.Encodings, (o, n) => new { oldEnc = o, newEnc = n });
-        foreach (var multi in nestedEncodings)
-          AdaptEncodingOperators(multi.oldEnc, multi.newEnc);
-
-        foreach (var op in oldMultiEncoding.Operators.OfType<IMultiEncodingOperator>())
-          foreach (var multi in nestedEncodings)
-            op.ReplaceEncoding(multi.oldEnc, multi.newEnc);
-      }
-
-      var comparer = new TypeEqualityComparer<IOperator>();
-      var oldOperators = oldEncoding.Operators;
-      var newOperators = newEncoding.Operators;
-
-      var operators = oldOperators.Intersect(newOperators, comparer);
-      //TODO clone overlapping operators
-      operators = operators.Union(newOperators, comparer);
-
-      newEncoding.ConfigureOperators(operators);
-      newEncoding.Operators = operators;
-    }
-
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveBasicProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveBasicProblem.cs	(revision 11813)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveBasicProblem.cs	(revision 11813)
@@ -0,0 +1,106 @@
+﻿#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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [StorableClass]
+  public abstract class SingleObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, SingleObjectiveEvaluator>,
+    ISingleObjectiveProblemDefinition, ISingleObjectiveHeuristicOptimizationProblem
+  where TEncoding : class, IEncoding {
+    [StorableConstructor]
+    protected SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+
+    protected SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem<TEncoding> original, Cloner cloner)
+      : base(original, cloner) {
+      ParameterizeOperators();
+    }
+
+    protected SingleObjectiveProgrammableProblem()
+      : base() {
+      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue()));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem."));
+
+      Operators.Add(Evaluator);
+      Operators.Add(new BestScopeSolutionAnalyzer());
+      Operators.Add(new SingleObjectiveAnalyzer());
+      Operators.Add(new SingleObjectiveImprover());
+      Operators.Add(new SingleObjectiveMoveEvaluator());
+      Operators.Add(new SingleObjectiveMoveGenerator());
+      Operators.Add(new SingleObjectiveMoveMaker());
+
+      ParameterizeOperators();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      ParameterizeOperators();
+    }
+
+    public abstract bool Maximization { get; }
+    public abstract double Evaluate(Individual individual, IRandom random);
+    public virtual void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) { }
+    public virtual IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
+      return Enumerable.Empty<Individual>();
+    }
+
+
+    protected override void OnEncodingChanged() {
+      base.OnEncodingChanged();
+      var max = (BoolValue)Parameters["Maximization"].ActualValue;
+      max.Value = Maximization;
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeOperators() {
+      foreach (var op in Operators.OfType<ISingleObjectiveEvaluationOperator>())
+        op.EvaluateFunc = Evaluate;
+      foreach (var op in Operators.OfType<ISingleObjectiveAnalysisOperator>())
+        op.AnalyzeAction = Analyze;
+      foreach (var op in Operators.OfType<INeighborBasedOperator>())
+        op.GetNeighborsFunc = GetNeighbors;
+    }
+
+    #region ISingleObjectiveHeuristicOptimizationProblem Members
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return Parameters["Maximization"]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
+      get { return Parameters["BestKnownQuality"]; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+    #endregion
+  }
+}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs	(revision 11812)
+++ 	(revision )
@@ -1,106 +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.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.Programmable {
-  [StorableClass]
-  public abstract class SingleObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, SingleObjectiveEvaluator>,
-    ISingleObjectiveProblemDefinition, ISingleObjectiveHeuristicOptimizationProblem
-  where TEncoding : class, IEncoding {
-    [StorableConstructor]
-    protected SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
-
-    protected SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem<TEncoding> original, Cloner cloner)
-      : base(original, cloner) {
-      ParameterizeOperators();
-    }
-
-    protected SingleObjectiveProgrammableProblem()
-      : base() {
-      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue()));
-      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem."));
-
-      Operators.Add(Evaluator);
-      Operators.Add(new BestScopeSolutionAnalyzer());
-      Operators.Add(new SingleObjectiveAnalyzer());
-      Operators.Add(new SingleObjectiveImprover());
-      Operators.Add(new SingleObjectiveMoveEvaluator());
-      Operators.Add(new SingleObjectiveMoveGenerator());
-      Operators.Add(new SingleObjectiveMoveMaker());
-
-      ParameterizeOperators();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      ParameterizeOperators();
-    }
-
-    public abstract bool Maximization { get; }
-    public abstract double Evaluate(Individual individual, IRandom random);
-    public virtual void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) { }
-    public virtual IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
-      return Enumerable.Empty<Individual>();
-    }
-
-
-    protected override void OnEncodingChanged() {
-      base.OnEncodingChanged();
-      var max = (BoolValue)Parameters["Maximization"].ActualValue;
-      max.Value = Maximization;
-    }
-
-    protected override void OnEvaluatorChanged() {
-      base.OnEvaluatorChanged();
-      ParameterizeOperators();
-    }
-
-    private void ParameterizeOperators() {
-      foreach (var op in Operators.OfType<ISingleObjectiveEvaluationOperator>())
-        op.EvaluateFunc = Evaluate;
-      foreach (var op in Operators.OfType<ISingleObjectiveAnalysisOperator>())
-        op.AnalyzeAction = Analyze;
-      foreach (var op in Operators.OfType<INeighborBasedOperator>())
-        op.GetNeighborsFunc = GetNeighbors;
-    }
-
-    #region ISingleObjectiveHeuristicOptimizationProblem Members
-    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
-      get { return Parameters["Maximization"]; }
-    }
-    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
-      get { return Parameters["BestKnownQuality"]; }
-    }
-    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
-      get { return Evaluator; }
-    }
-    #endregion
-  }
-}
