Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/BloodGlucosePrediction.sln
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/BloodGlucosePrediction.sln	(revision 13867)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/BloodGlucosePrediction.sln	(revision 13867)
@@ -0,0 +1,32 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction-3.3", "HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction-3.3.csproj", "{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|x64.ActiveCfg = Debug|x64
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|x64.Build.0 = Debug|x64
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|x86.ActiveCfg = Debug|x86
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Debug|x86.Build.0 = Debug|x86
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|x64.ActiveCfg = Release|x64
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|x64.Build.0 = Release|x64
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|x86.ActiveCfg = Release|x86
+		{DADAD981-B7E3-497E-AFF0-9DDBD9BC5DB1}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableSymbol.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableSymbol.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableSymbol.cs	(revision 13867)
@@ -34,28 +34,4 @@
     #region Properties
 
-    [Storable]
-    private double alpha;
-    public double Alpha {
-      get { return alpha; }
-      set {
-        if (value != alpha) {
-          alpha = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-
-    [Storable]
-    private double beta;
-    public double Beta {
-      get { return beta; }
-      set {
-        if (value != beta) {
-          alpha = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-
     private const int minimumArity = 0;
     private const int maximumArity = 0;
@@ -70,4 +46,50 @@
     #endregion
 
+    [Storable]
+    private double minAlpha;
+    public double MinAlpha {
+      get { return minAlpha; }
+      set {
+        if (value != minAlpha) {
+          minAlpha = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double maxAlpha;
+    public double MaxAlpha {
+      get { return maxAlpha; }
+      set {
+        if (value != maxAlpha) {
+          maxAlpha = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable]
+    private double minBeta;
+    public double MinBeta {
+      get { return minBeta; }
+      set {
+        if (value != minBeta) {
+          minBeta = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable]
+    private double maxBeta;
+    public double MaxBeta {
+      get { return maxBeta; }
+      set {
+        if (value != maxBeta) {
+          maxBeta = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
@@ -81,12 +103,16 @@
     protected CurvedChVariableSymbol(CurvedChVariableSymbol original, Cloner cloner)
       : base(original, cloner) {
-      alpha = original.alpha;
-      beta = original.beta;
+      minAlpha = original.minAlpha;
+      maxAlpha = original.maxAlpha;
+      minBeta = original.minBeta;
+      maxBeta = original.maxBeta;
     }
 
-    public CurvedChVariableSymbol(string name, string desc, double alpha, double beta)
+    public CurvedChVariableSymbol(string name, string desc, double minAlpha = 0.001, double maxAlpha = 10, double minBeta = 0.001, double maxBeta = 10)
       : base(name, desc) {
-      this.alpha = alpha;
-      this.beta = beta;
+      this.minAlpha = minAlpha;
+      this.maxAlpha = maxAlpha;
+      this.minBeta = minBeta;
+      this.maxBeta = maxBeta;
     }
 
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableTreeNode.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableTreeNode.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedChVariableTreeNode.cs	(revision 13867)
@@ -32,8 +32,31 @@
       get { return (CurvedChVariableSymbol)base.Symbol; }
     }
+
+    [Storable]
+    private double alpha;
+    public double Alpha {
+      get { return alpha; }
+      set { alpha = value; }
+    }
+
+    [Storable]
+    private double beta;
+    public double Beta {
+      get { return beta; }
+      set { beta = value; }
+    }
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
     [StorableConstructor]
     protected CurvedChVariableTreeNode(bool deserializing) : base(deserializing) { }
     protected CurvedChVariableTreeNode(CurvedChVariableTreeNode original, Cloner cloner)
       : base(original, cloner) {
+      this.alpha = original.alpha;
+      this.beta = original.beta;
+      this.weight = original.weight;
     }
     protected CurvedChVariableTreeNode() { }
@@ -41,13 +64,22 @@
 
     public override bool HasLocalParameters {
-      get { return false; }
+      get { return true; }
     }
 
     public override void ResetLocalParameters(IRandom random) {
       base.ResetLocalParameters(random);
+      weight = NormalDistributedRandom.NextDouble(random, 0, 10);
+      alpha = UniformDistributedRandom.NextDouble(random, Symbol.MinAlpha, Symbol.MaxAlpha);
+      beta = UniformDistributedRandom.NextDouble(random, Symbol.MinBeta, Symbol.MaxBeta);
     }
 
     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
       base.ShakeLocalParameters(random, shakingFactor);
+      weight += NormalDistributedRandom.NextDouble(random, 0, 1.0 * shakingFactor);
+      alpha += NormalDistributedRandom.NextDouble(random, 0, 1 * shakingFactor);
+      beta += NormalDistributedRandom.NextDouble(random, 0, 1 * shakingFactor);
+
+      alpha = Math.Min(Symbol.MaxAlpha, Math.Max(Symbol.MinAlpha, alpha));
+      beta = Math.Min(Symbol.MinBeta, Math.Max(Symbol.MinBeta, beta));
     }
 
@@ -57,5 +89,5 @@
 
     public override string ToString() {
-      return string.Format("curvedCh(alpha: {0}, beta: {1})", Symbol.Alpha, Symbol.Beta);
+      return string.Format("{0:N3}*curvedCh(alpha: {1:N3}, beta: {2:N3})", weight, alpha, beta);
     }
   }
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableSymbol.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableSymbol.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableSymbol.cs	(revision 13867)
@@ -35,10 +35,21 @@
 
     [Storable]
-    private double alpha;
-    public double Alpha {
-      get { return alpha; }
+    private double minAlpha;
+    public double MinAlpha {
+      get { return minAlpha; }
       set {
-        if (value != alpha) {
-          alpha = value;
+        if (value != minAlpha) {
+          minAlpha = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double maxAlpha;
+    public double MaxAlpha {
+      get { return maxAlpha; }
+      set {
+        if (value != maxAlpha) {
+          maxAlpha = value;
           OnChanged(EventArgs.Empty);
         }
@@ -47,10 +58,22 @@
 
     [Storable]
-    private double beta;
-    public double Beta {
-      get { return beta; }
+    private double minBeta;
+    public double MinBeta {
+      get { return minBeta; }
       set {
-        if (value != beta) {
-          alpha = value;
+        if (value != minBeta) {
+          minBeta = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    [Storable]
+    private double maxBeta;
+    public double MaxBeta {
+      get { return maxBeta; }
+      set {
+        if (value != maxBeta) {
+          maxBeta = value;
           OnChanged(EventArgs.Empty);
         }
@@ -81,12 +104,16 @@
     protected CurvedInsVariableSymbol(CurvedInsVariableSymbol original, Cloner cloner)
       : base(original, cloner) {
-      alpha = original.alpha;
-      beta = original.beta;
+      minAlpha = original.minAlpha;
+      maxAlpha = original.maxAlpha;
+      minBeta = original.minBeta;
+      maxBeta = original.maxBeta;
     }
 
-    public CurvedInsVariableSymbol(string name, string desc, double alpha, double beta)
+    public CurvedInsVariableSymbol(string name, string desc, double minAlpha = 0.001, double maxAlpha = 10, double minBeta = 0.001, double maxBeta = 10)
       : base(name, desc) {
-      this.alpha = alpha;
-      this.beta = beta;
+      this.minAlpha = minAlpha;
+      this.maxAlpha = maxAlpha;
+      this.minBeta = minBeta;
+      this.maxBeta = maxBeta;
     }
 
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableTreeNode.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableTreeNode.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/CurvedInsVariableTreeNode.cs	(revision 13867)
@@ -32,8 +32,32 @@
       get { return (CurvedInsVariableSymbol)base.Symbol; }
     }
+
+    [Storable]
+    private double alpha;
+    public double Alpha {
+      get { return alpha; }
+      set { alpha = value; }
+    }
+
+    [Storable]
+    private double beta;
+    public double Beta {
+      get { return beta; }
+      set { beta = value; }
+    }
+
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
     [StorableConstructor]
     protected CurvedInsVariableTreeNode(bool deserializing) : base(deserializing) { }
     protected CurvedInsVariableTreeNode(CurvedInsVariableTreeNode original, Cloner cloner)
       : base(original, cloner) {
+      this.alpha = original.alpha;
+      this.beta = original.beta;
+      this.weight = original.weight;
     }
     protected CurvedInsVariableTreeNode() { }
@@ -41,13 +65,22 @@
 
     public override bool HasLocalParameters {
-      get { return false; }
+      get { return true; }
     }
 
     public override void ResetLocalParameters(IRandom random) {
       base.ResetLocalParameters(random);
+      alpha = UniformDistributedRandom.NextDouble(random, Symbol.MinAlpha, Symbol.MaxAlpha);
+      beta = UniformDistributedRandom.NextDouble(random, Symbol.MinBeta, Symbol.MaxBeta);
+      weight = NormalDistributedRandom.NextDouble(random, 0, 10);
     }
 
     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
       base.ShakeLocalParameters(random, shakingFactor);
+      weight += NormalDistributedRandom.NextDouble(random, 0, 1.0 * shakingFactor); 
+      alpha += NormalDistributedRandom.NextDouble(random, 0, 1 * shakingFactor);
+      beta += NormalDistributedRandom.NextDouble(random, 0, 1 * shakingFactor);
+      
+      alpha = Math.Min(Symbol.MaxAlpha, Math.Max(Symbol.MinAlpha, alpha));
+      beta = Math.Min(Symbol.MinBeta, Math.Max(Symbol.MinBeta, beta));
     }
 
@@ -57,5 +90,5 @@
 
     public override string ToString() {
-      return string.Format("curvedIns(alpha: {0}, beta: {1})", Symbol.Alpha, Symbol.Beta);
+      return string.Format("{0:N3}*curvedIns(alpha: {1:N3}, beta: {2:N3})", weight, alpha, beta);
     }
   }
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Grammar.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Grammar.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Grammar.cs	(revision 13867)
@@ -46,7 +46,5 @@
       var cosCh = new SimpleSymbol("CosCh", "Cos", 1, 1);
       var logCh = new SimpleSymbol("LogCh", "Log", 1, 1);
-      var curvedChShape1 = new CurvedChVariableSymbol("CurvedCh1", "", 2, 5);
-      var curvedChShape2 = new CurvedChVariableSymbol("CurvedCh2", "", 3, 3);
-      var curvedChShape3 = new CurvedChVariableSymbol("CurvedCh3", "", 5, 2);
+      var curvedCh = new CurvedChVariableSymbol("CurvedCh", "");
       // var cteCh = new CteSymbol();
 
@@ -60,7 +58,5 @@
       var cosIns = new SimpleSymbol("CosIns", "Cos", 1, 1);
       var logIns = new SimpleSymbol("LogIns", "Log", 1, 1);
-      var curvedInsShape1 = new CurvedInsVariableSymbol("CurvedIns1", "", 2, 5);
-      var curvedInsShape2 = new CurvedInsVariableSymbol("CurvedIns2", "", 3, 3);
-      var curvedInsShape3 = new CurvedInsVariableSymbol("CurvedIns3", "", 5, 2);
+      var curvedIns = new CurvedInsVariableSymbol("CurvedIns", "");
       var realInsVar = new RealInsulineVariableSymbol();
       // var cteCh = new CteSymbol();
@@ -81,7 +77,6 @@
       AddSymbol(logGluc);
 
-      AddSymbol(curvedChShape1);
-      AddSymbol(curvedChShape2);
-      AddSymbol(curvedChShape3);
+      AddSymbol(curvedCh);
+
       AddSymbol(plusCh);
       AddSymbol(minusCh);
@@ -93,7 +88,5 @@
       AddSymbol(logCh);
 
-      AddSymbol(curvedInsShape1);
-      AddSymbol(curvedInsShape2);
-      AddSymbol(curvedInsShape3);
+      AddSymbol(curvedIns);
       AddSymbol(plusIns);
       AddSymbol(minusIns);
@@ -174,7 +167,6 @@
       }
       // <exprch> ::= (getPrevData(1,k,1) * <cte> * <curvedCH>)
-      AddAllowedChildSymbol(exprCh, curvedChShape1);
-      AddAllowedChildSymbol(exprCh, curvedChShape2);
-      AddAllowedChildSymbol(exprCh, curvedChShape3);
+      AddAllowedChildSymbol(exprCh, curvedCh);
+
 
       /*
@@ -220,7 +212,5 @@
       AddAllowedChildSymbol(exprIns, realInsVar);
 
-      AddAllowedChildSymbol(exprIns, curvedInsShape1);
-      AddAllowedChildSymbol(exprIns, curvedInsShape2);
-      AddAllowedChildSymbol(exprIns, curvedInsShape3);
+      AddAllowedChildSymbol(exprIns, curvedIns);
 
       // root is func
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Interpreter.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Interpreter.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Interpreter.cs	(revision 13867)
@@ -101,8 +101,8 @@
       } else if (node.Symbol is PredictedGlucoseVariableSymbol) {
         var n = (PredictedGlucoseVariableTreeNode)node;
-        return data.predGluc[k + n.RowOffset];
+        return n.Weight * data.predGluc[k + n.RowOffset];
       } else if (node.Symbol is RealGlucoseVariableSymbol) {
         var n = (RealGlucoseVariableTreeNode)node;
-        return data.realGluc[k + n.RowOffset];
+        return n.Weight * data.realGluc[k + n.RowOffset];
       } else if (node.Symbol is CurvedChVariableSymbol) {
         var n = (CurvedChVariableTreeNode)node;
@@ -110,8 +110,8 @@
         int prevValDistance;
         GetPrevDataAndDistance(data.realCh, k, out prevVal, out prevValDistance, maxDistance: 48);
-        return prevVal * Beta(prevValDistance / 48.0, n.Symbol.Alpha, n.Symbol.Beta);
+        return n.Weight * prevVal * Beta(prevValDistance / 48.0, n.Alpha, n.Beta);
       } else if (node.Symbol is RealInsulineVariableSymbol) {
         var n = (RealInsulineVariableTreeNode)node;
-        return data.realIns[k + n.RowOffset];
+        return n.Weight * data.realIns[k + n.RowOffset];
       } else if (node.Symbol is CurvedInsVariableSymbol) {
         var n = (CurvedInsVariableTreeNode)node;
@@ -121,5 +121,5 @@
 
         GetMaxValueAndDistance(data.realIns, k, out maxVal, out maxValDistance, maxDistance: 48);
-        return (sum - maxVal) * maxVal * Beta(maxValDistance / 48.0, n.Symbol.Alpha, n.Symbol.Beta);
+        return n.Weight * (sum - maxVal) * maxVal * Beta(maxValDistance / 48.0, n.Alpha, n.Beta);
       } else {
         throw new InvalidProgramException("found unknown symbol " + node.Symbol);
@@ -128,5 +128,5 @@
 
     private static double Beta(double x, double alpha, double beta) {
-      return alglib.invincompletebeta(alpha, beta, x);
+      return 1.0 / alglib.beta(alpha, beta) * Math.Pow(x, alpha - 1) * Math.Pow(1 - x, beta - 1);
     }
 
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/PredictedGlucoseVariableTreeNode.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/PredictedGlucoseVariableTreeNode.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/PredictedGlucoseVariableTreeNode.cs	(revision 13867)
@@ -38,4 +38,12 @@
       set { rowOffset = value; }
     }
+
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
+
     [StorableConstructor]
     protected PredictedGlucoseVariableTreeNode(bool deserializing) : base(deserializing) { }
@@ -43,4 +51,5 @@
       : base(original, cloner) {
       rowOffset = original.rowOffset;
+      weight = original.weight;
     }
     protected PredictedGlucoseVariableTreeNode() { }
@@ -54,4 +63,5 @@
       base.ResetLocalParameters(random);
       rowOffset = random.Next(Symbol.MinRowOffset, Symbol.MaxRowOffset + 1);
+      weight = NormalDistributedRandom.NextDouble(random, 0, 10);
     }
 
@@ -63,4 +73,6 @@
       rowOffset = Math.Max(rowOffset, Symbol.MinRowOffset);
       rowOffset = Math.Min(rowOffset, Symbol.MaxRowOffset);
+
+      weight += NormalDistributedRandom.NextDouble(random, 0, 1.0 * shakingFactor);
     }
 
@@ -70,5 +82,5 @@
 
     public override string ToString() {
-      return "predGluc(k" + rowOffset + ")";
+      return string.Format("{0:N2}*predGluc(k{1})", weight, rowOffset);
     }
   }
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealGlucoseVariableTreeNode.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealGlucoseVariableTreeNode.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealGlucoseVariableTreeNode.cs	(revision 13867)
@@ -25,4 +25,5 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
 
 namespace HeuristicLab.Problems.GeneticProgramming.GlucosePrediction {
@@ -38,4 +39,11 @@
       set { rowOffset = value; }
     }
+
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
     [StorableConstructor]
     protected RealGlucoseVariableTreeNode(bool deserializing) : base(deserializing) { }
@@ -43,4 +51,5 @@
       : base(original, cloner) {
       rowOffset = original.rowOffset;
+      weight = original.weight;
     }
     protected RealGlucoseVariableTreeNode() { }
@@ -54,4 +63,5 @@
       base.ResetLocalParameters(random);
       rowOffset = random.Next(Symbol.MinRowOffset, Symbol.MaxRowOffset + 1);
+      weight = NormalDistributedRandom.NextDouble(random, 0, 10);
     }
 
@@ -63,4 +73,5 @@
       rowOffset = Math.Max(rowOffset, Symbol.MinRowOffset);
       rowOffset = Math.Min(rowOffset, Symbol.MaxRowOffset);
+      weight += NormalDistributedRandom.NextDouble(random, 0, 1.0 * shakingFactor);
     }
 
@@ -70,5 +81,5 @@
 
     public override string ToString() {
-      return "realGluc(k" + rowOffset + ")";
+      return string.Format("{0:N3} * realGluc(k{1})", weight, rowOffset);
     }
   }
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealInsulineVariableTreeNode.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealInsulineVariableTreeNode.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/RealInsulineVariableTreeNode.cs	(revision 13867)
@@ -25,4 +25,5 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
 
 namespace HeuristicLab.Problems.GeneticProgramming.GlucosePrediction {
@@ -38,4 +39,10 @@
       set { rowOffset = value; }
     }
+    [Storable]
+    private double weight;
+    public double Weight {
+      get { return weight; }
+      set { weight = value; }
+    }
     [StorableConstructor]
     protected RealInsulineVariableTreeNode(bool deserializing) : base(deserializing) { }
@@ -43,4 +50,5 @@
       : base(original, cloner) {
       rowOffset = original.rowOffset;
+      weight = original.weight;
     }
     protected RealInsulineVariableTreeNode() { }
@@ -54,4 +62,5 @@
       base.ResetLocalParameters(random);
       rowOffset = random.Next(Symbol.MinRowOffset, Symbol.MaxRowOffset + 1);
+      weight = NormalDistributedRandom.NextDouble(random, 0, 10);
     }
 
@@ -63,4 +72,5 @@
       rowOffset = Math.Max(rowOffset, Symbol.MinRowOffset);
       rowOffset = Math.Min(rowOffset, Symbol.MaxRowOffset);
+      weight += NormalDistributedRandom.NextDouble(random, 0, 1.0 * shakingFactor);
     }
 
@@ -70,5 +80,5 @@
 
     public override string ToString() {
-      return "realIns(k" + rowOffset + ")";
+      return string.Format("{0:N3}*realIns(k{1})", weight, rowOffset);
     }
   }
Index: branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Solution.cs
===================================================================
--- branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Solution.cs	(revision 13866)
+++ branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Solution.cs	(revision 13867)
@@ -1,12 +1,8 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
