Index: anches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Extensions/IItemExtensions.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Extensions/IItemExtensions.cs	(revision 17268)
+++ 	(revision )
@@ -1,14 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Manufacture {
-  public static class IItemExtensions {
-    public static void SetWithParameterData(this IItem item, ParameterData data) {
-
-    }
-  }
-}
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Extensions/TypeExtensions.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Extensions/TypeExtensions.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Extensions/TypeExtensions.cs	(revision 17269)
@@ -4,4 +4,5 @@
 using System.Text;
 using System.Threading.Tasks;
+using HeuristicLab.Core;
 
 namespace HeuristicLab.Manufacture {
@@ -9,15 +10,19 @@
     public static int GetInterfaceDistance(this Type type, Type interfaceType) {
       if (!interfaceType.IsInterface) return -1;
-      int distance = 0;
+      int distance = int.MaxValue;
       Type baseType = type;
       while (baseType != typeof(object)) {
         var interfaces = baseType.GetInterfaces();
         var minimalInterfaces = interfaces.Except(interfaces.SelectMany(i => i.GetInterfaces()));
-        if (baseType == interfaceType && minimalInterfaces.Any(i => i == interfaceType))
-          ++distance;
+        if (minimalInterfaces.Any(i => {
+          if (i.IsGenericType)
+            return i.GetGenericTypeDefinition() == interfaceType;
+          return i == interfaceType;
+        })) --distance;
         baseType = baseType.BaseType;
       }
       return distance;
     }
+
     public static bool IsEqualTo(this Type type, Type other) {
       if (other == null) throw new ArgumentNullException("other");
@@ -30,14 +35,4 @@
             .Any(i => i.GetGenericTypeDefinition() == other);
       else if (other.IsInterface) {
-        /*
-        Type baseType = type;
-        while (baseType != typeof(object)) {
-          var interfaces = baseType.GetInterfaces();
-          var minimalInterfaces = interfaces.Except(interfaces.SelectMany(i => i.GetInterfaces()));
-          if (baseType == other && minimalInterfaces.Any(i => i == other))
-            return true;
-          baseType = baseType.BaseType;
-        }
-        */
         return type.GetInterfaces().Any(i => i == other);
       }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/HeuristicLab.Manufacture.csproj
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/HeuristicLab.Manufacture.csproj	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/HeuristicLab.Manufacture.csproj	(revision 17269)
@@ -51,5 +51,4 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Extensions\IItemExtensions.cs" />
     <Compile Include="Extensions\ObjectExtensions.cs" />
     <Compile Include="Extensions\TypeExtensions.cs" />
@@ -58,8 +57,10 @@
     <Compile Include="ParameterTransformer\ConstrainedValueParameterTransformer.cs" />
     <Compile Include="ParameterTransformer\ParameterBaseTransformer.cs" />
+    <Compile Include="ParameterTransformer\ParameterizedItemTransformer.cs" />
     <Compile Include="ParameterTransformer\ValueParameterTransformer.cs" />
     <Compile Include="TypeTransformer\EnumTypeTransformer.cs" />
     <Compile Include="TypeTransformer\DummyTransformer.cs" />
     <Compile Include="ParameterTransformer\LookupParameterTransformer.cs" />
+    <Compile Include="TypeTransformer\MultiCheckedOperatorTransformer.cs" />
     <Compile Include="TypeTransformer\StringValueTransformer.cs" />
     <Compile Include="TypeTransformer\ValueTypeArrayTransformer.cs" />
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCGenerator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCGenerator.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCGenerator.cs	(revision 17269)
@@ -16,9 +16,10 @@
 
   public class CustomWriter : JsonTextWriter {
+    private const int ArrayFlatterLvl = 1;
     private Stack<Formatting> formattings = new Stack<Formatting>();
     private int lvl = 0;
     public override void WriteStartArray() {
       base.WriteStartArray();
-      if(lvl > 1) {
+      if(lvl > ArrayFlatterLvl) {
         formattings.Push(base.Formatting);
         base.Formatting = Formatting.None;
@@ -30,5 +31,5 @@
       base.WriteEndArray();
       lvl--;
-      if (lvl > 1)
+      if (lvl > ArrayFlatterLvl)
         base.Formatting = formattings.Pop();
     }
@@ -49,35 +50,44 @@
 
     private JObject template = JObject.Parse(@"{
-      'Metadata': {},
-      'FreeParameters': {},
-      'StaticParameters': {
-        'Algorithm':{},
-        'Problem':{},
-        'TypeList':{}
-      }
+      'Metadata': {
+        'Algorithm':'',
+        'Problem':''
+      },
+      'Objects': []
     }");
 
     
     private Dictionary<string, string> TypeList = new Dictionary<string, string>();
-
+    
     public string GenerateTemplate(IAlgorithm algorithm, IProblem problem, params string[] freeParameters) {
       algorithm.Problem = problem;
-      IList<JCObject> items = BJCO(algorithm);
+      ParameterData algorithmData = Transformer.Extract(algorithm);
+      ParameterData problemData = Transformer.Extract(problem);
+      IList<ParameterData> items = algorithmData.ParameterizedItems;
+      foreach (var pItem in problemData.ParameterizedItems) items.Add(pItem);
       JArray jsonItems = new JArray();
       
-      foreach(var item in items) {
+      foreach(var item in items.Distinct()) {
         JToken token = JObject.FromObject(item, Settings());
-
+        token["StaticParameters"] = token["Parameters"];
+        token["FreeParameters"] = token["Parameters"];
+        token.Cast<JObject>().Property("Parameters")?.Remove();
         RefactorFreeParameters(token, freeParameters);
         RefactorStaticParameters(token);
         if(token["StaticParameters"].HasValues || token["FreeParameters"].HasValues)
           jsonItems.Add(token);
-      } 
-      return CustomWriter.Serialize(jsonItems);
+      }
+
+      template["Metadata"]["Algorithm"] = algorithm.Name;
+      template["Metadata"]["Problem"] = problem.Name;
+      template["Objects"] = jsonItems;
+
+      return CustomWriter.Serialize(template);
     }
 
+    #region Helper
     private void RefactorFreeParameters(JToken token, string[] freeParameters) {
 
-      token["FreeParameters"] = token["StaticParameters"];
+      //token["FreeParameters"] = token["StaticParameters"];
 
       IList<JObject> objToRemove = new List<JObject>();
@@ -98,5 +108,5 @@
       }, token["FreeParameters"]);
       foreach (var x in objToRemove) x.Remove();
-     
+
     }
 
@@ -110,33 +120,4 @@
       foreach (var x in objToRemove) x.Remove();
     }
-      
-    
-
-    #region Helper
-    private IList<JCObject> BJCO(IParameterizedItem item) {
-      List<JCObject> list = new List<JCObject>();
-      JCObject obj = new JCObject();
-      obj.Name = item.ItemName;
-      obj.Type = item.GetType().AssemblyQualifiedName;
-      obj.StaticParameters = new List<ParameterData>();
-      list.Add(obj);
-
-      foreach (var param in item.Parameters) {
-        if(!param.Hidden) {
-          obj.StaticParameters.Add(Transformer.Extract(param));
-
-          if (param is IParameterizedItem)
-            list.AddRange(BJCO(param.Cast<IParameterizedItem>()));
-          
-          if (param.GetType().IsEqualTo(typeof(IConstrainedValueParameter<>)))
-            foreach (var validValue in param.Cast<dynamic>().ValidValues)
-              if (validValue is IParameterizedItem && 
-                ((IParameterizedItem)validValue).Parameters.Any(p => !p.Hidden))
-                list.AddRange(BJCO((IParameterizedItem)validValue));
-        }
-      }
-      return list;
-    }
-
 
     private JsonSerializer Settings() => new JsonSerializer() {
@@ -152,20 +133,4 @@
     }
     #endregion
-
-    /*
-    private void ExtractOperatorInfo(IItem item, ParameterData obj) {
-      if (item is IMultiOperator) {
-        foreach (var op in ((IMultiOperator)item).Operators) {
-          ParameterData newOperator = BuildJCParameter(op);
-          if (obj.Operators == null)
-            obj.Operators = new List<ParameterData>();
-          obj.Operators.Add(newOperator);
-          newOperator.Name = op.GetType().Name;
-
-          newOperator.Path = obj.Path + ".Operators." + op.Name;
-          MultiPermutationManipulator manipulator = new MultiPermutationManipulator();
-        }
-      }
-    }*/
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCInstantiator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCInstantiator.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/JCInstantiator.cs	(revision 17269)
@@ -16,182 +16,77 @@
   
   public class JCInstantiator {
-    //private Dictionary<string, JCProperty> Properties = new Dictionary<string, JCProperty>();
-    private Dictionary<string, string> TypeList = new Dictionary<string, string>();
 
-    #region Constants
-    private const string SParametersID = "StaticParameters";
-    private const string FParametersID = "FreeParameters";
-    private const string TListID = "TypeList";
-    private const string AlgorithmID = "Algorithm";
-    private const string ProblemID = "Problem";
-    #endregion
+    private JToken Config { get; set; }
 
     public IAlgorithm Instantiate(string configFile) {
-      JArray config = JArray.Parse(File.ReadAllText(configFile));
-      JCObject obj = config[0].ToObject<JCObject>();
-      IAlgorithm algorithm = CreateObject<IAlgorithm>(obj);
+      Config = JToken.Parse(File.ReadAllText(configFile));
 
-      foreach(var sp in obj.StaticParameters) {
-        if(algorithm.Parameters.TryGetValue(sp.Name, out IParameter param)) {
-          Transformer.Inject(param, sp);
+      ParameterData algorithmData = GetData(Config["Metadata"]["Algorithm"].ToString());
+      ResolveReferences(algorithmData);
+      IAlgorithm algorithm = CreateObject<IAlgorithm>(algorithmData);
+     
+      ParameterData problemData = GetData(Config["Metadata"]["Problem"].ToString());
+      ResolveReferences(problemData);
+      IProblem problem = CreateObject<IProblem>(problemData);
+      algorithm.Problem = problem;
+
+      Transformer.Inject(algorithm, algorithmData);
+      Transformer.Inject(algorithm, problemData);
+
+      return algorithm;
+    }
+
+    /*
+     * resolve references
+     */
+
+    private void ResolveReferences(ParameterData data) {
+      foreach (var p in data.Parameters) {
+        if (p.Default is string && p.Reference == null) {
+          p.Reference = GetData(p.Default.Cast<string>());
         }
       }
+    }
 
-      foreach (var sp in obj.FreeParameters) {
-        if (algorithm.Parameters.TryGetValue(sp.Name, out IParameter param)) {
-          if(IsInRangeList(sp.Range, sp.Default) || 
-            IsInNumericRange<long>(sp.Default, sp.Range[0], sp.Range[1]) || 
-            IsInNumericRange<double>(sp.Default, sp.Range[0], sp.Range[1]))
-          Transformer.Inject(param, sp);
-        }
+    private ParameterData GetData(string key)
+    {
+      foreach(JObject item in Config["Objects"])
+      {
+        ParameterData data = BuildDataFromJObject(item);
+        if (data.Name == key) return data;
+      }
+      return null;
+    }
+
+    private ParameterData BuildDataFromJObject(JObject obj) {
+      ParameterData data = new ParameterData() {
+        Name = obj["Name"]?.ToString(),
+        Default = obj["Default"]?.ToObject<object>(),
+        Range = obj["Range"]?.ToObject<object[]>(),
+        Type = obj["Type"]?.ToObject<string>()
+      };
+
+      if(obj["StaticParameters"] != null)
+        foreach (JObject sp in obj["StaticParameters"])
+          data[sp["Name"].ToString()] = BuildDataFromJObject(sp);
+
+      if (obj["FreeParameters"] != null)
+        foreach (JObject sp in obj["FreeParameters"])
+          data[sp["Name"].ToString()] = BuildDataFromJObject(sp);
+
+      if (obj["Operators"] != null) {
+        data.Operators = new List<ParameterData>();
+        foreach (JObject sp in obj["Operators"])
+          data.Operators.Add(BuildDataFromJObject(sp));
       }
 
-
-      return algorithm;
-
-
-      /*
-      TypeList = config[SParametersID][TListID].ToObject<Dictionary<string, string>>();
-
-      JCObject algorithmData = config[SParametersID][AlgorithmID].ToObject<JCObject>();
-      JCObject problemData = config[SParametersID][ProblemID].ToObject<JCObject>();
-
-      IAlgorithm algorithm = CreateTypeListObject<IAlgorithm>(algorithmData.Name);
-      algorithm.Problem = CreateTypeListObject<IProblem>(problemData.Name);
-
-      ProcessParameters(algorithmData, algorithm);
-      ProcessParameters(problemData, algorithm.Problem);
-
-      ParameterData[] freeAlgorithmParameters = config[FParametersID][algorithmData.Name].ToObject<ParameterData[]>();
-      ParameterData[] freeProblemParameters = config[FParametersID][problemData.Name].ToObject<ParameterData[]>();
-      UseFreeParams(algorithmData.Name, freeAlgorithmParameters, algorithm);
-      UseFreeParams(problemData.Name, freeProblemParameters, algorithm.Problem);
-      return algorithm;
-      */
+      return data;
     }
 
-    private T CreateObject<T>(JCObject obj) {
-      Type type = Type.GetType(obj.Type);
+    private T CreateObject<T>(ParameterData data) {
+      Type type = Type.GetType(data.Type);
       return (T)Activator.CreateInstance(type);
     }
 
-    private T CreateTypeListObject<T>(string key) {
-      if (TypeList.TryGetValue(key, out string value)) {
-        Type type = Type.GetType(value);
-        return (T)Activator.CreateInstance(type);
-      } else throw new TypeLoadException($"The type '{key}' does not exists in TypeList.");
-    }
-
-    private void ProcessParameters(JCObject obj, IParameterizedItem instance) {
-      foreach (var param in obj.StaticParameters)
-        if (param.Default != null)
-          SetParameterValue(FindPropertyByKey(instance, param.Name), param.Default);
-    }
-
-    private void SetParameterValue (IParameter parameter, object value) {
-      if (Util.IsTypeOf(parameter, typeof(IFixedValueParameter<>))) return;
-      if (Util.IsTypeOf(parameter, typeof(IConstrainedValueParameter<>)))
-        SetCVParameter(parameter, value);
-      else if (Util.IsTypeOf(parameter.ActualValue, typeof(ValueTypeMatrix<>)))
-        SetVTMatrix(parameter, value);
-      else if (Util.IsTypeOf(parameter.ActualValue, typeof(ValueTypeArray<>)))
-        SetVTArray(parameter, value);
-      else if (Util.IsTypeOf(parameter.ActualValue, typeof(EnumValue<>)))
-        SetEnum(parameter, value);
-      else if (!(value is string))
-        SetValue(parameter, value);
-      else
-        SetNewInstance(parameter, value);
-    }
-    #region Helper for SetParameterValue
-    private void SetCVParameter(IParameter parameter, object value) {
-      foreach (var x in ((dynamic)parameter).ValidValues)
-        if (x.GetType().Name == (string)value)
-          parameter.ActualValue = x;
-    }
-
-    private void SetVTMatrix(IParameter parameter, object value) {
-      var matrixType = ((dynamic)parameter.ActualValue).CloneAsMatrix().GetType();
-      var data = ((JToken)value).ToObject(matrixType);
-      parameter.ActualValue = (IItem)Activator.CreateInstance(parameter.ActualValue.GetType(), new object[] { data });
-    }
-
-    private void SetVTArray(IParameter parameter, object value) {
-      var arrayType = ((dynamic)parameter.ActualValue).CloneAsArray().GetType();
-      var data = ((JToken)value).ToObject(arrayType);
-      parameter.ActualValue = (IItem)Activator.CreateInstance(parameter.ActualValue.GetType(), new object[] { data });
-    }
-
-    private void SetEnum(IParameter parameter, object value) {
-      var enumType = ((dynamic)parameter.ActualValue).Value.GetType();
-      var data = Enum.Parse(enumType, (string)value);
-      ((dynamic)parameter.ActualValue).Value = data;
-    }
-
-    private void SetValue(IParameter parameter, object value) {
-      var x = (dynamic)parameter.ActualValue;
-      if (value is IConvertible)
-        x.Value = Convert.ChangeType(value, x.Value.GetType());
-      else
-        x.Value = value;
-    }
-
-    private void SetNewInstance(IParameter parameter, object value) => 
-      parameter.ActualValue = (IItem)Activator.CreateInstance(Type.GetType(TypeList[(string)value]));
-    #endregion
-
-    private IParameter FindPropertyByKey(IParameterizedItem item, string key) {
-      if (item.Parameters.TryGetValue(key, out IParameter param))
-        return param;
-      else throw new KeyNotFoundException();
-    }
-
-
-    /*
-    JCProperty property = FindPropertyByPath(instance, param.Path);
-    property.Value = param.Default;
-    Properties.Add(obj.Name + "." + param.Name, property); 
-    
-    private JCProperty FindPropertyByPath(object start, string path) {
-      string[] parts = path.Split('.');
-      object instance = start;
-      for (int i = 0; i < parts.Length - 1; ++i) {
-        if (parts[i].StartsWith("Parameters['")) {
-          IParameterizedItem pItem = (IParameterizedItem)instance;
-          string tmp = parts[i].Replace("Parameters['", "").Replace("']", "");
-          if (pItem.Parameters.ContainsKey(tmp))
-            instance = pItem.Parameters[tmp];
-        } else {
-          PropertyInfo propInfo = instance.GetType().GetProperty(parts[i]);
-          instance = propInfo.GetValue(instance);
-        }
-      }
-      return new JCProperty(instance.GetType().GetProperty(parts[parts.Length - 1]), instance, TypeList);
-    }
-    */
-    private bool IsInRangeList(IEnumerable<object> list, object value) {
-      foreach (var x in list)
-        if (x.Equals(value)) return true;
-      return false;
-    }
-
-    private void UseFreeParams(string root, ParameterData[] parameters, IParameterizedItem instance) {
-      foreach (var param in parameters) {
-        string key = $"{root}.{param.Name}";
-        if((param.Range == null && param.Default != null) ||
-          (param.Range != null && IsInRangeList(param.Range, param.Default)) ||
-          IsInNumericRange<long>(param.Default, param.Range[0], param.Range[1]) ||
-          IsInNumericRange<double>(param.Default, param.Range[0], param.Range[1]))
-          SetParameterValue(FindPropertyByKey(instance, param.Name), param.Default);
-        //Properties[key].Value = param.Default;
-        else
-          throw new ArgumentOutOfRangeException(key);
-      }
-    }
-
-    private bool IsInNumericRange<T>(object value, object min, object max) where T : IComparable =>
-      (value != null && min != null && max != null && value is T && min is T && max is T &&
-        (((T)min).CompareTo(value) == -1 || ((T)min).CompareTo(value) == 0) && 
-        (((T)max).CompareTo(value) ==  1 || ((T)max).CompareTo(value) == 0));
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ConstrainedValueParameterTransformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ConstrainedValueParameterTransformer.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ConstrainedValueParameterTransformer.cs	(revision 17269)
@@ -12,11 +12,16 @@
         if (x.GetType().Name == CastValue<string>(data.Default))
           parameter.ActualValue = x;
+
+      if (parameter.ActualValue is IParameterizedItem && data.Reference != null)
+        Transformer.Inject(parameter.ActualValue, data.Reference);
     }
 
     public override ParameterData ExtractData(IParameter value) {
+
       return new ParameterData() {
         Name = value.Name,
         Default = value.ActualValue?.GetType().Name,
-        Range = GetValidValues(value)
+        Range = GetValidValues(value),
+        ParameterizedItems = GetParameterizedChilds(value)
       };
     }
@@ -26,6 +31,22 @@
       List<object> list = new List<object>();
       var values = value.Cast<dynamic>().ValidValues;
-      foreach (var x in values) list.Add(x);
-      return list.Select(x => x.GetType().Name).ToArray();
+      foreach (var x in values) list.Add(x.GetType().Name);
+      return list.ToArray();
+    }
+
+    private IList<ParameterData> GetParameterizedChilds(IParameter value) {
+      List<ParameterData> list = new List<ParameterData>();
+      var values = value.Cast<dynamic>().ValidValues;
+      foreach(var x in values) {
+        if (x is IParameterizedItem &&
+            ((IParameterizedItem)x).Parameters.Any(p => !p.Hidden)) {
+          ParameterData tmp = Transformer.Extract(x);
+          if (tmp.ParameterizedItems != null)
+            list.AddRange(tmp.ParameterizedItems);
+          else
+            list.Add(tmp);
+        }
+      }
+      return list.Count == 0 ? null : list;
     }
     #endregion
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ParameterizedItemTransformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ParameterizedItemTransformer.cs	(revision 17269)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ParameterizedItemTransformer.cs	(revision 17269)
@@ -0,0 +1,40 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Manufacture
+{
+  public class ParameterizedItemTransformer : BaseTransformer {
+    
+    public override void InjectData(IItem item, ParameterData data) {
+      IParameterizedItem pItem = item.Cast<IParameterizedItem>();
+
+      foreach (var sp in data.Parameters)
+        if (pItem.Parameters.TryGetValue(sp.Name, out IParameter param))
+          Transformer.Inject(param, sp);
+    }
+
+    public override ParameterData ExtractData(IItem value) {
+      List<ParameterData> list = new List<ParameterData>();
+
+      ParameterData obj = new ParameterData();
+      obj.Name = value.ItemName;
+      obj.Type = value.GetType().AssemblyQualifiedName;
+      obj.ParameterizedItems = list;
+      list.Add(obj);
+
+      foreach (var param in value.Cast<IParameterizedItem>().Parameters) {
+        if (!param.Hidden) {
+          ParameterData data = Transformer.Extract(param);
+          obj[data.Name] = data;
+          if(data.ParameterizedItems != null)
+            list.AddRange(data.ParameterizedItems);
+        }
+      }
+      return obj;
+    }
+  }
+}
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ValueParameterTransformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ValueParameterTransformer.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/ParameterTransformer/ValueParameterTransformer.cs	(revision 17269)
@@ -13,5 +13,9 @@
 
     public override ParameterData ExtractData(IParameter value) {
-      ParameterData data = Transformer.Extract(value.ActualValue);
+      ParameterData data = null;
+      if (value.ActualValue == null)
+        data = new ParameterData();
+      else
+        data = Transformer.Extract(value.ActualValue);
       data.Name = value.Name;
       return data;
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Program.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Program.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Program.cs	(revision 17269)
@@ -31,15 +31,12 @@
   public class Program {
     static void Main(string[] args) {
-      //GeneticAlgorithm ga = new GeneticAlgorithm();
       GeneticAlgorithm alg = new GeneticAlgorithm();
       TravelingSalesmanProblem tsp = new TravelingSalesmanProblem();
 
       JCGenerator gen = new JCGenerator();
-      File.WriteAllText(@"C:\Workspace\TemplateProto10.json", gen.GenerateTemplate(alg, tsp));
+      //File.WriteAllText(@"C:\Workspace\TemplateProto10.json", gen.GenerateTemplate(alg, tsp));
       
       JCInstantiator configurator = new JCInstantiator();
       configurator.Instantiate(@"C:\Workspace\TemplateProto10.json");
-      //Configure(@"C:\Workspace\TemplateProto9.json");
-      //Console.WriteLine(Optimizer);
 
       //Console.ReadLine();
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Template.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Template.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Template.cs	(revision 17269)
@@ -8,5 +8,6 @@
 
 namespace HeuristicLab.Manufacture {   
-  public class JCObject { //Blueprint, Component,  ?
+  /*
+  public class ParameterData { //Blueprint, Component,  ?
     public string Name { get; set; }
     public string Type { get; set; }
@@ -14,49 +15,81 @@
     public IList<ParameterData> StaticParameters { get; set; }
 
-    public override string ToString() {
-      StringBuilder sb = new StringBuilder();
-      sb.Append($"{Name}: [");
-      foreach(var x in StaticParameters) {
-        sb.Append(x?.ToString());
-      }
-      sb.Append($"\n]");
-      return sb.ToString();
-    }
-  }
+  }*/
 
   public class ParameterData {
     public string Name { get; set; }
-    [JsonIgnore]
     public string Type { get; set; }
     public object Default { get; set; }
-    //[JsonIgnore]
     public string Path { get; set; }
     public IList<object> Range { get; set; }
+
     public IList<ParameterData> Parameters { get; set; }
     public IList<ParameterData> Operators { get; set; }
 
-    public ParameterData() { }
-    /*
-    public ParameterData(ParameterData original) {
-      this.Name = original.Name;
-      this.Type = original.Type;
-      this.Default = original.Default;
-      this.Path = original.Path;
-      this.Name = original.Name;
-      this.Name = original.Name;
-    }*/
-    public override string ToString() {
-      StringBuilder sb = new StringBuilder();
-      sb.Append($"\n{Name}, {Default}, Range[");
-      if(Range != null) {
-        foreach (var x in Range) {
-          sb.Append(x.ToString() + ", ");
-        }
+    [JsonIgnore]
+    public ParameterData this[string index] {
+      get {
+        if (Parameters == null) return null;
+        foreach (var p in Parameters)
+          if (p.Name == index) return p;
+        return null;
       }
-      sb.Append($"],");
-      return sb.ToString();
+      set {
+        if (Parameters == null) 
+          Parameters = new List<ParameterData>();
+        ParameterData data = this[index];
+        if (data != null && CheckConstraints(value))
+          Merge(data, value);
+        else
+          Parameters.Add(value);
+      }
     }
+
+    public override bool Equals(object obj) {
+      if (!(obj is ParameterData)) 
+        return false;
+      else 
+        return obj.Cast<ParameterData>().Name == this.Name;
+    }
+
+    public override int GetHashCode() {
+      return Name.GetHashCode();
+    }
+
+    [JsonIgnore]
+    public IList<ParameterData> ParameterizedItems { get; set; }
+
+    [JsonIgnore]
+    public ParameterData Reference { get; set; }
+
+    #region Helper
+    public static void Merge(ParameterData target, ParameterData from) {
+      target.Name = from.Name ?? target.Name;
+      target.Type = from.Type ?? target.Type;
+      target.Range = from.Range ?? target.Range;
+      target.Path = from.Path ?? target.Path;
+      target.Default = from.Default ?? target.Default;
+      target.Reference = from.Reference ?? target.Reference;
+      target.Parameters = from.Parameters ?? target.Parameters;
+      target.ParameterizedItems = from.ParameterizedItems ?? target.ParameterizedItems;
+    }
+
+    private bool CheckConstraints(ParameterData data) => 
+      data.Range != null && data.Default != null && (
+      IsInRangeList(data.Range, data.Default) ||
+      IsInNumericRange<long>(data.Default, data.Range[0], data.Range[1]) ||
+      IsInNumericRange<double>(data.Default, data.Range[0], data.Range[1]));
+
+    private bool IsInRangeList(IEnumerable<object> list, object value) {
+      foreach (var x in list)
+        if (x.Equals(value)) return true;
+      return false;
+    }
+
+    private bool IsInNumericRange<T>(object value, object min, object max) where T : IComparable =>
+      (value != null && min != null && max != null && value is T && min is T && max is T &&
+        (((T)min).CompareTo(value) == -1 || ((T)min).CompareTo(value) == 0) &&
+        (((T)max).CompareTo(value) == 1 || ((T)max).CompareTo(value) == 0));
+    #endregion
   }
-
-
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Transformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Transformer.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Transformer.cs	(revision 17269)
@@ -19,10 +19,13 @@
     public static void Register<T>(ITypeTransformer transformer) => Register(typeof(T), transformer);
 
-    public static ITypeTransformer Get(Type type) {
+    public static IEnumerable<ITypeTransformer> Get(Type type) {
       IList<KeyValuePair<Type, ITypeTransformer>> possibleTransformers = new List<KeyValuePair<Type, ITypeTransformer>>();
+
+
       foreach (var x in transformers) {
         if (type.IsEqualTo(x.Key))
           possibleTransformers.Add(x);
       }
+
 
       if(possibleTransformers.Count > 0) {
@@ -36,15 +39,26 @@
           }
         }
-        return nearest;
+        return new ITypeTransformer[] { nearest };
+        /*
+        return possibleTransformers.OrderBy(x => {
+          return type.GetInterfaceDistance(x.Key);
+        }).Select(x => x.Value);
+        */
       }
-      return new DummyTransformer();
+      return new ITypeTransformer[] { new DummyTransformer() };
     }
 
     internal static void Inject(IItem item, ParameterData data) {
-      Get(item.GetType()).Inject(item, data);
+      IEnumerable<ITypeTransformer> arr = Get(item.GetType());
+      foreach (var transformer in arr)
+        transformer.Inject(item, data);
     }
 
     internal static ParameterData Extract(IItem item) {
-      return Get(item.GetType()).Extract(item);
+      IEnumerable<ITypeTransformer> arr = Get(item.GetType());
+      ParameterData data = new ParameterData();
+      foreach (var transformer in arr)
+        ParameterData.Merge(data, transformer.Extract(item));
+      return data;
     }
 
@@ -71,4 +85,6 @@
       Register(typeof(ILookupParameter), new LookupParameterTransformer());
       Register(typeof(IValueParameter), new ValueParameterTransformer());
+      Register(typeof(IParameterizedItem), new ParameterizedItemTransformer());
+      Register(typeof(ICheckedMultiOperator<>), new MultiCheckedOperatorTransformer());
     }
 
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/DummyTransformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/DummyTransformer.cs	(revision 17268)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/DummyTransformer.cs	(revision 17269)
@@ -13,5 +13,6 @@
     }
 
-    public override ParameterData ExtractData(IItem value) => new ParameterData();
+    public override ParameterData ExtractData(IItem value) => 
+      new ParameterData() { Default = value.GetType().Name };
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/MultiCheckedOperatorTransformer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/MultiCheckedOperatorTransformer.cs	(revision 17269)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/TypeTransformer/MultiCheckedOperatorTransformer.cs	(revision 17269)
@@ -0,0 +1,41 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Manufacture {
+  public class MultiCheckedOperatorTransformer : ParameterizedItemTransformer {
+    public override ParameterData ExtractData(IItem value) {
+      ParameterData data = base.ExtractData(value);
+
+      data.Operators = new List<ParameterData>();
+      dynamic val = value.Cast<dynamic>();
+      foreach (var op in val.Operators) {
+        data.Operators.Add(new ParameterData() {
+          Name = op.Name,
+          Default = val.Operators.ItemChecked(op),
+          Range = new object[] { false, true }
+        });
+      }
+      return data;
+    }
+
+    public override void InjectData(IItem item, ParameterData data) {
+      base.InjectData(item, data);
+
+      dynamic val = item.Cast<dynamic>();
+      foreach (var op in val.Operators) {
+        val.Operators.SetItemCheckedState(op, GetOperatorState(op.Name, data));
+      }
+    }
+
+    private bool GetOperatorState(string name, ParameterData data) {
+      foreach(var op in data.Operators) {
+        if (op.Name == name) return op.Default.Cast<bool>();
+      }
+      return false;
+    }
+  }
+}
