Index: /branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs	(revision 11753)
@@ -78,9 +78,9 @@
 
     public U SolutionCreator {
-      get { return SolutionCreatorParameter.Value; }
+      get { return (U)SolutionCreatorParameter.Value; }
       protected set { SolutionCreatorParameter.Value = value; }
     }
-    public ValueParameter<U> SolutionCreatorParameter {
-      get { return (ValueParameter<U>)Parameters[SolutionCreateParameterName]; }
+    public IValueParameter SolutionCreatorParameter {
+      get { return (IValueParameter)Parameters[SolutionCreateParameterName]; }
     }
     ISolutionCreator IHeuristicOptimizationProblem.SolutionCreator { get { return SolutionCreator; } }
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 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/HeuristicLab.Problems.Programmable.Views-3.3.csproj	(revision 11753)
@@ -111,15 +111,15 @@
       <DependentUpon>ProblemDefinitionScriptView.cs</DependentUpon>
     </Compile>
-    <Compile Include="MultiObjectiveProgrammableProblemView.cs">
+    <Compile Include="MultiObjectiveScriptableProblemView.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="MultiObjectiveProgrammableProblemView.Designer.cs">
-      <DependentUpon>MultiObjectiveProgrammableProblemView.cs</DependentUpon>
+    <Compile Include="MultiObjectiveScriptableProblemView.Designer.cs">
+      <DependentUpon>MultiObjectiveScriptableProblemView.cs</DependentUpon>
     </Compile>
-    <Compile Include="SingleObjectiveProgrammableProblemView.cs">
+    <Compile Include="SingleObjectiveScriptableProblemView.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="SingleObjectiveProgrammableProblemView.Designer.cs">
-      <DependentUpon>SingleObjectiveProgrammableProblemView.cs</DependentUpon>
+    <Compile Include="SingleObjectiveScriptableProblemView.Designer.cs">
+      <DependentUpon>SingleObjectiveScriptableProblemView.cs</DependentUpon>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveProgrammableProblemView.Designer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveProgrammableProblemView.Designer.cs	(revision 11752)
+++ 	(revision )
@@ -1,62 +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
-
-namespace HeuristicLab.Problems.Programmable.Views {
-  partial class MultiObjectiveProgrammableProblemView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // ProgrammableProblemView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "ProgrammableProblemView";
-      this.Size = new System.Drawing.Size(626, 413);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveProgrammableProblemView.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveProgrammableProblemView.cs	(revision 11752)
+++ 	(revision )
@@ -1,75 +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.Windows.Forms;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Problems.Programmable.Views {
-  [View("Multi-Objective Programmable Problem View")]
-  [Content(typeof(MultiObjectiveProgrammableProblem), true)]
-  public partial class MultiObjectiveProgrammableProblemView : ItemView {
-    protected ViewHost DefinitionView;
-
-    public new MultiObjectiveProgrammableProblem Content {
-      get { return (MultiObjectiveProgrammableProblem)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public MultiObjectiveProgrammableProblemView() {
-      InitializeComponent();
-      DefinitionView = new ViewHost() { ViewsLabelVisible = false, Dock = DockStyle.Fill };
-      Controls.Add(DefinitionView);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        DefinitionView.Content = null;
-      } else {
-        DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
-        Caption = Content.Name;
-      }
-    }
-
-    protected override void RegisterContentEvents() {
-      Content.ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
-      Content.NameChanged += ContentOnNameChanged;
-      base.RegisterContentEvents();
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ProblemDefinitionParameter.ValueChanged -= ProblemDefinitionParameterOnValueChanged;
-      Content.NameChanged -= ContentOnNameChanged;
-    }
-
-    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
-      DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
-    }
-
-    private void ContentOnNameChanged(object sender, EventArgs eventArgs) {
-      Caption = Content.Name;
-    }
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.Designer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.Designer.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.Designer.cs	(revision 11753)
@@ -0,0 +1,62 @@
+﻿#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
+
+namespace HeuristicLab.Problems.Programmable.Views {
+  partial class MultiObjectiveScriptableProblemView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // ProgrammableProblemView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "ProgrammableProblemView";
+      this.Size = new System.Drawing.Size(626, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/MultiObjectiveScriptableProblemView.cs	(revision 11753)
@@ -0,0 +1,75 @@
+﻿#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.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.Programmable.Views {
+  [View("Multi-Objective Programmable Problem View")]
+  [Content(typeof(MultiObjectiveScriptableProblem), true)]
+  public partial class MultiObjectiveScriptableProblemView : ItemView {
+    protected ViewHost ScriptView;
+
+    public new MultiObjectiveScriptableProblem Content {
+      get { return (MultiObjectiveScriptableProblem)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public MultiObjectiveScriptableProblemView() {
+      InitializeComponent();
+      ScriptView = new ViewHost() { ViewsLabelVisible = false, Dock = DockStyle.Fill };
+      Controls.Add(ScriptView);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        ScriptView.Content = null;
+      } else {
+        ScriptView.Content = Content.ProblemScript;
+        Caption = Content.Name;
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      //Content.ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
+      Content.NameChanged += ContentOnNameChanged;
+      base.RegisterContentEvents();
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      //Content.ProblemDefinitionParameter.ValueChanged -= ProblemDefinitionParameterOnValueChanged;
+      Content.NameChanged -= ContentOnNameChanged;
+    }
+
+    //private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
+    //  DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
+    //}
+
+    private void ContentOnNameChanged(object sender, EventArgs eventArgs) {
+      Caption = Content.Name;
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/ProblemDefinitionScriptView.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/ProblemDefinitionScriptView.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/ProblemDefinitionScriptView.cs	(revision 11753)
@@ -25,9 +25,9 @@
 namespace HeuristicLab.Problems.Programmable.Views {
   [View("ProblemDefinitionScriptView")]
-  [Content(typeof(ProblemScript), IsDefaultView = true)]
+  [Content(typeof(ProblemDefinitionScript), IsDefaultView = true)]
   public partial class ProblemDefinitionScriptView : ScriptView {
 
-    public new ProblemScript Content {
-      get { return (ProblemScript)base.Content; }
+    public new ProblemDefinitionScript Content {
+      get { return (ProblemDefinitionScript)base.Content; }
       set { base.Content = value; }
     }
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveProgrammableProblemView.Designer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveProgrammableProblemView.Designer.cs	(revision 11752)
+++ 	(revision )
@@ -1,62 +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
-
-namespace HeuristicLab.Problems.Programmable.Views {
-  partial class SingleObjectiveProgrammableProblemView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // ProgrammableProblemView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "ProgrammableProblemView";
-      this.Size = new System.Drawing.Size(626, 413);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-  }
-}
Index: anches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveProgrammableProblemView.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveProgrammableProblemView.cs	(revision 11752)
+++ 	(revision )
@@ -1,75 +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.Windows.Forms;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Problems.Programmable.Views {
-  [View("Single-Objective Programmable Problem View")]
-  [Content(typeof(SingleObjectiveProgrammableProblem), true)]
-  public partial class SingleObjectiveProgrammableProblemView : ItemView {
-    protected ViewHost DefinitionView;
-
-    public new SingleObjectiveProgrammableProblem Content {
-      get { return (SingleObjectiveProgrammableProblem)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public SingleObjectiveProgrammableProblemView() {
-      InitializeComponent();
-      DefinitionView = new ViewHost() { ViewsLabelVisible = false, Dock = DockStyle.Fill };
-      Controls.Add(DefinitionView);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        DefinitionView.Content = null;
-      } else {
-        DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
-        Caption = Content.Name;
-      }
-    }
-
-    protected override void RegisterContentEvents() {
-      Content.ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
-      Content.NameChanged += ContentOnNameChanged;
-      base.RegisterContentEvents();
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ProblemDefinitionParameter.ValueChanged -= ProblemDefinitionParameterOnValueChanged;
-      Content.NameChanged -= ContentOnNameChanged;
-    }
-
-    private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
-      DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
-    }
-
-    private void ContentOnNameChanged(object sender, EventArgs eventArgs) {
-      Caption = Content.Name;
-    }
-  }
-}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.Designer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.Designer.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.Designer.cs	(revision 11753)
@@ -0,0 +1,62 @@
+﻿#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
+
+namespace HeuristicLab.Problems.Programmable.Views {
+  partial class SingleObjectiveScriptableProblemView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // ProgrammableProblemView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "ProgrammableProblemView";
+      this.Size = new System.Drawing.Size(626, 413);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable.Views/3.3/SingleObjectiveScriptableProblemView.cs	(revision 11753)
@@ -0,0 +1,76 @@
+﻿#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.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.Programmable.Problems;
+
+namespace HeuristicLab.Problems.Programmable.Views {
+  [View("Single-Objective Scriptable Problem View")]
+  [Content(typeof(SingleObjectiveScriptableProblem), true)]
+  public partial class SingleObjectiveScriptableProblemView : ItemView {
+    protected ViewHost ScriptView;
+
+    public new SingleObjectiveScriptableProblem Content {
+      get { return (SingleObjectiveScriptableProblem)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SingleObjectiveScriptableProblemView() {
+      InitializeComponent();
+      ScriptView = new ViewHost() { ViewsLabelVisible = false, Dock = DockStyle.Fill };
+      Controls.Add(ScriptView);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        ScriptView.Content = null;
+      } else {
+        ScriptView.Content = Content.ProblemScript;
+        Caption = Content.Name;
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      //Content.ProblemDefinitionParameter.ValueChanged += ProblemDefinitionParameterOnValueChanged;
+      Content.NameChanged += ContentOnNameChanged;
+      base.RegisterContentEvents();
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      //Content.ProblemDefinitionParameter.ValueChanged -= ProblemDefinitionParameterOnValueChanged;
+      Content.NameChanged -= ContentOnNameChanged;
+    }
+
+    //private void ProblemDefinitionParameterOnValueChanged(object sender, EventArgs eventArgs) {
+    //  DefinitionView.Content = Content.ProblemDefinitionParameter.Value;
+    //}
+
+    private void ContentOnNameChanged(object sender, EventArgs eventArgs) {
+      Caption = Content.Name;
+    }
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/Encoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/Encoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/Encoding.cs	(revision 11753)
@@ -38,8 +38,23 @@
 
     protected HashSet<IOperator> encodingOperators = new HashSet<IOperator>(new TypeEqualityComparer<IOperator>());
-    [Storable]
+
+    [Storable(Name = "Operators")]
+    private IEnumerable<IOperator> StorableOperators {
+      get { return encodingOperators; }
+      set { encodingOperators = new HashSet<IOperator>(value, new TypeEqualityComparer<IOperator>()); ; }
+    }
+
     public IEnumerable<IOperator> Operators {
       get { return encodingOperators; }
-      private set { encodingOperators = new HashSet<IOperator>(value, new TypeEqualityComparer<IOperator>()); }
+      set {
+        if (!value.OfType<T>().Any())
+          throw new ArgumentException("The provided operators contain no suitable solution creator");
+        encodingOperators = new HashSet<IOperator>(value, new TypeEqualityComparer<IOperator>());
+
+        T newSolutionCreator = (T)encodingOperators.FirstOrDefault(o => o.GetType() == solutionCreator.GetType());
+        if (newSolutionCreator == null) newSolutionCreator = encodingOperators.OfType<T>().First();
+        SolutionCreator = newSolutionCreator;
+        OnOperatorsChanged();
+      }
     }
 
@@ -90,4 +105,11 @@
       if (handler != null) handler(this, EventArgs.Empty);
     }
+
+    public event EventHandler OperatorsChanged;
+    protected virtual void OnOperatorsChanged() {
+      ConfigureOperators(Operators);
+      var handler = OperatorsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs	(revision 11753)
@@ -174,5 +174,6 @@
     }
     private void DiscoverOperators() {
-      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, true, false, false);
+      var pluginDescription = ApplicationManager.Manager.GetDeclaringPlugin(typeof(IIntegerVectorOperator));
+      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, pluginDescription, true, false, false);
       var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
       var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/MultiEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/MultiEncoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/MultiEncoding.cs	(revision 11753)
@@ -89,5 +89,4 @@
 
     public override void ConfigureOperators(IEnumerable<IOperator> operators) {
-
     }
   }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs	(revision 11753)
@@ -148,5 +148,6 @@
     }
     private void DiscoverOperators() {
-      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, true, false, false);
+      var pluginDescription = ApplicationManager.Manager.GetDeclaringPlugin(typeof(IPermutationOperator));
+      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, pluginDescription, true, false, false);
       var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
       var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs	(revision 11753)
@@ -173,5 +173,6 @@
     }
     private void DiscoverOperators() {
-      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, true, false, false);
+      var pluginDescription = ApplicationManager.Manager.GetDeclaringPlugin(typeof(IRealVectorOperator));
+      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, pluginDescription, true, false, false);
       var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
       var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
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 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/HeuristicLab.Problems.Programmable-3.3.csproj	(revision 11753)
@@ -147,7 +147,15 @@
     <Compile Include="Interfaces\IMultiObjectiveProblemDefinition.cs" />
     <Compile Include="Interfaces\IEncodingOperator.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveMoveOperator.cs" />
     <Compile Include="New\ProgrammableProblem.cs" />
     <Compile Include="New\MultiObjectiveProgrammableProblem.cs" />
     <Compile Include="New\MultiObjectiveScriptableProblem.cs" />
+    <Compile Include="New\Scripts\Templates\CompiledMultiObjectiveProblemDefinition.cs" />
+    <Compile Include="New\Scripts\Templates\CompiledSingleObjectiveProblemDefinition.cs" />
+    <Compile Include="New\Scripts\Templates\ScriptTemplates.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>ScriptTemplates.resx</DependentUpon>
+    </Compile>
     <Compile Include="Operators\MultiEncodingManipulator.cs" />
     <Compile Include="Operators\MultiEncodingCrossover.cs" />
@@ -173,4 +181,8 @@
     <Compile Include="OLD_MultiObjectiveProgrammableProblem.cs" />
     <Compile Include="OLD_SingleObjectiveProgrammableProblem.cs" />
+    <EmbeddedResource Include="New\Scripts\Templates\ScriptTemplates.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>ScriptTemplates.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
     <None Include="HeuristicLab.snk" />
     <None Include="Plugin.cs.frame" />
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncoding.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncoding.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IEncoding.cs	(revision 11753)
@@ -28,6 +28,5 @@
   public interface IEncoding : IParameterizedNamedItem {
     ISolutionCreator SolutionCreator { get; set; }
-
-    IEnumerable<IOperator> Operators { get; }
+    IEnumerable<IOperator> Operators { get; set; }
 
     Individual GetIndividual(IScope scope);
@@ -36,4 +35,5 @@
 
     event EventHandler SolutionCreatorChanged;
+    event EventHandler OperatorsChanged;
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiEncodingOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiEncodingOperator.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IMultiEncodingOperator.cs	(revision 11753)
@@ -26,4 +26,5 @@
     void AddEncoding(IEncoding encoding);
     bool RemoveEncoding(IEncoding encoding);
+    void ReplaceEncoding(IEncoding oldEncoding, IEncoding newEncoding);
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/IProblemDefinition.cs	(revision 11753)
@@ -25,6 +25,5 @@
 namespace HeuristicLab.Problems.Programmable {
   public interface IProblemDefinition : INamedItem {
-    IEncoding Encoding { get; }
-    IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random);
+    IEncoding Encoding { get; }    
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveMoveOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveMoveOperator.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveMoveOperator.cs	(revision 11753)
@@ -0,0 +1,26 @@
+﻿#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.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  public interface ISingleObjectiveMoveOperator : IMoveOperator {
+  }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Interfaces/ISingleObjectiveProblemDefinition.cs	(revision 11753)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Collections.Generic;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
@@ -28,4 +29,5 @@
     double Evaluate(Individual individual, IRandom random);
     void Analyze(Individual[] individuals, double[] qualities, ResultCollection results);
+    IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random);
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs	(revision 11753)
@@ -42,6 +42,6 @@
       : base() {
 
+      Operators.Add(Evaluator);
       Operators.Add(new BestScopeSolutionAnalyzer());
-      Operators.Add(new SingleObjectiveEvaluator());
       Operators.Add(new SingleObjectiveAnalyzer());
 
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveScriptableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveScriptableProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveScriptableProblem.cs	(revision 11753)
@@ -27,5 +27,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Problems.Programmable.Problems {
+namespace HeuristicLab.Problems.Programmable {
   [Item("Scriptable Problem (multi-objective)", "Represents a multi-objective problem that can be scripted.")]
   [Creatable("1 Test")]
@@ -37,9 +37,9 @@
     }
 
-    private MultiObjectiveProblemDefinitionScript ProblemScript {
+    public MultiObjectiveProblemDefinitionScript ProblemScript {
       get { return MultiObjectiveProblemScriptParameter.Value; }
     }
 
-    private IMultiObjectiveProblemDefinition ProblemDefinition {
+    public IMultiObjectiveProblemDefinition ProblemDefinition {
       get { return MultiObjectiveProblemScriptParameter.Value; }
     }
@@ -48,4 +48,5 @@
       : base(original, cloner) {
       RegisterEvents();
+      ProblemScript.Compile();
     }
     public override IDeepCloneable Clone(Cloner cloner) { return new MultiObjectiveScriptableProblem(this, cloner); }
@@ -64,4 +65,5 @@
     private void AfterDeserialization() {
       RegisterEvents();
+      ProblemScript.Compile();
     }
 
@@ -71,4 +73,7 @@
 
     private void OnProblemDefinitionChanged() {
+      Encoding = ProblemDefinition.Encoding;
+      OnOperatorsChanged();
+      OnReset();
     }
 
@@ -84,7 +89,4 @@
       ProblemDefinition.Analyze(individuals, qualities, results);
     }
-    public override IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
-      return ProblemDefinition.GetNeighbors(individual, random);
-    }
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/ProgrammableProblem.cs	(revision 11753)
@@ -28,4 +28,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Programmable.Interfaces;
 
 namespace HeuristicLab.Problems.Programmable {
@@ -46,9 +47,9 @@
       protected set {
         if (value == null) throw new ArgumentNullException("Encoding must not be null.");
-        if (Encoding != null) Parameters.RemoveRange(Encoding.Parameters);
         EncodingParameter.Value = value;
-        Parameters.AddRange(Encoding.Parameters);
       }
     }
+    //mkommend necessary for reuse of operators if the encoding changes
+    private TEncoding oldEncoding;
 
     public virtual IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
@@ -57,13 +58,18 @@
 
     protected override IEnumerable<IItem> GetOperators() {
+      if (Encoding == null) return base.GetOperators();
       return base.GetOperators().Concat(Encoding.Operators);
     }
     public override IEnumerable<IParameterizedItem> ExecutionContextItems {
-      get { return base.ExecutionContextItems.Concat(new[] { Encoding }); }
+      get {
+        if (Encoding == null) return base.ExecutionContextItems;
+        return base.ExecutionContextItems.Concat(new[] { Encoding });
+      }
     }
 
-    public ProgrammableProblem()
+    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();
     }
@@ -71,10 +77,13 @@
     protected ProgrammableProblem(ProgrammableProblem<TEncoding, TEvaluator> original, Cloner cloner)
       : base(original, cloner) {
+      oldEncoding = cloner.Clone(original.oldEncoding);
       RegisterEvents();
     }
 
     [StorableConstructor]
-    protected ProgrammableProblem(bool deserializing)
-      : base(deserializing) {
+    protected ProgrammableProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      oldEncoding = Encoding;
       RegisterEvents();
     }
@@ -85,4 +94,7 @@
 
     protected virtual void OnEncodingChanged() {
+      if (oldEncoding != null) AdaptEncodingOperators(oldEncoding, Encoding);
+      oldEncoding = Encoding;
+
       var solutionCreatorType = Encoding.GetType().BaseType.GetGenericArguments();
       var paramType = typeof(ValueParameter<>).MakeGenericType(solutionCreatorType);
@@ -91,4 +103,7 @@
       Parameters.Remove(SolutionCreatorParameter);
       Parameters.Add(solutionCreatorParam);
+
+      OnOperatorsChanged();
+      OnReset();
     }
 
@@ -106,4 +121,32 @@
     }
 
+    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);
+      operators = operators.Union(newOperators, comparer);
+
+      newEncoding.ConfigureOperators(operators);
+      newEncoding.Operators = operators;
+    }
+
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs	(revision 11753)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -52,4 +51,5 @@
     }
 
+    public CompiledProblemDefinition() { }
     protected CompiledProblemDefinition(IEncoding encoding) : this(encoding, "ProblemDefinition") { }
     protected CompiledProblemDefinition(IEncoding encoding, string name) : this(encoding, name, string.Empty) { }
@@ -57,8 +57,5 @@
       : base(name, description) {
       Encoding = encoding;
-      //TODO call initialize and set refactor ctors
     }
-
-    public abstract IEnumerable<Individual> GetNeighbors(Individual vector, IRandom random);
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/MultiObjectiveProblemDefinitionScript.cs	(revision 11753)
@@ -24,4 +24,5 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Programmable.New.Scripts.Templates;
 
 namespace HeuristicLab.Problems.Programmable {
@@ -32,65 +33,9 @@
 
     protected override string CodeTemplate {
-      get {
-        return @"using System;
-using System.Linq;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.Programmable;
+      get { return ScriptTemplates.CompiledMultiObjectiveProblemDefinition; }
+    }
 
-public class CustomProblemDefinition : CompiledProblemDefinition, IMultiObjectiveProblemDefinition {
-  public bool[] Maximization { get { return new [] { false, false }; } }
-
-  public CustomProblemDefinition() {
-    // Define the solution encoding which can also consist of multiple vectors, examples below
-    // Encoding = new BinaryEncoding(""b"", length: 5);
-    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
-    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
-    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
-    // Encoding = new MultiEncoding()
-      // .AddBinaryVector(""b"", length: 5)
-      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
-      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
-      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
-    ;
-  }
-
-  public override void Initialize() {
-    // when the definition is created here you can initialize variables in the variable store
-  }
-
-  public double[] Evaluate(IRandom random, Individual individual) {
-    var qualities = new [] { 0.0, 0.0 };
-    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
-    // qualities = new [] { individual.RealVector(""r"").Sum(x => x * x), individual.RealVector(""r"").Sum(x => x * x * x) };
-    return qualities;
-  }
-
-  public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
-    // write or update results given the range of vectors and resulting qualities
-    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
-  }
-
-  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
-    // Create new vectors, based on the given one that represent small changes
-    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
-    while (true) {
-      // this is not an infinite loop as only a finite amount of samples will be drawn
-      // it is possible to return a concrete amount of neighbors also
-      var neighbor = (Individual)individual.Clone();
-      //e.g. make a bit flip in a binary parameter
-      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
-      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
-      yield return neighbor;
-    }
-  }
-
-  // implement further classes and methods
-}";
-      }
+    private new IMultiObjectiveProblemDefinition CompiledProblemDefinition {
+      get { return (IMultiObjectiveProblemDefinition)base.CompiledProblemDefinition; }
     }
 
@@ -108,10 +53,6 @@
     }
 
-    public new IMultiObjectiveProblemDefinition CompiledProblemDefinition {
-      get { return (IMultiObjectiveProblemDefinition)base.CompiledProblemDefinition; }
-    }
-
     bool[] IMultiObjectiveProblemDefinition.Maximization {
-      get { return CompiledProblemDefinition != null ? CompiledProblemDefinition.Maximization : new bool[0]; }
+      get { return CompiledProblemDefinition.Maximization; }
     }
 
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/ProblemDefinitionScript.cs	(revision 11753)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
@@ -47,13 +46,11 @@
       variableStore = cloner.Clone(original.variableStore);
     }
-    protected ProblemDefinitionScript() :base(){
+    protected ProblemDefinitionScript()
+      : base() {
       variableStore = new VariableStore();
     }
 
     IEncoding IProblemDefinition.Encoding {
-      get { return CompiledProblemDefinition != null ? CompiledProblemDefinition.Encoding : null; }
-    }
-    IEnumerable<Individual> IProblemDefinition.GetNeighbors(Individual individual, IRandom random) {
-      return CompiledProblemDefinition.GetNeighbors(individual, random);
+      get { return CompiledProblemDefinition.Encoding; }
     }
 
@@ -62,9 +59,10 @@
     protected IProblemDefinition CompiledProblemDefinition {
       get {
-          lock (locker) {
-            if (compiledProblemDefinition == null) {
-              Compile();
-            }
-          }
+        //lock (locker) {
+        //  if (compiledProblemDefinition == null) {
+        //    Compile();
+        //  }
+        //}
+        if (compiledProblemDefinition == null) throw new InvalidOperationException("The problem definition script is not compiled and cannot be used.");
         return compiledProblemDefinition;
       }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/SingleObjectiveProblemDefinitionScript.cs	(revision 11753)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using HeuristicLab.Common;
@@ -26,4 +25,5 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Programmable.New.Scripts.Templates;
 
 namespace HeuristicLab.Problems.Programmable {
@@ -34,65 +34,9 @@
 
     protected override string CodeTemplate {
-      get {
-        return @"using System;
-using System.Linq;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.Programmable;
+      get { return ScriptTemplates.CompiledSingleObjectiveProblemDefinition; }
+    }
 
-public class CustomProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition {
-  public bool IsMaximizationProblem { get { return false; } }
-
-  public CustomProblemDefinition() {
-    // Define the solution encoding which can also consist of multiple vectors, examples below
-    // Encoding = new BinaryEncoding(""b"", length: 5);
-    // Encoding = new IntegerEncoding(""i"", lenght: 5, min: 2, max: 14, step: 4);
-    // Encoding = new RealEncoding(""r"", length: 5, min: -1.0, max: 1.0);
-    // Encoding = new PermutationEncoding(""P"", length: 5, type: PermutationTypes.Absolute);
-    // Encoding = new MultiEncoding()
-      // .AddBinaryVector(""b"", length: 5)
-      // .AddIntegerVector(""i"", length: 5, min: 2, max: 14, step: 4)
-      // .AddRealVector(""r"", length: 5, min: -1.0, max: 1.0)
-      // .AddPermutation(""P"", length: 5, type: PermutationTypes.Absolute)
-    ;
-  }
-
-  public override void Initialize() {
-    // when the definition is created here you can initialize variables in the variable store
-  }
-
-  public double Evaluate(IRandom random, Individual individual) {
-    var quality = 0.0;
-    // use vars.yourVariable to access variables in the variable store i.e. yourVariable
-    // quality = individual.RealVector(""r"").Sum(x => x * x);
-    return quality;
-  }
-
-  public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
-    // write or update results given the range of vectors and resulting qualities
-    // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
-  }
-
-  public override IEnumerable<Individual> GetNeighbors(IRandom random, Individual individual) {
-    // Create new vectors, based on the given one that represent small changes
-    // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
-    while (true) {
-      // this is not an infinite loop as only a finite amount of samples will be drawn
-      // it is possible to return a concrete amount of neighbors also
-      var neighbor = (Individual)individual.Clone();
-      //e.g. make a bit flip in a binary parameter
-      //var bIndex = random.Next(neighbor.BinaryVector(""b"").Length);
-      //neighbor.BinaryVector(""b"")[bIndex] = !neighbor.BinaryVector(""b"")[bIndex];
-      yield return neighbor;
-    }
-  }
-
-  // implement further classes and methods
-}";
-      }
+    private new ISingleObjectiveProblemDefinition CompiledProblemDefinition {
+      get { return (ISingleObjectiveProblemDefinition)base.CompiledProblemDefinition; }
     }
 
@@ -100,5 +44,6 @@
     private SingleObjectiveProblemDefinitionScript(bool deserializing) : base(deserializing) { }
     private SingleObjectiveProblemDefinitionScript(SingleObjectiveProblemDefinitionScript original, Cloner cloner) : base(original, cloner) { }
-    public SingleObjectiveProblemDefinitionScript() :base(){
+    public SingleObjectiveProblemDefinitionScript()
+      : base() {
       Code = CodeTemplate;
     }
@@ -108,10 +53,6 @@
     }
 
-    public new ISingleObjectiveProblemDefinition CompiledProblemDefinition {
-      get { return (ISingleObjectiveProblemDefinition)base.CompiledProblemDefinition; }
-    }
-
     bool ISingleObjectiveProblemDefinition.Maximization {
-      get { return CompiledProblemDefinition != null && CompiledProblemDefinition.Maximization; }
+      get { return CompiledProblemDefinition.Maximization; }
     }
 
@@ -123,4 +64,7 @@
       CompiledProblemDefinition.Analyze(individuals, qualities, results);
     }
+    IEnumerable<Individual> ISingleObjectiveProblemDefinition.GetNeighbors(Individual individual, IRandom random) {
+      return CompiledProblemDefinition.GetNeighbors(individual, random);
+    }
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledMultiObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledMultiObjectiveProblemDefinition.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledMultiObjectiveProblemDefinition.cs	(revision 11753)
@@ -0,0 +1,37 @@
+﻿using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.Programmable {
+  public class CompiledMultiObjectiveProblemDefinition : CompiledProblemDefinition, IMultiObjectiveProblemDefinition {
+    public bool[] Maximization { get { return new[] { false, false }; } }
+
+    public override void Initialize() {
+      // Define the solution encoding which can also consist of multiple vectors, examples below
+      //Encoding = new BinaryEncoding("b", length: 5);
+      //Encoding = new IntegerEncoding("i", length: 5, min: 2, max: 14, step: 4);
+      //Encoding = new RealEncoding("r", length: 5, min: -1.0, max: 1.0);
+      //Encoding = new PermutationEncoding("p", length: 5, type: PermutationTypes.Absolute);
+
+      //Encoding = new MultiEncoding()
+      //.Add(new BinaryEncoding("b", length: 5))
+      //.Add(new IntegerEncoding("i", length: 5, min: 2, max: 14, step: 4))
+      //.Add(new RealEncoding("r", length: 5, min: -1.0, max: 1.0))
+      //.Add(new PermutationEncoding("p", length: 5, type: PermutationTypes.Absolute))
+      ;
+    }
+
+    public double[] Evaluate(Individual individual, IRandom random) {
+      var qualities = new[] { 0.0, 0.0 };
+      // use vars.yourVariable to access variables in the variable store i.e. yourVariable
+      // qualities = new [] { individual.RealVector(""r"").Sum(x => x * x), individual.RealVector(""r"").Sum(x => x * x * x) };
+      return qualities;
+    }
+
+    public void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
+      // write or update results given the range of vectors and resulting qualities
+      // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
+    }
+    // implement further classes and methods
+  }
+}
+
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledSingleObjectiveProblemDefinition.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledSingleObjectiveProblemDefinition.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/CompiledSingleObjectiveProblemDefinition.cs	(revision 11753)
@@ -0,0 +1,59 @@
+﻿using System;
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Programmable;
+
+namespace HeuristicLab.Problems.Programmable {
+  public class CompiledSingleObjectiveProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition {
+    public bool Maximization { get { return false; } }
+
+    public override void Initialize() {
+      // Define the solution encoding which can also consist of multiple vectors, examples below
+      //Encoding = new BinaryEncoding("b", length: 5);
+      //Encoding = new IntegerEncoding("i", length: 5, min: 2, max: 14, step: 4);
+      //Encoding = new RealEncoding("r", length: 5, min: -1.0, max: 1.0);
+      //Encoding = new PermutationEncoding("p", length: 5, type: PermutationTypes.Absolute);
+
+      //Encoding = new MultiEncoding()
+      //.Add(new BinaryEncoding("b", length: 5))
+      //.Add(new IntegerEncoding("i", length: 5, min: 2, max: 14, step: 4))
+      //.Add(new RealEncoding("r", length: 5, min: -1.0, max: 1.0))
+      //.Add(new PermutationEncoding("p", length: 5, type: PermutationTypes.Absolute))
+      //;
+    }
+
+    public double Evaluate(Individual individual, IRandom random) {
+      var quality = 0.0;
+      // use vars.yourVariable to access variables in the variable store i.e. yourVariable
+      //quality = individual.RealVector("r").Sum(x => x * x);
+      return quality;
+    }
+
+    public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results) {
+      // write or update results given the range of vectors and resulting qualities
+      // use e.g. vars.yourVariable to access variables in the variable store i.e. yourVariable
+    }
+
+    public IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
+      // Create new vectors, based on the given one that represent small changes
+      // This method is only called from move-based algorithms (LocalSearch, SimulatedAnnealing, etc.)
+      while (true) {
+        // this is not an infinite loop as only a finite amount of samples will be drawn
+        // it is possible to return a concrete amount of neighbors also
+        var neighbor = individual.Copy();
+        //e.g. make a bit flip in a binary parameter
+        //var bIndex = random.Next(neighbor.BinaryVector("b").Length);
+        //neighbor.BinaryVector("b")[bIndex] = !neighbor.BinaryVector("b")[bIndex];
+        yield return neighbor;
+      }
+    }
+
+    // implement further classes and methods
+  }
+}
+
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.Designer.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.Designer.cs	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.Designer.cs	(revision 11753)
@@ -0,0 +1,107 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18444
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Problems.Programmable.New.Scripts.Templates {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class ScriptTemplates {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal ScriptTemplates() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Problems.Programmable.New.Scripts.Templates.ScriptTemplates", typeof(ScriptTemplates).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///using System.Collections.Generic;
+        ///using HeuristicLab.Common;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Encodings.PermutationEncoding;
+        ///using HeuristicLab.Optimization;
+        ///using HeuristicLab.Problems.Programmable;
+        ///
+        ///namespace HeuristicLab.Problems.Programmable {
+        ///  public class CompiledMultiObjectiveProblemDefinition : CompiledProblemDefinition, IMultiObjectiveProblemDefinition {
+        ///    public bool[] Maximization { get { return new[] { false, fal [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string CompiledMultiObjectiveProblemDefinition {
+            get {
+                return ResourceManager.GetString("CompiledMultiObjectiveProblemDefinition", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///using System.Collections.Generic;
+        ///using HeuristicLab.Common;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Encodings.PermutationEncoding;
+        ///using HeuristicLab.Optimization;
+        ///using HeuristicLab.Problems.Programmable;
+        ///
+        ///namespace HeuristicLab.Problems.Programmable {
+        ///  public class CompiledSingleObjectiveProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition {
+        ///    public bool Maximization { get { return false; } }
+        ///
+        ///     [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string CompiledSingleObjectiveProblemDefinition {
+            get {
+                return ResourceManager.GetString("CompiledSingleObjectiveProblemDefinition", resourceCulture);
+            }
+        }
+    }
+}
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.resx
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.resx	(revision 11753)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/Templates/ScriptTemplates.resx	(revision 11753)
@@ -0,0 +1,127 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="CompiledMultiObjectiveProblemDefinition" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>CompiledMultiObjectiveProblemDefinition.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="CompiledSingleObjectiveProblemDefinition" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>CompiledSingleObjectiveProblemDefinition.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+</root>
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs	(revision 11753)
@@ -24,10 +24,13 @@
 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
+  public abstract class SingleObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, SingleObjectiveEvaluator>,
+    ISingleObjectiveProblemDefinition, ISingleObjectiveHeuristicOptimizationProblem
   where TEncoding : class, IEncoding {
     [StorableConstructor]
@@ -41,8 +44,14 @@
     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 SingleObjectiveEvaluator());
       Operators.Add(new SingleObjectiveAnalyzer());
+      Operators.Add(new SingleObjectiveImprover());
+      Operators.Add(new SingleObjectiveMoveEvaluator());
+      Operators.Add(new SingleObjectiveMoveGenerator());
+      Operators.Add(new SingleObjectiveMoveMaker());
 
       ParameterizeOperators();
@@ -72,4 +81,15 @@
     }
 
+    #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: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveScriptableProblem.cs	(revision 11753)
@@ -21,4 +21,5 @@
 
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -37,9 +38,9 @@
     }
 
-    private SingleObjectiveProblemDefinitionScript ProblemScript {
+    public SingleObjectiveProblemDefinitionScript ProblemScript {
       get { return SingleObjectiveProblemScriptParameter.Value; }
     }
 
-    private ISingleObjectiveProblemDefinition ProblemDefinition {
+    public ISingleObjectiveProblemDefinition ProblemDefinition {
       get { return SingleObjectiveProblemScriptParameter.Value; }
     }
@@ -48,4 +49,5 @@
       : base(original, cloner) {
       RegisterEvents();
+      ProblemScript.Compile();
     }
     public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveScriptableProblem(this, cloner); }
@@ -59,4 +61,6 @@
       Parameters.Add(new FixedValueParameter<SingleObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name }));
       RegisterEvents();
+
+
     }
 
@@ -64,4 +68,5 @@
     private void AfterDeserialization() {
       RegisterEvents();
+      ProblemScript.Compile();
     }
 
@@ -71,4 +76,5 @@
 
     private void OnProblemDefinitionChanged() {
+      Encoding = ProblemDefinition.Encoding;
     }
 
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiEncodingOperator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiEncodingOperator.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/MultiEncodingOperator.cs	(revision 11753)
@@ -20,4 +20,5 @@
 #endregion
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Common;
@@ -30,9 +31,30 @@
 namespace HeuristicLab.Problems.Programmable.Operators {
   public abstract class MultiEncodingOperator<T> : Operator, IMultiEncodingOperator where T : class,IOperator {
+    private List<IEncoding> encodings = new List<IEncoding>();
+    [Storable(Name = "Encodings")]
+    private IEnumerable<IEncoding> StorableEncodings {
+      get { return encodings; }
+      set { encodings = new List<IEncoding>(value); }
+    }
+
     [StorableConstructor]
-    protected MultiEncodingOperator(bool deserializing) : base(deserializing) { }
-    protected MultiEncodingOperator(MultiEncodingOperator<T> original, Cloner cloner) : base(original, cloner) { }
+    protected MultiEncodingOperator(bool deserializing)
+      : base(deserializing) {
+    }
+
+    protected MultiEncodingOperator(MultiEncodingOperator<T> original, Cloner cloner)
+      : base(original, cloner) {
+      encodings = new List<IEncoding>(original.encodings.Select(cloner.Clone));
+      foreach (var encoding in encodings)
+        encoding.OperatorsChanged += Encoding_OperatorsChanged;
+    }
 
     protected MultiEncodingOperator() : base() { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (var encoding in encodings)
+        encoding.OperatorsChanged += Encoding_OperatorsChanged;
+    }
 
 
@@ -44,4 +66,8 @@
     public virtual void AddEncoding(IEncoding encoding) {
       if (Parameters.ContainsKey(encoding.Name)) throw new ArgumentException(string.Format("Encoding {0} was already added.", encoding.Name));
+
+      encodings.Add(encoding);
+      encoding.OperatorsChanged += Encoding_OperatorsChanged;
+
       var param = new ConstrainedValueParameter<T>(encoding.Name, new ItemSet<T>(encoding.Operators.OfType<T>()));
       param.Value = param.ValidValues.First();
@@ -50,5 +76,17 @@
 
     public virtual bool RemoveEncoding(IEncoding encoding) {
+      if (!encodings.Remove(encoding)) throw new ArgumentException(string.Format("Encoding {0} was not added to the MultiEncoding.", encoding.Name));
+      encoding.OperatorsChanged -= Encoding_OperatorsChanged;
       return Parameters.Remove(encoding.Name);
+    }
+
+    public virtual void ReplaceEncoding(IEncoding oldEncoding, IEncoding newEncoding) {
+      var oldParameterValue = GetParameter(oldEncoding).Value;
+      RemoveEncoding(oldEncoding);
+      AddEncoding(newEncoding);
+
+      var parameter = GetParameter(newEncoding);
+      var newParameterValue = parameter.ValidValues.FirstOrDefault(op => op.GetType() == oldParameterValue.GetType());
+      if (newParameterValue != null) parameter.Value = newParameterValue;
     }
 
@@ -59,6 +97,17 @@
     }
 
+    private void Encoding_OperatorsChanged(object sender, EventArgs e) {
+      var encoding = (IEncoding)sender;
+      var param = GetParameter(encoding);
 
+      var oldParameterValue = param.Value;
+      param.ValidValues.Clear();
+      foreach (var op in encoding.Operators.OfType<T>())
+        param.ValidValues.Add(op);
 
+      var newValue = param.ValidValues.FirstOrDefault(op => op.GetType() == oldParameterValue.GetType());
+      if (newValue == null) newValue = param.ValidValues.First();
+      param.Value = newValue;
+    }
   }
 }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveEvaluator.cs	(revision 11753)
@@ -32,5 +32,5 @@
   [Item("Single-objective MoveEvaluator", "Evaluates a parameter vector that results from a move.")]
   [StorableClass]
-  public class SingleObjectiveMoveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, ISingleObjectiveMoveEvaluator, IStochasticOperator {
+  public class SingleObjectiveMoveEvaluator : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator, ISingleObjectiveMoveEvaluator, IStochasticOperator, ISingleObjectiveMoveOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs	(revision 11753)
@@ -35,5 +35,5 @@
   [Item("Single-objective MoveGenerator", "Calls the GetNeighbors method of the problem definition to obtain the moves.")]
   [StorableClass]
-  public class SingleObjectiveMoveGenerator : SingleSuccessorOperator, INeighborBasedOperator, IMultiMoveGenerator, IStochasticOperator {
+  public class SingleObjectiveMoveGenerator : SingleSuccessorOperator, INeighborBasedOperator, IMultiMoveGenerator, IStochasticOperator, ISingleObjectiveMoveOperator {
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
Index: /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs
===================================================================
--- /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs	(revision 11752)
+++ /branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveMaker.cs	(revision 11753)
@@ -32,5 +32,5 @@
   [Item("Single-objective MoveMaker", "Applies a move.")]
   [StorableClass]
-  public class SingleObjectiveMoveMaker : InstrumentedOperator, IMoveMaker {
+  public class SingleObjectiveMoveMaker : InstrumentedOperator, IMoveMaker, ISingleObjectiveMoveOperator {
     public ILookupParameter<IEncoding> EncodingParameter {
       get { return (ILookupParameter<IEncoding>)Parameters["Encoding"]; }
