Index: branches/SimSharp/HeuristicLab.Problems.Programmable.Views/3.3/Plugin.cs.frame
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable.Views/3.3/Plugin.cs.frame	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable.Views/3.3/Plugin.cs.frame	(revision 10850)
@@ -25,5 +25,15 @@
   [Plugin("HeuristicLab.Problems.Programmable.Views", "Views for programmable problem for defining custom representation and evaluation function.", "3.3.9.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.Programmable.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Programmable", "3.3")]
+  [PluginDependency("HeuristicLab.Scripting", "3.3")]
+  [PluginDependency("HeuristicLab.Scripting.Views", "3.3")]
   public class HeuristicLabProblemsProgrammableViewsPlugin : PluginBase { }
 }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/BinaryParameterConfiguration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/BinaryParameterConfiguration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/BinaryParameterConfiguration.cs	(revision 10850)
@@ -0,0 +1,58 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("BinaryParameterConfiguration", "")]
+  [StorableClass]
+  public class BinaryParameterConfiguration : ParameterConfiguration {
+    [Storable]
+    private IntValue length;
+    public IntValue Length {
+      get { return length; }
+      set {
+        if (length == value) return;
+        length = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [StorableConstructor]
+    protected BinaryParameterConfiguration(bool deserializing) : base(deserializing) { }
+    protected BinaryParameterConfiguration(BinaryParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) {
+      length = cloner.Clone(original.length);
+    }
+    public BinaryParameterConfiguration(int length)
+      : base() {
+      this.length = new IntValue(length);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BinaryParameterConfiguration(this, cloner);
+    }
+
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/Configuration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/Configuration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/Configuration.cs	(revision 10850)
@@ -0,0 +1,101 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("Configuration", "")]
+  [StorableClass]
+  public class Configuration : Item {
+    [Storable]
+    public Dictionary<string, ParameterConfiguration> Parameters { get; protected set; }
+
+    [Storable]
+    public bool Maximization { get; protected set; }
+
+    [StorableConstructor]
+    protected Configuration(bool deserializing) : base(deserializing) { }
+    protected Configuration(Configuration original, Cloner cloner)
+      : base(original, cloner) {
+      if (original.Parameters != null) {
+        Parameters = new Dictionary<string, ParameterConfiguration>();
+        foreach (var kvp in original.Parameters) {
+          Parameters.Add(kvp.Key, cloner.Clone(kvp.Value));
+        }
+      }
+      Maximization = original.Maximization;
+    }
+    public Configuration() {
+      Parameters = new Dictionary<string, ParameterConfiguration>();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Configuration(this, cloner);
+    }
+
+
+    public Configuration AddBoolean(string name, int length) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new BinaryParameterConfiguration(length));
+      return this;
+    }
+
+    public Configuration AddInteger(string name, int length, int min, int max, int? step = null) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new IntegerParameterConfiguration(length, min, max, step));
+      return this;
+    }
+
+    public Configuration AddInteger(string name, int length, IList<int> min, IList<int> max, IList<int> step = null) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new IntegerParameterConfiguration(length, min, max, step));
+      return this;
+    }
+
+    public Configuration AddReal(string name, int length, double min, double max) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new RealParameterConfiguration(length, min, max));
+      return this;
+    }
+
+    public Configuration AddReal(string name, int length, IList<double> min, IList<double> max) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new RealParameterConfiguration(length, min, max));
+      return this;
+    }
+
+    public Configuration AddPermutation(string name, PermutationTypes type, int length) {
+      if (Parameters.ContainsKey(name)) throw new ArgumentException("name must be unique", "name");
+      Parameters.Add(name, new PermutationParameterConfiguration(length, type));
+      return this;
+    }
+
+    public Configuration SetMaximization(bool maximization) {
+      Maximization = maximization;
+      return this;
+    }
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/IntegerParameterConfiguration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/IntegerParameterConfiguration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/IntegerParameterConfiguration.cs	(revision 10850)
@@ -0,0 +1,93 @@
+﻿#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.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("IntegerParameterConfiguration", "")]
+  [StorableClass]
+  public class IntegerParameterConfiguration : ParameterConfiguration {
+    [Storable]
+    private IntValue length;
+    public IntValue Length {
+      get { return length; }
+      set {
+        if (length == value) return;
+        length = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [Storable]
+    private IntMatrix bounds;
+    public IntMatrix Bounds {
+      get { return bounds; }
+      set {
+        if (bounds == value) return;
+        bounds = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [StorableConstructor]
+    protected IntegerParameterConfiguration(bool deserializing) : base(deserializing) { }
+    protected IntegerParameterConfiguration(IntegerParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) {
+      length = cloner.Clone(original.length);
+      bounds = cloner.Clone(original.bounds);
+    }
+    public IntegerParameterConfiguration(int length, int min, int max, int? step = null)
+      : base() {
+      if (min >= max) throw new ArgumentException("min must be less than max", "min");
+      if (step.HasValue && step.Value <= 0) throw new ArgumentException("step must be greater than zero or null", "step");
+      this.length = new IntValue(length);
+      bounds = new IntMatrix(1, step.HasValue ? 3 : 2);
+      bounds[0, 0] = min;
+      bounds[0, 1] = max;
+      if (step.HasValue) bounds[0, 2] = step.Value;
+    }
+    public IntegerParameterConfiguration(int length, IList<int> min, IList<int> max, IList<int> step = null)
+      : base() {
+      if (min.Count == 0) throw new ArgumentException("Bounds must be given for the integer parameters.");
+      if (min.Count != max.Count) throw new ArgumentException("min must be of the same length as max", "min");
+      if (step != null && min.Count != step.Count) throw new ArgumentException("step must be of the same length as min or null", "step");
+      if (min.Zip(max, (m, M) => m >= M).Any()) throw new ArgumentException("min must be less than max in each dimension", "min");
+      this.length = new IntValue(length);
+      bounds = new IntMatrix(min.Count, step != null ? 3 : 2);
+      for (int i = 0; i < min.Count; i++) {
+        bounds[i, 0] = min[i];
+        bounds[i, 1] = max[i];
+        if (step != null) bounds[i, 2] = step[i];
+      }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IntegerParameterConfiguration(this, cloner);
+    }
+
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterConfiguration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterConfiguration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterConfiguration.cs	(revision 10850)
@@ -0,0 +1,44 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("ParameterConfiguration", "")]
+  [StorableClass]
+  public abstract class ParameterConfiguration : Item {
+    [StorableConstructor]
+    protected ParameterConfiguration(bool deserializing) : base(deserializing) { }
+    protected ParameterConfiguration(ParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) { }
+    protected ParameterConfiguration() { }
+
+
+    public event EventHandler ParameterConfigurationChanged;
+    protected virtual void OnParameterConfigurationChanged() {
+      var handler = ParameterConfigurationChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterVector.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterVector.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/ParameterVector.cs	(revision 10850)
@@ -0,0 +1,90 @@
+﻿#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.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.Programmable {
+  public class ParameterVector {
+    protected Dictionary<string, BinaryVector> BinaryParameters;
+    protected Dictionary<string, IntegerVector> IntegerParameters;
+    protected Dictionary<string, RealVector> RealParameters;
+    protected Dictionary<string, Permutation> PermutationParameters;
+
+    public ParameterVector(IEnumerable<KeyValuePair<string, BinaryVector>> binaryVectors = null,
+      IEnumerable<KeyValuePair<string, IntegerVector>> integerVectors = null,
+      IEnumerable<KeyValuePair<string, RealVector>> realVectors = null,
+      IEnumerable<KeyValuePair<string, Permutation>> permutations = null) {
+      if (binaryVectors != null) BinaryParameters = binaryVectors.ToDictionary(x => x.Key, x => x.Value);
+      if (integerVectors != null) IntegerParameters = integerVectors.ToDictionary(x => x.Key, x => x.Value);
+      if (realVectors != null) RealParameters = realVectors.ToDictionary(x => x.Key, x => x.Value);
+      if (permutations != null) PermutationParameters = permutations.ToDictionary(x => x.Key, x => x.Value);
+    }
+
+    public BinaryVector Binary(string name) {
+      return BinaryParameters[name];
+    }
+
+    public bool Binary(string name, int index) {
+      return BinaryParameters[name][index];
+    }
+
+    public IEnumerable<string> BinaryNames {
+      get { return BinaryParameters.Keys; }
+    }
+
+    public IntegerVector Integer(string name) {
+      return IntegerParameters[name];
+    }
+
+    public int Integer(string name, int index) {
+      return IntegerParameters[name][index];
+    }
+
+    public IEnumerable<string> IntegerNames {
+      get { return IntegerParameters.Keys; }
+    }
+
+    public RealVector Real(string name) {
+      return RealParameters[name];
+    }
+
+    public double Real(string name, int index) {
+      return RealParameters[name][index];
+    }
+
+    public IEnumerable<string> RealNames {
+      get { return RealParameters.Keys; }
+    }
+
+    public Permutation Permutation(string name) {
+      return PermutationParameters[name];
+    }
+
+    public IEnumerable<string> PermutationNames {
+      get { return PermutationParameters.Keys; }
+    }
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/PermutationParameterConfiguration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/PermutationParameterConfiguration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/PermutationParameterConfiguration.cs	(revision 10850)
@@ -0,0 +1,72 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("PermutationParameterConfiguration", "")]
+  [StorableClass]
+  public class PermutationParameterConfiguration : ParameterConfiguration {
+    [Storable]
+    private IntValue length;
+    public IntValue Length {
+      get { return length; }
+      set {
+        if (length == value) return;
+        length = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [Storable]
+    private PermutationType type;
+    public PermutationType Type {
+      get { return type; }
+      set {
+        if (type == value) return;
+        type = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [StorableConstructor]
+    protected PermutationParameterConfiguration(bool deserializing) : base(deserializing) { }
+    protected PermutationParameterConfiguration(PermutationParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) {
+      length = cloner.Clone(original.length);
+      type = cloner.Clone(original.type);
+    }
+    public PermutationParameterConfiguration(int length, PermutationTypes type)
+      : base() {
+      this.length = new IntValue(length);
+      this.type = new PermutationType(type);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PermutationParameterConfiguration(this, cloner);
+    }
+
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/RealParameterConfiguration.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/RealParameterConfiguration.cs	(revision 10850)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Datastructures/RealParameterConfiguration.cs	(revision 10850)
@@ -0,0 +1,89 @@
+﻿#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.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Programmable {
+  [Item("RealParameterConfiguration", "")]
+  [StorableClass]
+  public class RealParameterConfiguration : ParameterConfiguration {
+    [Storable]
+    private IntValue length;
+    public IntValue Length {
+      get { return length; }
+      set {
+        if (length == value) return;
+        length = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [Storable]
+    private DoubleMatrix bounds;
+    public DoubleMatrix Bounds {
+      get { return bounds; }
+      set {
+        if (bounds == value) return;
+        bounds = value;
+        OnParameterConfigurationChanged();
+      }
+    }
+
+    [StorableConstructor]
+    protected RealParameterConfiguration(bool deserializing) : base(deserializing) { }
+    protected RealParameterConfiguration(RealParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) {
+      length = cloner.Clone(original.length);
+      bounds = cloner.Clone(original.bounds);
+    }
+    public RealParameterConfiguration(int length, double min, double max)
+      : base() {
+      if (min >= max) throw new ArgumentException("min must be less than max", "min");
+      this.length = new IntValue(length);
+      bounds = new DoubleMatrix(1, 2);
+      bounds[0, 0] = min;
+      bounds[0, 1] = max;
+    }
+    public RealParameterConfiguration(int length, IList<double> min, IList<double> max)
+      : base() {
+      if (min.Count == 0) throw new ArgumentException("Bounds must be given for the real parameters.");
+      if (min.Count != max.Count) throw new ArgumentException("min must be of the same length as max", "min");
+      if (min.Zip(max, (m, M) => m >= M).Any()) throw new ArgumentException("min must be less than max in each dimension", "min");
+      this.length = new IntValue(length);
+      bounds = new DoubleMatrix(min.Count, 2);
+      for (int i = 0; i < min.Count; i++) {
+        bounds[i, 0] = min[i];
+        bounds[i, 1] = max[i];
+      }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealParameterConfiguration(this, cloner);
+    }
+
+  }
+}
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 10850)
@@ -136,4 +136,11 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Datastructures\PermutationParameterConfiguration.cs" />
+    <Compile Include="Datastructures\RealParameterConfiguration.cs" />
+    <Compile Include="Datastructures\IntegerParameterConfiguration.cs" />
+    <Compile Include="Datastructures\BinaryParameterConfiguration.cs" />
+    <Compile Include="Datastructures\Configuration.cs" />
+    <Compile Include="Datastructures\ParameterConfiguration.cs" />
+    <Compile Include="Datastructures\ParameterVector.cs" />
     <Compile Include="Interfaces\ISingleObjectiveProgrammableProblemEvaluator.cs" />
     <Compile Include="Operators\ParameterVectorManipulator.cs" />
@@ -151,10 +158,4 @@
     <None Include="Properties\AssemblyInfo.cs.frame" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.ParameterVector\HeuristicLab.Encodings.ParameterVectorEncoding-3.3.csproj">
-      <Project>{ba2b2335-ef06-473f-b06d-210f356f8ebd}</Project>
-      <Name>HeuristicLab.Encodings.ParameterVectorEncoding-3.3</Name>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCreater.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCreater.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCreater.cs	(revision 10850)
@@ -20,130 +20,23 @@
 #endregion
 
-using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.Programmable {
-  [Item("ParameterVectorCreater", "Creates a parameter vector as received from a SimOptRunner.")]
+  [Item("ParameterVectorCreater", "Contains solution creators that together create a multi-vector encoding.")]
   [StorableClass]
-  public class ParameterVectorCreater : SingleSuccessorOperator, IParameterVectorCreator, IStochasticOperator {
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    }
-
-    public ILookupParameter<ProgrammableProblemScript> ScriptParameter {
-      get { return (ILookupParameter<ProgrammableProblemScript>)Parameters["Script"]; }
-    }
-
-    public ILookupParameter<ParameterVector> ParameterVectorParameter {
-      get { return (ILookupParameter<ParameterVector>)Parameters["ParameterVector"]; }
-    }
-
-    #region Interface Implementations of Encoding-specific Creators
-    ILookupParameter<BinaryVector> IBinaryVectorCreator.BinaryVectorParameter {
-      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
-    }
-    IValueLookupParameter<IntValue> IBinaryVectorCreator.LengthParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["BinaryVectorLength"]; }
-    }
-
-    ILookupParameter<IntegerVector> IIntegerVectorCreator.IntegerVectorParameter {
-      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
-    }
-
-    IValueLookupParameter<IntMatrix> IBoundedIntegerVectorOperator.BoundsParameter {
-      get { return (IValueLookupParameter<IntMatrix>)Parameters["IntegerVectorBounds"]; }
-    }
-
-    IValueLookupParameter<IntValue> IIntegerVectorCreator.LengthParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["IntegerVectorLength"]; }
-    }
-
-    ILookupParameter<RealVector> IRealVectorCreator.RealVectorParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
-    }
-
-    IValueLookupParameter<DoubleMatrix> IRealVectorCreator.BoundsParameter {
-      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["RealVectorBounds"]; }
-    }
-
-    IValueLookupParameter<IntValue> IRealVectorCreator.LengthParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["RealVectorLength"]; }
-    }
-
-    ILookupParameter<Permutation> IPermutationCreator.PermutationParameter {
-      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
-    }
-
-    IValueParameter<PermutationType> IPermutationCreator.PermutationTypeParameter {
-      get { return (IValueParameter<PermutationType>)Parameters["PermutationType"]; }
-    }
-
-    IValueLookupParameter<IntValue> IPermutationCreator.LengthParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters["PermutationLength"]; }
-    }
-    #endregion
+  public class ParameterVectorCreater : InstrumentedOperator, ISolutionCreator {
 
     [StorableConstructor]
     protected ParameterVectorCreater(bool deserializing) : base(deserializing) { }
     protected ParameterVectorCreater(ParameterVectorCreater original, Cloner cloner) : base(original, cloner) { }
-    public ParameterVectorCreater() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
-      Parameters.Add(new LookupParameter<ProgrammableProblemScript>("Script", "The script that will execute the evaluation function and define the parameter vector."));
-      Parameters.Add(new LookupParameter<ParameterVector>("ParameterVector", "The vector that holds the parameters."));
-      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The binary vector that links into the parameter vector."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("BinaryVectorLength", "The length of the binary vector."));
-      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The integer vector that links into the parameter vector."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("IntegerVectorLength", "The length of the integer vector."));
-      Parameters.Add(new ValueLookupParameter<IntMatrix>("IntegerVectorBounds", "The bounds of the integer vector."));
-      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector that links into the parameter vector."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("RealVectorLength", "The length of the real vector."));
-      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("RealVectorBounds", "The bounds of the real vector."));
-      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation that links into the parameter vector."));
-      Parameters.Add(new ValueParameter<PermutationType>("PermutationType", "The type of the permutation."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("PermutationLength", "The length of the permutation."));
-    }
+    public ParameterVectorCreater() { }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new ParameterVectorCreater(this, cloner);
     }
-
-    public override IOperation Apply() {
-      var random = RandomParameter.ActualValue;
-      var runner = ScriptParameter.ActualValue;
-      if (runner.Instance == null) throw new InvalidOperationException("Script instance is null, maybe the code doesn't compile.");
-
-      var vector = runner.Instance.GetParametersToOptimize();
-      ParameterVectorParameter.ActualValue = vector;
-
-      if (vector.BooleanParameters != null) {
-        vector.BooleanParameters.Randomize(random);
-        ((IBinaryVectorCreator)this).BinaryVectorParameter.ActualValue = vector.BooleanParameters;
-      }
-      if (vector.IntegerParameters != null) {
-        vector.IntegerParameters.Randomize(random, vector.IntegerBounds);
-        ((IIntegerVectorCreator)this).IntegerVectorParameter.ActualValue = vector.IntegerParameters;
-      }
-      if (vector.RealParameters != null) {
-        vector.RealParameters.Randomize(random, vector.RealBounds);
-        ((IRealVectorCreator)this).RealVectorParameter.ActualValue = vector.RealParameters;
-      }
-      if (vector.PermutationParameter != null) {
-        vector.PermutationParameter.Randomize(random);
-        ((IPermutationCreator)this).PermutationParameter.ActualValue = vector.PermutationParameter;
-      }
-      return base.Apply();
-    }
   }
 }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCrossover.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCrossover.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorCrossover.cs	(revision 10850)
@@ -22,41 +22,12 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.Programmable {
-  [Item("ParameterVector Crossover", "Applies different crossovers to cross a parameter vector.")]
+  [Item("ParameterVector Crossover", "Applies different crossovers to cross a multi vector encoding.")]
   [StorableClass]
   public class ParameterVectorCrossover : InstrumentedOperator, ICrossover {
-
-    public ILookupParameter<ParameterVector> ChildParameter {
-      get { return (ILookupParameter<ParameterVector>)Parameters["Child"]; }
-    }
-    public IScopeTreeLookupParameter<ParameterVector> ParentsParameter {
-      get { return (IScopeTreeLookupParameter<ParameterVector>)Parameters["Parents"]; }
-    }
-
-    public ILookupParameter<BinaryVector> BinaryVectorParameter {
-      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
-    }
-
-    public ILookupParameter<IntegerVector> IntegerVectorParameter {
-      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
-    }
-
-    public ILookupParameter<RealVector> RealVectorParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
-    }
-
-    public ILookupParameter<Permutation> PermutationParameter {
-      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
-    }
 
     [StorableConstructor]
@@ -65,10 +36,4 @@
       : base(original, cloner) { }
     public ParameterVectorCrossover() {
-      Parameters.Add(new LookupParameter<ParameterVector>("Child", "The parameter vector of the child.", "ParameterVector"));
-      Parameters.Add(new ScopeTreeLookupParameter<ParameterVector>("Parents", "The parameter vector of the parents.", "ParameterVector"));
-      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The binary vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The integer vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation that links into the parameter vector."));
     }
 
@@ -76,14 +41,4 @@
       return new ParameterVectorCrossover(this, cloner);
     }
-
-    public override IOperation InstrumentedApply() {
-      var child = (ParameterVector)ParentsParameter.ActualValue[0].Clone();
-      child.BooleanParameters = BinaryVectorParameter.ActualValue;
-      child.IntegerParameters = IntegerVectorParameter.ActualValue;
-      child.RealParameters = RealVectorParameter.ActualValue;
-      child.PermutationParameter = PermutationParameter.ActualValue;
-      ChildParameter.ActualValue = child;
-      return base.InstrumentedApply();
-    }
   }
 }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorManipulator.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorManipulator.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/ParameterVectorManipulator.cs	(revision 10850)
@@ -22,32 +22,12 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.Programmable {
-  [Item("ParameterVector Manipulator", "Applies different manipulators to change a parameter vector.")]
+  [Item("ParameterVector Manipulator", "Applies different manipulators to change a multi vector encoding.")]
   [StorableClass]
   public class ParameterVectorManipulator : InstrumentedOperator, IManipulator {
-    public ILookupParameter<BinaryVector> BinaryVectorParameter {
-      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
-    }
-
-    public ILookupParameter<IntegerVector> IntegerVectorParameter {
-      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
-    }
-
-    public ILookupParameter<RealVector> RealVectorParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["RealVector"]; }
-    }
-
-    public ILookupParameter<Permutation> PermutationParameter {
-      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
-    }
 
     [StorableConstructor]
@@ -56,8 +36,4 @@
       : base(original, cloner) { }
     public ParameterVectorManipulator() {
-      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The binary vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The integer vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The real vector that links into the parameter vector."));
-      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation that links into the parameter vector."));
     }
 
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveEvaluator.cs	(revision 10850)
@@ -21,8 +21,12 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
@@ -43,6 +47,6 @@
     }
 
-    public ILookupParameter<ParameterVector> ParameterVectorParameter {
-      get { return (ILookupParameter<ParameterVector>)Parameters["ParameterVector"]; }
+    public ILookupParameter<Configuration> ConfigurationParameter {
+      get { return (ILookupParameter<Configuration>)Parameters["Configuration"]; }
     }
 
@@ -57,5 +61,5 @@
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
       Parameters.Add(new LookupParameter<SingleObjectiveScript>("Script", "The script that will execute the evaluation function and define the parameter vector."));
-      Parameters.Add(new LookupParameter<ParameterVector>("ParameterVector", "The vector that holds the parameters."));
+      Parameters.Add(new LookupParameter<Configuration>("Configuration", "An item that holds the problem's configuration."));
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the parameter vector."));
     }
@@ -69,5 +73,37 @@
       var runner = ScriptParameter.ActualValue;
       if (runner.Instance == null) throw new InvalidOperationException("Script instance is null, maybe the code doesn't compile.");
-      var vector = ParameterVectorParameter.ActualValue;
+      var config = ConfigurationParameter.ActualValue;
+      var binDict = new Dictionary<string, BinaryVector>();
+      var intDict = new Dictionary<string, IntegerVector>();
+      var realDict = new Dictionary<string, RealVector>();
+      var permDict = new Dictionary<string, Permutation>();
+      foreach (var param in config.Parameters) {
+        var binConfig = param.Value as BinaryParameterConfiguration;
+        if (binConfig != null) {
+          binDict.Add(param.Key, (BinaryVector)ExecutionContext.Scope.Variables[param.Key].Value);
+          continue;
+        }
+        var intConfig = param.Value as IntegerParameterConfiguration;
+        if (intConfig != null) {
+          intDict.Add(param.Key, (IntegerVector)ExecutionContext.Scope.Variables[param.Key].Value);
+          continue;
+        }
+        var realConfig = param.Value as RealParameterConfiguration;
+        if (realConfig != null) {
+          realDict.Add(param.Key, (RealVector)ExecutionContext.Scope.Variables[param.Key].Value);
+          continue;
+        }
+        var permConfig = param.Value as PermutationParameterConfiguration;
+        if (permConfig != null) {
+          permDict.Add(param.Key, (Permutation)ExecutionContext.Scope.Variables[param.Key].Value);
+          continue;
+        }
+        throw new InvalidOperationException("Parameter " + param.Key + " not found.");
+      }
+      var vector = new ParameterVector(
+        binaryVectors: binDict.Count > 0 ? binDict : null,
+        integerVectors: intDict.Count > 0 ? intDict : null,
+        realVectors: realDict.Count > 0 ? realDict : null,
+        permutations: permDict.Count > 0 ? permDict : null);
       QualityParameter.ActualValue = new DoubleValue(runner.Instance.Evaluate(random, vector));
       return base.Apply();
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Plugin.cs.frame
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Plugin.cs.frame	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/Plugin.cs.frame	(revision 10850)
@@ -25,5 +25,20 @@
   [Plugin("HeuristicLab.Problems.Programmable", "Programmable problem for defining custom representation and evaluation function.", "3.3.9.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.Programmable-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Encodings.ParameterVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
+  [PluginDependency("HeuristicLab.Scripting", "3.3")]
   public class HeuristicLabProblemsProgrammablePlugin : PluginBase { }
 }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/ProblemBase.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/ProblemBase.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/ProblemBase.cs	(revision 10850)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.ParameterVectorEncoding;
-
 namespace HeuristicLab.Problems.Programmable {
   public abstract class ProblemBase {
-    public abstract ParameterVector GetParametersToOptimize();
+    public abstract Configuration GetConfiguration();
   }
 }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemBase.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemBase.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProblemBase.cs	(revision 10850)
@@ -21,9 +21,7 @@
 
 using HeuristicLab.Core;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
 
 namespace HeuristicLab.Problems.Programmable {
   public abstract class SingleObjectiveProblemBase : ProblemBase {
-    public abstract bool IsMaximizationProblem { get; }
     public abstract double Evaluate(IRandom random, ParameterVector vector);
   }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs	(revision 10850)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Linq;
@@ -29,5 +30,4 @@
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Encodings.RealVectorEncoding;
@@ -35,4 +35,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.Programmable {
@@ -40,5 +41,5 @@
   [Creatable("Problems")]
   [StorableClass]
-  public sealed class SingleObjectiveProgrammableProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveProgrammableProblemEvaluator, IParameterVectorCreator>, IStorableContent {
+  public class SingleObjectiveProgrammableProblem : SingleObjectiveHeuristicOptimizationProblem<ISingleObjectiveProgrammableProblemEvaluator, ISolutionCreator>, IParameterizedNamedItem, IStorableContent {
     public string Filename { get; set; }
 
@@ -47,48 +48,28 @@
     }
 
+    public new ParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
+      get { return Parameters; }
+    }
+
     public IValueParameter<SingleObjectiveScript> ScriptParameter {
       get { return (IValueParameter<SingleObjectiveScript>)Parameters["Script"]; }
     }
 
-    private IValueParameter<IntValue> BinaryVectorLengthParameter {
-      get { return (IValueParameter<IntValue>)Parameters["BinaryVectorLength"]; }
-    }
-
-    private IValueParameter<IntValue> IntegerVectorLengthParameter {
-      get { return (IValueParameter<IntValue>)Parameters["IntegerVectorLength"]; }
-    }
-
-    private IValueParameter<IntMatrix> IntegerVectorBoundsParameter {
-      get { return (IValueParameter<IntMatrix>)Parameters["IntegerVectorBounds"]; }
-    }
-
-    private IValueParameter<IntValue> RealVectorLengthParameter {
-      get { return (IValueParameter<IntValue>)Parameters["RealVectorLength"]; }
-    }
-
-    private IValueParameter<DoubleMatrix> RealVectorBoundsParameter {
-      get { return (IValueParameter<DoubleMatrix>)Parameters["RealVectorBounds"]; }
-    }
-
-    private IValueParameter<IntValue> PermutationLengthParameter {
-      get { return (IValueParameter<IntValue>)Parameters["PermutationLength"]; }
-    }
-
-    private IValueParameter<PermutationType> PermutationTypeParameter {
-      get { return (IValueParameter<PermutationType>)Parameters["PermutationType"]; }
+    public IValueParameter<Configuration> ConfigurationParameter {
+      get { return (IValueParameter<Configuration>)Parameters["Configuration"]; }
     }
 
     [Storable]
-    private ParameterVectorCrossover Crossover { get; set; }
-    [Storable]
-    private ParameterVectorManipulator Manipulator { get; set; }
+    protected List<IParameter> DynamicConfigurationParameters;
 
     [StorableConstructor]
-    private SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
-
-    private SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem original, Cloner cloner)
+    protected SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
+
+    protected SingleObjectiveProgrammableProblem(SingleObjectiveProgrammableProblem original, Cloner cloner)
       : base(original, cloner) {
-      Crossover = cloner.Clone(original.Crossover);
-      Manipulator = cloner.Clone(original.Manipulator);
+      DynamicConfigurationParameters = original.DynamicConfigurationParameters.Select(cloner.Clone).ToList();
       RegisterEventHandlers();
     }
@@ -96,20 +77,11 @@
       : base(new SingleObjectiveEvaluator(), new ParameterVectorCreater()) {
       Parameters.Add(new ValueParameter<SingleObjectiveScript>("Script", "Defines the problem.", new SingleObjectiveScript() { Name = ItemName }));
-      Parameters.Add(new OptionalValueParameter<IntValue>("BinaryVectorLength", "The length of the binary vector."));
-      Parameters.Add(new OptionalValueParameter<IntValue>("IntegerVectorLength", "The length of the integer vector."));
-      Parameters.Add(new OptionalValueParameter<IntMatrix>("IntegerVectorBounds", "The bounds of the integer vector."));
-      Parameters.Add(new OptionalValueParameter<IntValue>("RealVectorLength", "The length of the real vector."));
-      Parameters.Add(new OptionalValueParameter<DoubleMatrix>("RealVectorBounds", "The bounds of the real vector."));
-      Parameters.Add(new OptionalValueParameter<IntValue>("PermutationLength", "The length of the permutation."));
-      Parameters.Add(new OptionalValueParameter<PermutationType>("PermutationType", "The type of the permutation."));
-
-      Crossover = new ParameterVectorCrossover();
-      Manipulator = new ParameterVectorManipulator();
+      Parameters.Add(new ValueParameter<Configuration>("Configuration", "Describes which parameters exist, what they're called, what type they are and their bounds if any."));
+
+      DynamicConfigurationParameters = new List<IParameter>();
 
       Operators.Add(new BestScopeSolutionAnalyzer());
       Operators.Add(Evaluator);
       Operators.Add(SolutionCreator);
-      Operators.Add(Crossover);
-      Operators.Add(Manipulator);
 
       RegisterEventHandlers();
@@ -127,10 +99,4 @@
     private void RegisterEventHandlers() {
       ScriptParameter.ValueChanged += ScriptParameterOnValueChanged;
-      Crossover.BeforeExecutionOperators.CollectionReset += CrossoverBeforeExecutionOperatorsOnChanged;
-      Crossover.BeforeExecutionOperators.ItemsAdded += CrossoverBeforeExecutionOperatorsOnChanged;
-      Crossover.BeforeExecutionOperators.ItemsReplaced += CrossoverBeforeExecutionOperatorsOnChanged;
-      Manipulator.BeforeExecutionOperators.CollectionReset += ManipulatroBeforeExecutionOperatorsOnChanged;
-      Manipulator.BeforeExecutionOperators.ItemsAdded += ManipulatroBeforeExecutionOperatorsOnChanged;
-      Manipulator.BeforeExecutionOperators.ItemsReplaced += ManipulatroBeforeExecutionOperatorsOnChanged;
       RegisterScriptInstanceChanges();
     }
@@ -138,12 +104,4 @@
     private void ScriptParameterOnValueChanged(object sender, EventArgs eventArgs) {
       RegisterScriptInstanceChanges();
-    }
-
-    private void CrossoverBeforeExecutionOperatorsOnChanged(object sender, EventArgs e) {
-      ParameterizeCrossover();
-    }
-
-    private void ManipulatroBeforeExecutionOperatorsOnChanged(object sender, EventArgs e) {
-      ParameterizeManipulator();
     }
 
@@ -165,111 +123,256 @@
     }
 
-    private void ScriptOnInstanceChanged(object sender, EventArgs eventArgs) {
+    protected virtual void ScriptOnInstanceChanged(object sender, EventArgs eventArgs) {
 
       var instance = ScriptParameter.Value.Instance;
       if (instance == null) return;
 
-      Maximization.Value = instance.IsMaximizationProblem;
-      var vector = instance.GetParametersToOptimize();
-      BinaryVectorLengthParameter.Value = vector.BooleanParameters != null ? new IntValue(vector.BooleanParameters.Length) : null;
-      IntegerVectorLengthParameter.Value = vector.IntegerParameters != null ? new IntValue(vector.IntegerParameters.Length) : null;
-      IntegerVectorBoundsParameter.Value = vector.IntegerBounds;
-      RealVectorLengthParameter.Value = vector.RealParameters != null ? new IntValue(vector.RealParameters.Length) : null;
-      RealVectorBoundsParameter.Value = vector.RealBounds;
-      PermutationLengthParameter.Value = vector.PermutationParameter != null ? new IntValue(vector.PermutationParameter.Length) : null;
-      PermutationTypeParameter.Value = vector.PermutationParameter != null ? new PermutationType(vector.PermutationParameter.PermutationType) : null;
-
-      ((IBinaryVectorCreator)SolutionCreator).LengthParameter.ActualName = BinaryVectorLengthParameter.Name;
-      ((IIntegerVectorCreator)SolutionCreator).LengthParameter.ActualName = IntegerVectorLengthParameter.Name;
-      ((IIntegerVectorCreator)SolutionCreator).BoundsParameter.ActualName = IntegerVectorBoundsParameter.Name;
-      ((IRealVectorCreator)SolutionCreator).LengthParameter.ActualName = RealVectorLengthParameter.Name;
-      ((IRealVectorCreator)SolutionCreator).BoundsParameter.ActualName = RealVectorBoundsParameter.Name;
-      ((IPermutationCreator)SolutionCreator).LengthParameter.ActualName = PermutationLengthParameter.Name;
-      ((IPermutationCreator)SolutionCreator).PermutationTypeParameter.Value = new PermutationType(vector.PermutationParameter != null ? vector.PermutationParameter.PermutationType : PermutationTypes.Absolute);
-
-      if (vector.BooleanParameters != null) {
-        if (!Crossover.BeforeExecutionOperators.Any(x => x is IBinaryVectorCrossover))
-          Crossover.BeforeExecutionOperators.Add(new Encodings.BinaryVectorEncoding.SinglePointCrossover());
-        if (!Manipulator.BeforeExecutionOperators.Any(x => x is IBinaryVectorManipulator))
-          Manipulator.BeforeExecutionOperators.Add(new Encodings.BinaryVectorEncoding.SinglePositionBitflipManipulator());
-      } else {
-        Crossover.BeforeExecutionOperators.RemoveAll(x => x is IBinaryVectorCrossover);
-        Manipulator.BeforeExecutionOperators.RemoveAll(x => x is IBinaryVectorManipulator);
+      var configuration = instance.GetConfiguration();
+      ConfigurationParameter.Value = configuration;
+      Maximization.Value = configuration.Maximization;
+
+      foreach (var param in DynamicConfigurationParameters)
+        if (Parameters.Contains(param)) Parameters.Remove(param);
+      DynamicConfigurationParameters.Clear();
+
+      var solutionCreators = new List<ISolutionCreator>();
+      foreach (var parameters in configuration.Parameters) {
+        var binConfig = parameters.Value as BinaryParameterConfiguration;
+        if (binConfig != null) {
+          var p = new ValueParameter<IntValue>(parameters.Key + "Length", binConfig.Length);
+          DynamicConfigurationParameters.Add(p);
+
+          var creator = new RandomBinaryVectorCreator();
+          creator.BinaryVectorParameter.ActualName = parameters.Key;
+          creator.LengthParameter.ActualName = p.Name;
+          solutionCreators.Add(creator);
+        }
+        var intConfig = parameters.Value as IntegerParameterConfiguration;
+        if (intConfig != null) {
+          var l = new ValueParameter<IntValue>(parameters.Key + "Length", intConfig.Length);
+          var b = new ValueParameter<IntMatrix>(parameters.Key + "Bounds", intConfig.Bounds);
+          DynamicConfigurationParameters.Add(l);
+          DynamicConfigurationParameters.Add(b);
+
+          var creator = new UniformRandomIntegerVectorCreator();
+          creator.IntegerVectorParameter.ActualName = parameters.Key;
+          creator.LengthParameter.ActualName = l.Name;
+          creator.BoundsParameter.ActualName = b.Name;
+          solutionCreators.Add(creator);
+        }
+        var realConfig = parameters.Value as RealParameterConfiguration;
+        if (realConfig != null) {
+          var l = new ValueParameter<IntValue>(parameters.Key + "Length", realConfig.Length);
+          var b = new ValueParameter<DoubleMatrix>(parameters.Key + "Bounds", realConfig.Bounds);
+          DynamicConfigurationParameters.Add(l);
+          DynamicConfigurationParameters.Add(b);
+
+          var creator = new UniformRandomRealVectorCreator();
+          creator.RealVectorParameter.ActualName = parameters.Key;
+          creator.LengthParameter.ActualName = l.Name;
+          creator.BoundsParameter.ActualName = b.Name;
+          solutionCreators.Add(creator);
+        }
+        var permConfig = parameters.Value as PermutationParameterConfiguration;
+        if (permConfig != null) {
+          var l = new ValueParameter<IntValue>(parameters.Key + "Length", permConfig.Length);
+          DynamicConfigurationParameters.Add(l);
+
+          var creator = new RandomPermutationCreator();
+          creator.PermutationParameter.ActualName = parameters.Key;
+          creator.LengthParameter.ActualName = l.Name;
+          creator.PermutationTypeParameter.Value = permConfig.Type;
+          solutionCreators.Add(creator);
+        }
       }
 
-      if (vector.IntegerParameters != null) {
-        if (!Crossover.BeforeExecutionOperators.Any(x => x is IIntegerVectorCrossover))
-          Crossover.BeforeExecutionOperators.Add(new Encodings.IntegerVectorEncoding.SinglePointCrossover());
-        if (!Manipulator.BeforeExecutionOperators.Any(x => x is IIntegerVectorManipulator))
-          Manipulator.BeforeExecutionOperators.Add(new Encodings.IntegerVectorEncoding.UniformOnePositionManipulator());
-      } else {
-        Crossover.BeforeExecutionOperators.RemoveAll(x => x is IIntegerVectorCrossover);
-        Manipulator.BeforeExecutionOperators.RemoveAll(x => x is IIntegerVectorManipulator);
+      foreach (var param in DynamicConfigurationParameters) {
+        param.Hidden = true;
+        Parameters.Add(param);
       }
 
-      if (vector.RealParameters != null) {
-        if (!Crossover.BeforeExecutionOperators.Any(x => x is IRealVectorCrossover))
-          Crossover.BeforeExecutionOperators.Add(new Encodings.RealVectorEncoding.SinglePointCrossover());
-        if (!Manipulator.BeforeExecutionOperators.Any(x => x is IRealVectorManipulator))
-          Manipulator.BeforeExecutionOperators.Add(new Encodings.RealVectorEncoding.BreederGeneticAlgorithmManipulator());
-      } else {
-        Crossover.BeforeExecutionOperators.RemoveAll(x => x is IRealVectorCrossover);
-        Manipulator.BeforeExecutionOperators.RemoveAll(x => x is IRealVectorManipulator);
-      }
-
-      if (vector.PermutationParameter != null) {
-        if (!Crossover.BeforeExecutionOperators.Any(x => x is IPermutationCrossover))
-          Crossover.BeforeExecutionOperators.Add(new Encodings.PermutationEncoding.OrderCrossover2());
-        if (!Manipulator.BeforeExecutionOperators.Any(x => x is IPermutationManipulator))
-          Manipulator.BeforeExecutionOperators.Add(new Encodings.PermutationEncoding.Swap2Manipulator());
-      } else {
-        Crossover.BeforeExecutionOperators.RemoveAll(x => x is IPermutationCrossover);
-        Manipulator.BeforeExecutionOperators.RemoveAll(x => x is IPermutationManipulator);
-      }
-
-      ParameterizeCrossover();
-      ParameterizeManipulator();
-    }
-
-    private void ParameterizeCrossover() {
-      Crossover.ChildParameter.ActualName = SolutionCreator.ParameterVectorParameter.ActualName;
-      Crossover.ParentsParameter.ActualName = SolutionCreator.ParameterVectorParameter.ActualName;
-
-      foreach (var xo in Crossover.BeforeExecutionOperators.OfType<IBinaryVectorCrossover>()) {
-        xo.ChildParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
-        xo.ParentsParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
-      }
-      foreach (var xo in Crossover.BeforeExecutionOperators.OfType<IIntegerVectorCrossover>()) {
-        xo.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
-        xo.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
-        var bxo = xo as IBoundedIntegerVectorOperator;
-        if (bxo != null) bxo.BoundsParameter.ActualName = IntegerVectorBoundsParameter.Name;
-      }
-      foreach (var xo in Crossover.BeforeExecutionOperators.OfType<IRealVectorCrossover>()) {
-        xo.ChildParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
-        xo.ParentsParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
-        xo.BoundsParameter.ActualName = RealVectorBoundsParameter.Name;
-      }
-      foreach (var xo in Crossover.BeforeExecutionOperators.OfType<IPermutationCrossover>()) {
-        xo.ChildParameter.ActualName = SolutionCreator.PermutationParameter.ActualName;
-        xo.ParentsParameter.ActualName = SolutionCreator.PermutationParameter.ActualName;
-      }
-    }
-
-    private void ParameterizeManipulator() {
-      foreach (var ma in Manipulator.BeforeExecutionOperators.OfType<IBinaryVectorManipulator>()) {
-        ma.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
-      }
-      foreach (var ma in Manipulator.BeforeExecutionOperators.OfType<IIntegerVectorManipulator>()) {
-        ma.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
-        var bma = ma as IBoundedIntegerVectorOperator;
-        if (bma != null) bma.BoundsParameter.ActualName = IntegerVectorBoundsParameter.Name;
-      }
-      foreach (var ma in Manipulator.BeforeExecutionOperators.OfType<IRealVectorManipulator>()) {
-        ma.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
-        ma.BoundsParameter.ActualName = RealVectorBoundsParameter.Name;
-      }
-      foreach (var ma in Manipulator.BeforeExecutionOperators.OfType<IPermutationManipulator>()) {
-        ma.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName;
+      // use specialized creators if the configuration consists only of a single parameter type
+      // this allows to use specialized algorithms such as CMA-ES
+      if (solutionCreators.Count == 1) { // single-vector encoding
+        Operators.RemoveAll(x => x is ICrossover);
+        Operators.RemoveAll(x => x is IManipulator);
+        var newCreator = solutionCreators.Single();
+        var binCreator = newCreator as IBinaryVectorCreator;
+        if (binCreator != null) {
+          // do not replace a binary vector creator that was manually set
+          if (!(SolutionCreator is IBinaryVectorCreator)
+              || ((IBinaryVectorCreator)SolutionCreator).BinaryVectorParameter.ActualName != binCreator.BinaryVectorParameter.ActualName) {
+            Operators.Remove(SolutionCreator);
+            SolutionCreator = newCreator;
+            Operators.Add(SolutionCreator);
+          }
+          var crossovers = ApplicationManager.Manager.GetInstances<IBinaryVectorCrossover>().ToList();
+          var manipulators = ApplicationManager.Manager.GetInstances<IBinaryVectorManipulator>().ToList();
+          foreach (var xo in crossovers) {
+            xo.ChildParameter.ActualName = binCreator.BinaryVectorParameter.ActualName;
+            xo.ParentsParameter.ActualName = binCreator.BinaryVectorParameter.ActualName;
+          }
+          foreach (var m in manipulators)
+            m.BinaryVectorParameter.ActualName = binCreator.BinaryVectorParameter.ActualName;
+          Operators.AddRange(crossovers);
+          Operators.AddRange(manipulators);
+        }
+        var intCreator = newCreator as IIntegerVectorCreator;
+        if (intCreator != null) {
+          // do not replace an integer vector creator that was manually set
+          if (!(SolutionCreator is IIntegerVectorCreator)
+              || ((IIntegerVectorCreator)SolutionCreator).IntegerVectorParameter.ActualName != intCreator.IntegerVectorParameter.ActualName) {
+            Operators.Remove(SolutionCreator);
+            SolutionCreator = newCreator;
+            Operators.Add(SolutionCreator);
+          }
+          var crossovers = ApplicationManager.Manager.GetInstances<IIntegerVectorCrossover>().ToList();
+          var manipulators = ApplicationManager.Manager.GetInstances<IIntegerVectorManipulator>().ToList();
+          foreach (var xo in crossovers) {
+            xo.ChildParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
+            xo.ParentsParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
+          }
+          foreach (var m in manipulators)
+            m.IntegerVectorParameter.ActualName = intCreator.IntegerVectorParameter.ActualName;
+          foreach (var bo in crossovers.OfType<IBoundedIntegerVectorOperator>().Concat(manipulators.OfType<IBoundedIntegerVectorOperator>()).ToList()) {
+            bo.BoundsParameter.ActualName = intCreator.BoundsParameter.ActualName;
+          }
+          Operators.AddRange(crossovers);
+          Operators.AddRange(manipulators);
+        }
+        var realCreator = newCreator as IRealVectorCreator;
+        if (realCreator != null) {
+          // do not replace a real vector creator that was manually set
+          if (!(SolutionCreator is IRealVectorCreator)
+              || ((IRealVectorCreator)SolutionCreator).RealVectorParameter.ActualName != realCreator.RealVectorParameter.ActualName) {
+            Operators.Remove(SolutionCreator);
+            SolutionCreator = newCreator;
+            Operators.Add(SolutionCreator);
+          }
+          var crossovers = ApplicationManager.Manager.GetInstances<IRealVectorCrossover>().ToList();
+          var manipulators = ApplicationManager.Manager.GetInstances<IRealVectorManipulator>().ToList();
+          foreach (var xo in crossovers) {
+            xo.ChildParameter.ActualName = realCreator.RealVectorParameter.ActualName;
+            xo.ParentsParameter.ActualName = realCreator.RealVectorParameter.ActualName;
+            xo.BoundsParameter.ActualName = realCreator.BoundsParameter.ActualName;
+          }
+          foreach (var m in manipulators) {
+            m.RealVectorParameter.ActualName = realCreator.RealVectorParameter.ActualName;
+            m.BoundsParameter.ActualName = realCreator.BoundsParameter.ActualName;
+          }
+          Operators.AddRange(crossovers);
+          Operators.AddRange(manipulators);
+        }
+        var permCreator = newCreator as IPermutationCreator;
+        if (permCreator != null) {
+          // do not replace a permutation creator that was manually set
+          if (!(SolutionCreator is IPermutationCreator)
+              || ((IPermutationCreator)SolutionCreator).PermutationParameter.ActualName != permCreator.PermutationParameter.ActualName) {
+            Operators.Remove(SolutionCreator);
+            SolutionCreator = newCreator;
+            Operators.Add(SolutionCreator);
+          }
+          var crossovers = ApplicationManager.Manager.GetInstances<IPermutationCrossover>().ToList();
+          var manipulators = ApplicationManager.Manager.GetInstances<IPermutationManipulator>().ToList();
+          foreach (var xo in crossovers) {
+            xo.ChildParameter.ActualName = permCreator.PermutationParameter.ActualName;
+            xo.ParentsParameter.ActualName = permCreator.PermutationParameter.ActualName;
+          }
+          foreach (var m in manipulators)
+            m.PermutationParameter.ActualName = permCreator.PermutationParameter.ActualName;
+          Operators.AddRange(crossovers);
+          Operators.AddRange(manipulators);
+        }
+      } else { // multi-vector encoding
+        var oldCreator = SolutionCreator as ParameterVectorCreater;
+        var newCreator = new ParameterVectorCreater();
+        var newBinParams = new HashSet<string>(solutionCreators.OfType<IBinaryVectorCreator>().Select(x => x.BinaryVectorParameter.ActualName));
+        if (oldCreator != null) { // we want to reuse the old creator
+          var oldParams = new HashSet<string>(oldCreator
+            .BeforeExecutionOperators.OfType<IBinaryVectorCreator>()
+            .Select(x => x.BinaryVectorParameter.ActualName));
+          foreach (var toAdd in newBinParams.Except(oldParams)) {
+            var paramName = toAdd;
+            oldCreator.BeforeExecutionOperators.Add(solutionCreators.OfType<IBinaryVectorCreator>().Single(x => x.BinaryVectorParameter.ActualName == paramName));
+          }
+          foreach (var toRemove in oldParams.Except(newBinParams)) {
+            var paramName = toRemove;
+            oldCreator.BeforeExecutionOperators.RemoveAll(
+              op => op is IBinaryVectorCreator && ((IBinaryVectorCreator)op).BinaryVectorParameter.ActualName == paramName);
+          }
+        } else { // we will use the new creator
+          foreach (var binCreator in solutionCreators.OfType<IBinaryVectorCreator>()) {
+            newCreator.BeforeExecutionOperators.Add(binCreator);
+          }
+        }
+
+        var newIntParams = new HashSet<string>(solutionCreators.OfType<IIntegerVectorCreator>().Select(x => x.IntegerVectorParameter.ActualName));
+        if (oldCreator != null) { // we want to reuse the old creator
+          var oldParams = new HashSet<string>(oldCreator
+            .BeforeExecutionOperators.OfType<IIntegerVectorCreator>()
+            .Select(x => x.IntegerVectorParameter.ActualName));
+          foreach (var toAdd in newIntParams.Except(oldParams)) {
+            var paramName = toAdd;
+            oldCreator.BeforeExecutionOperators.Add(solutionCreators.OfType<IIntegerVectorCreator>().Single(x => x.IntegerVectorParameter.ActualName == paramName));
+          }
+          foreach (var toRemove in oldParams.Except(newIntParams)) {
+            var paramName = toRemove;
+            oldCreator.BeforeExecutionOperators.RemoveAll(
+              op => op is IIntegerVectorCreator && ((IIntegerVectorCreator)op).IntegerVectorParameter.ActualName == paramName);
+          }
+        } else { // we will use the new creator
+          foreach (var intCreator in solutionCreators.OfType<IIntegerVectorCreator>()) {
+            newCreator.BeforeExecutionOperators.Add(intCreator);
+          }
+        }
+
+        var newRealParams = new HashSet<string>(solutionCreators.OfType<IRealVectorCreator>().Select(x => x.RealVectorParameter.ActualName));
+        if (oldCreator != null) { // we want to reuse the old creator
+          var oldParams = new HashSet<string>(oldCreator
+            .BeforeExecutionOperators.OfType<IRealVectorCreator>()
+            .Select(x => x.RealVectorParameter.ActualName));
+          foreach (var toAdd in newRealParams.Except(oldParams)) {
+            var paramName = toAdd;
+            oldCreator.BeforeExecutionOperators.Add(solutionCreators.OfType<IRealVectorCreator>().Single(x => x.RealVectorParameter.ActualName == paramName));
+          }
+          foreach (var toRemove in oldParams.Except(newRealParams)) {
+            var paramName = toRemove;
+            oldCreator.BeforeExecutionOperators.RemoveAll(
+              op => op is IRealVectorCreator && ((IRealVectorCreator)op).RealVectorParameter.ActualName == paramName);
+          }
+        } else { // we will use the new creator
+          foreach (var realCreator in solutionCreators.OfType<IRealVectorCreator>()) {
+            newCreator.BeforeExecutionOperators.Add(realCreator);
+          }
+        }
+
+        var newPermParams = new HashSet<string>(solutionCreators.OfType<IPermutationCreator>().Select(x => x.PermutationParameter.ActualName));
+        if (oldCreator != null) { // we want to reuse the old creator
+          var oldParams = new HashSet<string>(oldCreator
+            .BeforeExecutionOperators.OfType<IPermutationCreator>()
+            .Select(x => x.PermutationParameter.ActualName));
+          foreach (var toAdd in newPermParams.Except(oldParams)) {
+            var paramName = toAdd;
+            oldCreator.BeforeExecutionOperators.Add(solutionCreators.OfType<IPermutationCreator>().Single(x => x.PermutationParameter.ActualName == paramName));
+          }
+          foreach (var toRemove in oldParams.Except(newPermParams)) {
+            var paramName = toRemove;
+            oldCreator.BeforeExecutionOperators.RemoveAll(
+              op => op is IPermutationCreator && ((IPermutationCreator)op).PermutationParameter.ActualName == paramName);
+          }
+          // we also have to sync the permutation type (in case this changes, as it is a value parameter)
+          foreach (var intersect in newPermParams.Intersect(oldParams)) {
+            var paramName = intersect;
+            var oldPermCreator = oldCreator.BeforeExecutionOperators.OfType<IPermutationCreator>()
+              .Single(x => x.PermutationParameter.ActualName == paramName);
+            var newPermCreator = solutionCreators.OfType<IPermutationCreator>()
+                .Single(x => x.PermutationParameter.ActualName == paramName);
+            oldPermCreator.PermutationTypeParameter.Value = newPermCreator.PermutationTypeParameter.Value;
+          }
+        } else { // we will use the new creator
+          foreach (var permCreator in solutionCreators.OfType<IPermutationCreator>()) {
+            newCreator.BeforeExecutionOperators.Add(permCreator);
+          }
+        }
       }
     }
Index: branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveScript.cs
===================================================================
--- branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveScript.cs	(revision 10754)
+++ branches/SimSharp/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveScript.cs	(revision 10850)
@@ -53,6 +53,6 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.ParameterVectorEncoding;
 using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.Programmable;
 
 public class MyProblem : HeuristicLab.Problems.Programmable.SingleObjectiveProblemBase {
@@ -60,17 +60,19 @@
     // initialize private fields
   }
-  public override bool IsMaximizationProblem { get { return false; } }
-  public override ParameterVector GetParametersToOptimize() {
-    return new ParameterVectorBuilder()
-      // .AddBoolean(""Parameter"")
-      // .AddInteger(""Parameter"", min: 5, max: 15, step: 3)
-      // .AddReal(""Parameter"", min: 0.0, max: 1.0)
-      // .SetPermutation(type: PermutationTypes.Absolute, length: 10)
-    .Build();
+
+  public override Configuration GetConfiguration() {
+    return new Configuration()
+      // .SetMaximization(true)
+      // add an arbitrary number of uniquely named parameter vectors
+      // .AddBinary(""p"", length: 5)
+      // .AddInteger(""i"", length: 5, min: 2, max: 14, step: 4)
+      // .AddReal(""r"", length: 5, min: -1.0, max: 1.0)
+      // .AddPermutation(""P"", type: PermutationTypes.Absolute, length: 5)
+    ;
   }
 
   public override double Evaluate(IRandom random, ParameterVector vector) {
     var quality = 0.0;
-    // quality = vector.Boolean(""Parameter"") ? vector.Real(""Parameter"") : vector.Integer(""Parameter"");
+    // quality = vector.Real(""r"").Select(x => x * x).Sum();
     return quality;
   }
Index: branches/SimSharp/ProgrammableProblem.sln
===================================================================
--- branches/SimSharp/ProgrammableProblem.sln	(revision 10754)
+++ branches/SimSharp/ProgrammableProblem.sln	(revision 10850)
@@ -7,6 +7,4 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Programmable-3.3", "HeuristicLab.Problems.Programmable\3.3\HeuristicLab.Problems.Programmable-3.3.csproj", "{EE07BFF8-B23D-41F5-8AD7-AC9598D7A2C9}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Encodings.ParameterVectorEncoding-3.3", "HeuristicLab.Encodings.ParameterVector\HeuristicLab.Encodings.ParameterVectorEncoding-3.3.csproj", "{BA2B2335-EF06-473F-B06D-210F356F8EBD}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Programmable.Views-3.3", "HeuristicLab.Problems.Programmable.Views\3.3\HeuristicLab.Problems.Programmable.Views-3.3.csproj", "{6F023B90-2091-40A9-8AC0-B0338DFF8E5F}"
@@ -26,8 +24,4 @@
 		{EE07BFF8-B23D-41F5-8AD7-AC9598D7A2C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EE07BFF8-B23D-41F5-8AD7-AC9598D7A2C9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{BA2B2335-EF06-473F-B06D-210F356F8EBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{BA2B2335-EF06-473F-B06D-210F356F8EBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BA2B2335-EF06-473F-B06D-210F356F8EBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{BA2B2335-EF06-473F-B06D-210F356F8EBD}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6F023B90-2091-40A9-8AC0-B0338DFF8E5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6F023B90-2091-40A9-8AC0-B0338DFF8E5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
