Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IConnectablePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IConnectablePort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IConnectablePort.cs	(revision 12232)
@@ -0,0 +1,34 @@
+#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;
+
+namespace HeuristicLab.Core.Networks {
+  public interface IConnectablePort : IPort {
+    IPort ConnectedPort { get; set; }
+    bool PortConnectionValid { get; }
+
+    bool CanConnectToPort(IPort port);
+
+    event EventHandler ConnectedPortChanged;
+    event EventHandler PortConnectionValidChanged;
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessage.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessage.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessage.cs	(revision 12232)
@@ -0,0 +1,27 @@
+#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.Core.Networks {
+  public interface IMessage : IItem {
+    MessageValueCollection Values { get; }
+    IItem this[string valueName] { get; set; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessagePort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessagePort.cs	(revision 12232)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Core.Networks {
+  public interface IMessagePort : IParameterizedPort, IConnectablePort {
+    new IMessagePort ConnectedPort { get; set; }
+
+    IMessage LastMessage { get; }
+    event EventHandler LastMessageChanged;
+
+    IMessage PrepareMessage();
+    void SendMessage(IMessage message);
+    void SendMessage(IMessage message, CancellationToken token);
+    Task SendMessageAsync(IMessage message);
+    Task SendMessageAsync(IMessage message, CancellationToken token);
+    void ReceiveMessage(IMessage message, CancellationToken token);
+
+    event EventHandler<EventArgs<IMessage, CancellationToken>> MessageSent;
+    event EventHandler<EventArgs<IMessage, CancellationToken>> MessageReceived;
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessageValue.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessageValue.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IMessageValue.cs	(revision 12232)
@@ -0,0 +1,36 @@
+#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;
+
+namespace HeuristicLab.Core.Networks {
+  public interface IMessageValue : IItem {
+    string Name { get; }
+    Type DataType { get; }
+    IItem Value { get; set; }
+
+    event EventHandler ValueChanged;
+  }
+
+  public interface IMessageValue<T> : IMessageValue where T : class, IItem {
+    new T Value { get; set; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetwork.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetwork.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetwork.cs	(revision 12232)
@@ -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
+
+namespace HeuristicLab.Core.Networks {
+  public interface INetwork : INode {
+    IKeyedItemCollection<string, INode> Nodes { get; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetworkItem.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetworkItem.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INetworkItem.cs	(revision 12232)
@@ -0,0 +1,30 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  public interface INetworkItem : INamedItem {
+    INetworkItem Parent { get; }
+    IEnumerable<INetworkItem> Children { get; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INode.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INode.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/INode.cs	(revision 12232)
@@ -0,0 +1,27 @@
+#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.Core.Networks {
+  public interface INode : INetworkItem {
+    new INetwork Parent { get; set; }
+    IKeyedItemCollection<string, IPort> Ports { get; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IParameterizedPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IParameterizedPort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IParameterizedPort.cs	(revision 12232)
@@ -0,0 +1,32 @@
+#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;
+
+namespace HeuristicLab.Core.Networks {
+  public interface IParameterizedPort : IPort {
+    IKeyedItemCollection<string, IPortParameter> Parameters { get; }
+
+    void CloneParametersFromPort(IParameterizedPort port);
+
+    event EventHandler InterfaceChanged;
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPort.cs	(revision 12232)
@@ -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
+
+namespace HeuristicLab.Core.Networks {
+  public interface IPort : INetworkItem {
+    new INode Parent { get; set; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPortParameter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPortParameter.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/IPortParameter.cs	(revision 12232)
@@ -0,0 +1,42 @@
+#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;
+
+namespace HeuristicLab.Core.Networks {
+  public interface IPortParameter : INetworkItem {
+    new IPort Parent { get; set; }
+    Type DataType { get; }
+    PortParameterType Type { get; set; }
+    IItem DefaultValue { get; set; }
+
+    event EventHandler TypeChanged;
+    event EventHandler DefaultValueChanged;
+
+    IMessageValue CreateMessageValue();
+  }
+
+  public interface IPortParameter<T> : IPortParameter where T : class, IItem {
+    new T DefaultValue { get; set; }
+
+    new IMessageValue<T> CreateMessageValue();
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Message.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Message.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Message.cs	(revision 12232)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Drawing;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("Message", "A message sent between ports.")]
+  [StorableClass]
+  public class Message : Item, IMessage {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Comment; }
+    }
+
+    [Storable]
+    protected MessageValueCollection values;
+    public MessageValueCollection Values {
+      get { return values; }
+    }
+    public IItem this[string valueName] {
+      get { return Values[valueName].Value; }
+      set { Values[valueName].Value = value; }
+    }
+
+    [StorableConstructor]
+    protected Message(bool deserializing) : base(deserializing) { }
+    protected Message(Message original, Cloner cloner)
+      : base(original, cloner) {
+      values = cloner.Clone(original.values);
+    }
+    public Message() {
+      values = new MessageValueCollection();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Message(this, cloner);
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageCollection.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageCollection.cs	(revision 12232)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  [StorableClass]
+  [Item("MessageCollection", "A collection of messages.")]
+  public class MessageCollection : ItemCollection<IMessage> {
+    [StorableConstructor]
+    protected MessageCollection(bool deserializing) : base(deserializing) { }
+    protected MessageCollection(MessageCollection original, Cloner cloner) : base(original, cloner) { }
+    public MessageCollection() : base() { }
+    public MessageCollection(int capacity) : base(capacity) { }
+    public MessageCollection(IEnumerable<IMessage> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new MessageCollection(this, cloner); }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessagePort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessagePort.cs	(revision 12232)
@@ -0,0 +1,255 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("MessagePort", "A port of a network node for sending and receiving messages.")]
+  [StorableClass]
+  public class MessagePort : ParameterizedPort, IMessagePort {
+    public override Image ItemImage {
+      get {
+        if (PortConnectionValid) return base.ItemImage;
+        else return HeuristicLab.Common.Resources.VSImageLibrary.Error;
+      }
+    }
+
+    new public PortParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+
+    [Storable]
+    protected IMessagePort connectedPort;
+    public IMessagePort ConnectedPort {
+      get { return connectedPort; }
+      set {
+        if (connectedPort != value) {
+          DeregisterConnectedPortEvents();
+          connectedPort = value;
+          RegisterConnectedPortEvents();
+          OnConnectedPortChanged();
+          CheckPortConnection();
+        }
+      }
+    }
+    IPort IConnectablePort.ConnectedPort {
+      get { return ConnectedPort; }
+      set {
+        if (!(value is IMessagePort))
+          throw new InvalidOperationException("Type mismatch. ConnectedPort is not an IMessagePort.");
+        ConnectedPort = (IMessagePort)value;
+      }
+    }
+    [Storable]
+    protected bool portConnectionValid;
+    public bool PortConnectionValid {
+      get { return portConnectionValid; }
+      protected set {
+        if (value != portConnectionValid) {
+          portConnectionValid = value;
+          OnPortConnectionValidChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+    [Storable]
+    protected IMessage lastMessage;
+    public IMessage LastMessage {
+      get { return lastMessage; }
+      protected set {
+        if (value != lastMessage) {
+          lastMessage = value;
+          OnLastMessageChanged();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    protected MessagePort(bool deserializing) : base(deserializing) { }
+    protected MessagePort(MessagePort original, Cloner cloner)
+      : base(original, cloner) {
+      connectedPort = cloner.Clone(original.connectedPort);
+      portConnectionValid = original.portConnectionValid;
+      lastMessage = null;
+      RegisterConnectedPortEvents();
+    }
+    public MessagePort()
+      : base("MessagePort") {
+      portConnectionValid = true;
+      lastMessage = null;
+    }
+    public MessagePort(string name)
+      : base(name) {
+      portConnectionValid = true;
+      lastMessage = null;
+    }
+    public MessagePort(string name, string description)
+      : base(name, description) {
+      portConnectionValid = true;
+      lastMessage = null;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterConnectedPortEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MessagePort(this, cloner);
+    }
+
+    public bool CanConnectToPort(IPort port) {
+      return (port == null) || (port is IMessagePort);
+    }
+
+    public IMessage PrepareMessage() {
+      if (!PortConnectionValid) throw new InvalidOperationException("Port connection is not valid");
+      var message = new Message();
+
+      // collect output parameters from local port
+      message.Values.AddRange(
+        Parameters
+          .Where(p => p.Type.HasFlag(PortParameterType.Output))
+          .Select(p => p.CreateMessageValue())
+      );
+
+      // collect remaining parameters from connected port
+      if (ConnectedPort != null) {
+        message.Values.AddRange(
+          ConnectedPort.Parameters
+            .Where(p => !message.Values.ContainsKey(p.Name))
+            .Select(p => p.CreateMessageValue())
+        );
+      }
+
+      // collect remaining input parameters from local port
+      message.Values.AddRange(
+        Parameters
+          .Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name))
+          .Select(p => p.CreateMessageValue())
+      );
+
+      return message;
+    }
+    public void SendMessage(IMessage message) {
+      SendMessage(message, CancellationToken.None);
+    }
+    public void SendMessage(IMessage message, CancellationToken token) {
+      if (!PortConnectionValid) throw new InvalidOperationException("Port connection is not valid");
+      if (ConnectedPort != null) ConnectedPort.ReceiveMessage(message, token);
+      LastMessage = message;
+      OnMessageSent(message, token);
+    }
+    public async Task SendMessageAsync(IMessage message) {
+      await SendMessageAsync(message, CancellationToken.None);
+    }
+    public async Task SendMessageAsync(IMessage message, CancellationToken token) {
+      await Task.Run(() => { SendMessage(message, token); }, token);
+    }
+    public event EventHandler<EventArgs<IMessage, CancellationToken>> MessageSent;
+    protected virtual void OnMessageSent(IMessage message, CancellationToken token) {
+      var handler = MessageSent;
+      if (handler != null) handler(this, new EventArgs<IMessage, CancellationToken>(message, token));
+    }
+
+    public void ReceiveMessage(IMessage message, CancellationToken token) {
+      if (!PortConnectionValid) throw new InvalidOperationException("Port connection is not valid");
+      LastMessage = message;
+      OnMessageReceived(message, token);
+      token.ThrowIfCancellationRequested();
+    }
+    public event EventHandler<EventArgs<IMessage, CancellationToken>> MessageReceived;
+    protected virtual void OnMessageReceived(IMessage message, CancellationToken token) {
+      var handler = MessageReceived;
+      if (handler != null) handler(this, new EventArgs<IMessage, CancellationToken>(message, token));
+    }
+
+    public event EventHandler ConnectedPortChanged;
+    protected virtual void OnConnectedPortChanged() {
+      var handler = ConnectedPortChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler PortConnectionValidChanged;
+    protected virtual void OnPortConnectionValidChanged() {
+      var handler = PortConnectionValidChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler LastMessageChanged;
+    protected virtual void OnLastMessageChanged() {
+      var handler = LastMessageChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnInterfaceChanged() {
+      CheckPortConnection();
+      base.OnInterfaceChanged();
+    }
+
+    #region ConnectedPort Events
+    protected virtual void RegisterConnectedPortEvents() {
+      if (connectedPort != null) {
+        connectedPort.InterfaceChanged += ConnectedPort_InterfaceChanged;
+        connectedPort.MessageSent += ConnectedPort_MessageSent;
+      }
+    }
+    protected virtual void DeregisterConnectedPortEvents() {
+      if (connectedPort != null) {
+        connectedPort.InterfaceChanged -= ConnectedPort_InterfaceChanged;
+        connectedPort.MessageSent -= ConnectedPort_MessageSent;
+      }
+    }
+    protected virtual void ConnectedPort_InterfaceChanged(object sender, EventArgs e) {
+      CheckPortConnection();
+    }
+    protected virtual void ConnectedPort_MessageSent(object sender, EventArgs<IMessage, CancellationToken> e) {
+      ReceiveMessage(e.Value, e.Value2);
+    }
+    #endregion
+
+    #region Helpers
+    protected virtual void CheckPortConnection() {
+      PortConnectionValid = (ConnectedPort == null) ||
+                            (ParametersCompatibleToTarget(Parameters, ConnectedPort.Parameters) &&
+                             ParametersCompatibleToTarget(ConnectedPort.Parameters, Parameters));
+    }
+    protected virtual bool ParametersCompatibleToTarget(IEnumerable<IPortParameter> source, IEnumerable<IPortParameter> target) {
+      // checks if the source parameters are compatible to the input parameters of the target
+      foreach (var input in target.Where(p => p.Type.HasFlag(PortParameterType.Input))) {
+        var param = source.Where(p => input.Name == p.Name).FirstOrDefault();
+        if (param == null) {
+          if (input.DefaultValue == null) return false;
+        } else {
+          if (!param.Type.HasFlag(PortParameterType.Output)) return false;
+          if (!input.DataType.IsAssignableFrom(param.DataType)) return false;
+        }
+      }
+      return true;
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValue.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValue.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValue.cs	(revision 12232)
@@ -0,0 +1,138 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Drawing;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("MessageValue", "A value of a message sent between ports.")]
+  [StorableClass]
+  public class MessageValue<T> : Item, IMessageValue<T> where T : class, IItem {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; }
+    }
+    public override Image ItemImage {
+      get {
+        if (value != null) return value.ItemImage;
+        else return base.ItemImage;
+      }
+    }
+
+    [Storable]
+    protected string name;
+    public string Name {
+      get { return name; }
+    }
+    public Type DataType {
+      get { return typeof(T); }
+    }
+    [Storable]
+    protected T value;
+    public T Value {
+      get { return value; }
+      set {
+        if (value != this.value) {
+          DeregisterValueEvents();
+          this.value = value;
+          RegisterValueEvents();
+          OnValueChanged();
+        }
+      }
+    }
+    IItem IMessageValue.Value {
+      get { return Value; }
+      set {
+        T val = value as T;
+        if ((value != null) && (val == null))
+          throw new InvalidOperationException(
+            string.Format("Type mismatch. Value is not a \"{0}\".",
+                          typeof(T).GetPrettyName())
+          );
+        Value = val;
+      }
+    }
+
+    [StorableConstructor]
+    protected MessageValue(bool deserializing) : base(deserializing) { }
+    protected MessageValue(MessageValue<T> original, Cloner cloner)
+      : base(original, cloner) {
+      this.name = original.name;
+      this.value = cloner.Clone(original.value);
+      RegisterValueEvents();
+    }
+    public MessageValue() {
+      name = "MessageValue";
+    }
+    public MessageValue(string name) {
+      if (name == null) this.name = string.Empty;
+      else this.name = name;
+    }
+    public MessageValue(string name, T value)
+      : this(name) {
+      this.value = value;
+      RegisterValueEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterValueEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MessageValue<T>(this, cloner);
+    }
+
+    public override string ToString() {
+      if (Value == null)
+        return string.Format("{0}: null", Name);
+      else
+        return string.Format("{0}: {1}", Name, Value.ToString());
+    }
+
+    public event EventHandler ValueChanged;
+    protected virtual void OnValueChanged() {
+      var handler = ValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+      OnToStringChanged();
+    }
+    protected virtual void RegisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged += Value_ItemImageChanged;
+        value.ToStringChanged += Value_ToStringChanged;
+      }
+    }
+    protected virtual void DeregisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged -= Value_ItemImageChanged;
+        value.ToStringChanged -= Value_ToStringChanged;
+      }
+    }
+    private void Value_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Value_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValueCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValueCollection.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/MessageValueCollection.cs	(revision 12232)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  [StorableClass]
+  [Item("MessageValueCollection", "A collection of message values.")]
+  public class MessageValueCollection : KeyedItemCollection<string, IMessageValue> {
+    [StorableConstructor]
+    protected MessageValueCollection(bool deserializing) : base(deserializing) { }
+    protected MessageValueCollection(MessageValueCollection original, Cloner cloner) : base(original, cloner) { }
+    public MessageValueCollection() : base() { }
+    public MessageValueCollection(int capacity) : base(capacity) { }
+    public MessageValueCollection(IEnumerable<IMessageValue> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new MessageValueCollection(this, cloner); }
+
+    protected override string GetKeyForItem(IMessageValue item) {
+      return item.Name;
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Network.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Network.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Network.cs	(revision 12232)
@@ -0,0 +1,120 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("Network", "Abstract base class for networks.")]
+  [StorableClass]
+  public abstract class Network : Node, INetwork, IStorableContent {
+    public string Filename { get; set; }
+
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Module; }
+    }
+
+    public override IEnumerable<INetworkItem> Children {
+      get { return base.Children.Concat(Nodes.AsEnumerable<INetworkItem>()); }
+    }
+
+    [Storable]
+    private NodeCollection nodes;
+    protected NodeCollection Nodes {
+      get { return nodes; }
+    }
+    private ReadOnlyKeyedItemCollection<string, INode> readOnlyNodes;
+    IKeyedItemCollection<string, INode> INetwork.Nodes {
+      get {
+        if (readOnlyNodes == null) readOnlyNodes = nodes.AsReadOnly();
+        return readOnlyNodes;
+      }
+    }
+
+    [StorableConstructor]
+    protected Network(bool deserializing) : base(deserializing) { }
+    protected Network(Network original, Cloner cloner)
+      : base(original, cloner) {
+      nodes = cloner.Clone(original.nodes);
+      foreach (var n in Nodes)
+        n.Parent = this;
+      readOnlyNodes = null;
+      RegisterNodesEvents();
+    }
+    protected Network()
+      : base("Network") {
+      nodes = new NodeCollection();
+      readOnlyNodes = null;
+      RegisterNodesEvents();
+    }
+    protected Network(string name)
+      : base(name) {
+      nodes = new NodeCollection();
+      readOnlyNodes = null;
+      RegisterNodesEvents();
+    }
+    protected Network(string name, string description)
+      : base(name, description) {
+      nodes = new NodeCollection();
+      readOnlyNodes = null;
+      RegisterNodesEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (var n in Nodes)
+        n.Parent = this;
+      RegisterNodesEvents();
+    }
+
+    #region Nodes Events
+    protected virtual void RegisterNodesEvents() {
+      nodes.ItemsAdded += Nodes_ItemsAdded;
+      nodes.ItemsRemoved += Nodes_ItemsRemoved;
+      nodes.ItemsReplaced += Nodes_ItemsReplaced;
+      nodes.CollectionReset += Nodes_CollectionReset;
+    }
+    protected virtual void Nodes_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<INode> e) {
+      foreach (var n in e.Items)
+        n.Parent = this;
+    }
+    protected virtual void Nodes_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<INode> e) {
+      foreach (var n in e.Items)
+        n.Parent = null;
+    }
+    protected virtual void Nodes_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<INode> e) {
+      foreach (var n in e.OldItems)
+        n.Parent = null;
+      foreach (var n in e.Items)
+        n.Parent = this;
+    }
+    protected virtual void Nodes_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<INode> e) {
+      foreach (var n in e.OldItems)
+        n.Parent = null;
+      foreach (var n in e.Items)
+        n.Parent = this;
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NetworkItem.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NetworkItem.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NetworkItem.cs	(revision 12232)
@@ -0,0 +1,57 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("NetworkItem", "Abstract base class for items of a network.")]
+  [StorableClass]
+  public abstract class NetworkItem : NamedItem, INetworkItem {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
+    }
+
+    private INetworkItem parent;
+    public INetworkItem Parent {
+      get { return parent; }
+      protected set {
+        if (value != parent) {
+          parent = value;
+        }
+      }
+    }
+    public virtual IEnumerable<INetworkItem> Children {
+      get { return Enumerable.Empty<INetworkItem>(); }
+    }
+
+    [StorableConstructor]
+    protected NetworkItem(bool deserializing) : base(deserializing) { }
+    protected NetworkItem(NetworkItem original, Cloner cloner) : base(original, cloner) { }
+    protected NetworkItem() : base("NetworkItem") { }
+    protected NetworkItem(string name) : base(name) { }
+    protected NetworkItem(string name, string description) : base(name, description) { }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Node.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Node.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Node.cs	(revision 12232)
@@ -0,0 +1,125 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("Node", "Abstract base class for nodes of a network.")]
+  [StorableClass]
+  public abstract class Node : NetworkItem, INode {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.RadialChart; }
+    }
+
+    new public INetwork Parent {
+      get { return (INetwork)base.Parent; }
+      set {
+        // NOTE: never call setter directly as the Parent property is set by the network which contains the node
+        base.Parent = value;
+      }
+    }
+    public override IEnumerable<INetworkItem> Children {
+      get { return base.Children.Concat(Ports.AsEnumerable<INetworkItem>()); }
+    }
+
+    [Storable]
+    private PortCollection ports;
+    protected PortCollection Ports {
+      get { return ports; }
+    }
+    private ReadOnlyKeyedItemCollection<string, IPort> readOnlyPorts;
+    IKeyedItemCollection<string, IPort> INode.Ports {
+      get {
+        if (readOnlyPorts == null) readOnlyPorts = ports.AsReadOnly();
+        return readOnlyPorts;
+      }
+    }
+
+    [StorableConstructor]
+    protected Node(bool deserializing) : base(deserializing) { }
+    protected Node(Node original, Cloner cloner)
+      : base(original, cloner) {
+      ports = cloner.Clone(original.ports);
+      foreach (var p in Ports)
+        p.Parent = this;
+      readOnlyPorts = null;
+      RegisterPortsEvents();
+    }
+    protected Node()
+      : base("Node") {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+      RegisterPortsEvents();
+    }
+    protected Node(string name)
+      : base(name) {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+      RegisterPortsEvents();
+    }
+    protected Node(string name, string description)
+      : base(name, description) {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+      RegisterPortsEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (var p in Ports)
+        p.Parent = this;
+      RegisterPortsEvents();
+    }
+
+    #region Ports Events
+    protected virtual void RegisterPortsEvents() {
+      ports.ItemsAdded += Ports_ItemsAdded;
+      ports.ItemsRemoved += Ports_ItemsRemoved;
+      ports.ItemsReplaced += Ports_ItemsReplaced;
+      ports.CollectionReset += Ports_CollectionReset;
+    }
+    protected virtual void Ports_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      foreach (var p in e.Items)
+        p.Parent = this;
+    }
+    protected virtual void Ports_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      foreach (var p in e.Items)
+        p.Parent = null;
+    }
+    protected virtual void Ports_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      foreach (var p in e.OldItems)
+        p.Parent = null;
+      foreach (var p in e.Items)
+        p.Parent = this;
+    }
+    protected virtual void Ports_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      foreach (var p in e.OldItems)
+        p.Parent = null;
+      foreach (var p in e.Items)
+        p.Parent = this;
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NodeCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NodeCollection.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/NodeCollection.cs	(revision 12232)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  [StorableClass]
+  [Item("NodeCollection", "A collection of network nodes.")]
+  public class NodeCollection : NamedItemCollection<INode> {
+    [StorableConstructor]
+    protected NodeCollection(bool deserializing) : base(deserializing) { }
+    protected NodeCollection(NodeCollection original, Cloner cloner) : base(original, cloner) { }
+    public NodeCollection() : base() { }
+    public NodeCollection(int capacity) : base(capacity) { }
+    public NodeCollection(IEnumerable<INode> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new NodeCollection(this, cloner); }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/ParameterizedPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/ParameterizedPort.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/ParameterizedPort.cs	(revision 12232)
@@ -0,0 +1,166 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("ParameterizedPort", "Abstract base class for parameterized ports of network nodes.")]
+  [StorableClass]
+  public abstract class ParameterizedPort : Port, IParameterizedPort {
+    public override IEnumerable<INetworkItem> Children {
+      get { return base.Children.Concat(Parameters.AsEnumerable<INetworkItem>()); }
+    }
+
+    [Storable]
+    private PortParameterCollection parameters;
+    protected PortParameterCollection Parameters {
+      get { return parameters; }
+    }
+    private ReadOnlyKeyedItemCollection<string, IPortParameter> readOnlyParameters;
+    IKeyedItemCollection<string, IPortParameter> IParameterizedPort.Parameters {
+      get {
+        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
+        return readOnlyParameters;
+      }
+    }
+
+    [StorableConstructor]
+    protected ParameterizedPort(bool deserializing) : base(deserializing) { }
+    protected ParameterizedPort(ParameterizedPort original, Cloner cloner)
+      : base(original, cloner) {
+      parameters = cloner.Clone(original.parameters);
+      foreach (var p in Parameters)
+        p.Parent = this;
+      readOnlyParameters = null;
+      RegisterParametersEvents();
+    }
+    protected ParameterizedPort()
+      : base("ParameterizedPort") {
+      parameters = new PortParameterCollection();
+      readOnlyParameters = null;
+      RegisterParametersEvents();
+    }
+    protected ParameterizedPort(string name)
+      : base(name) {
+      parameters = new PortParameterCollection();
+      readOnlyParameters = null;
+      RegisterParametersEvents();
+    }
+    protected ParameterizedPort(string name, string description)
+      : base(name, description) {
+      parameters = new PortParameterCollection();
+      readOnlyParameters = null;
+      RegisterParametersEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      foreach (var p in Parameters)
+        p.Parent = this;
+      RegisterParametersEvents();
+    }
+
+    public virtual void CloneParametersFromPort(IParameterizedPort port) {
+      Parameters.Clear();
+      foreach (var p in port.Parameters) {
+        var param = (IPortParameter)p.Clone();
+        if (!(param.Type.HasFlag(PortParameterType.Input) && param.Type.HasFlag(PortParameterType.Output))) {
+          param.Type = ~param.Type;  // bitwise negation: input -> output, output -> input
+        }
+        Parameters.Add(param);
+      }
+    }
+
+    public event EventHandler InterfaceChanged;
+    protected virtual void OnInterfaceChanged() {
+      var handler = InterfaceChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    #region Parameters Events
+    protected virtual void RegisterParametersEvents() {
+      parameters.ItemsAdded += Parameters_ItemsAdded;
+      parameters.ItemsRemoved += Parameters_ItemsRemoved;
+      parameters.ItemsReplaced += Parameters_ItemsReplaced;
+      parameters.CollectionReset += Parameters_CollectionReset;
+      foreach (var p in parameters)
+        RegisterParameterEvents(p);
+    }
+    protected virtual void Parameters_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) {
+      foreach (var p in e.Items) {
+        p.Parent = this;
+        RegisterParameterEvents(p);
+      }
+      OnInterfaceChanged();
+    }
+    protected virtual void Parameters_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) {
+      foreach (var p in e.Items) {
+        p.Parent = null;
+        DeregisterParameterEvents(p);
+      }
+      OnInterfaceChanged();
+    }
+    protected virtual void Parameters_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) {
+      foreach (var p in e.OldItems) {
+        p.Parent = null;
+        DeregisterParameterEvents(p);
+      }
+      foreach (var p in e.Items) {
+        p.Parent = this;
+        RegisterParameterEvents(p);
+      }
+      OnInterfaceChanged();
+    }
+    protected virtual void Parameters_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IPortParameter> e) {
+      foreach (var p in e.OldItems) {
+        p.Parent = null;
+        DeregisterParameterEvents(p);
+      }
+      foreach (var p in e.Items) {
+        p.Parent = this;
+        RegisterParameterEvents(p);
+      }
+      OnInterfaceChanged();
+    }
+    #endregion
+
+    #region Parameter Events
+    protected virtual void RegisterParameterEvents(IPortParameter parameter) {
+      parameter.NameChanged += Parameter_NameChanged;
+      parameter.TypeChanged += Parameter_TypeChanged;
+    }
+    protected virtual void DeregisterParameterEvents(IPortParameter parameter) {
+      parameter.NameChanged -= Parameter_NameChanged;
+      parameter.TypeChanged -= Parameter_TypeChanged;
+    }
+    protected virtual void Parameter_NameChanged(object sender, EventArgs e) {
+      OnInterfaceChanged();
+    }
+    protected virtual void Parameter_TypeChanged(object sender, EventArgs e) {
+      OnInterfaceChanged();
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Port.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Port.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Port.cs	(revision 12232)
@@ -0,0 +1,49 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Drawing;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("Port", "Abstract base class for ports of network nodes.")]
+  [StorableClass]
+  public abstract class Port : NetworkItem, IPort {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Interface; }
+    }
+
+    new public INode Parent {
+      get { return (INode)base.Parent; }
+      set {
+        // NOTE: never call setter directly as the Parent property is set by the node which contains the port
+        base.Parent = value;
+      }
+    }
+
+    [StorableConstructor]
+    protected Port(bool deserializing) : base(deserializing) { }
+    protected Port(Port original, Cloner cloner) : base(original, cloner) { }
+    protected Port() : base("Port") { }
+    protected Port(string name) : base(name) { }
+    protected Port(string name, string description) : base(name, description) { }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortCollection.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortCollection.cs	(revision 12232)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  [StorableClass]
+  [Item("PortCollection", "A collection of ports of a network node.")]
+  public class PortCollection : NamedItemCollection<IPort> {
+    [StorableConstructor]
+    protected PortCollection(bool deserializing) : base(deserializing) { }
+    protected PortCollection(PortCollection original, Cloner cloner) : base(original, cloner) { }
+    public PortCollection() : base() { }
+    public PortCollection(INode node, int capacity) : base(capacity) { }
+    public PortCollection(INode node, IEnumerable<IPort> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new PortCollection(this, cloner); }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameter.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameter.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameter.cs	(revision 12232)
@@ -0,0 +1,171 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Drawing;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("PortParameter", "A parameter of a port.")]
+  [StorableClass]
+  public class PortParameter<T> : NetworkItem, IPortParameter<T> where T : class, IItem {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; }
+    }
+    public override Image ItemImage {
+      get {
+        if (Type.HasFlag(PortParameterType.Input) && Type.HasFlag(PortParameterType.Output))
+          return HeuristicLab.Common.Resources.VSImageLibrary.ArrowUpDown;
+        else if (Type.HasFlag(PortParameterType.Input))
+          return HeuristicLab.Common.Resources.VSImageLibrary.ArrowDown;
+        else if (Type.HasFlag(PortParameterType.Output))
+          return HeuristicLab.Common.Resources.VSImageLibrary.ArrowUp;
+        else
+          return base.ItemImage; ;
+      }
+    }
+
+    new public IPort Parent {
+      get { return (IPort)base.Parent; }
+      set {
+        // NOTE: never call setter directly as the Parent property is set by the node which contains the port
+        base.Parent = value;
+      }
+    }
+    public Type DataType {
+      get { return typeof(T); }
+    }
+    [Storable]
+    private PortParameterType type;
+    public PortParameterType Type {
+      get { return type; }
+      set {
+        if (value != type) {
+          type = value;
+          OnTypeChanged();
+        }
+      }
+    }
+    [Storable]
+    protected T defaultValue;
+    public T DefaultValue {
+      get { return defaultValue; }
+      set {
+        if (value != this.defaultValue) {
+          DeregisterDefaultValueEvents();
+          this.defaultValue = value;
+          RegisterDefaultValueEvents();
+          OnDefaultValueChanged();
+        }
+      }
+    }
+    IItem IPortParameter.DefaultValue {
+      get { return DefaultValue; }
+      set {
+        T val = value as T;
+        if ((value != null) && (val == null))
+          throw new InvalidOperationException(
+            string.Format("Type mismatch. Value is not a \"{0}\".",
+                          typeof(T).GetPrettyName())
+          );
+        DefaultValue = val;
+      }
+    }
+
+    [StorableConstructor]
+    protected PortParameter(bool deserializing) : base(deserializing) { }
+    protected PortParameter(PortParameter<T> original, Cloner cloner)
+      : base(original, cloner) {
+      this.type = original.type;
+      this.defaultValue = cloner.Clone(original.defaultValue);
+      RegisterDefaultValueEvents();
+    }
+    public PortParameter()
+      : base("PortParameter") {
+      type = PortParameterType.Input;
+    }
+    public PortParameter(string name)
+      : base(name) {
+      type = PortParameterType.Input;
+    }
+    public PortParameter(string name, string description)
+      : base(name, description) {
+      type = PortParameterType.Input;
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterDefaultValueEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PortParameter<T>(this, cloner);
+    }
+
+    public override string ToString() {
+      var s = base.ToString();
+      if (DefaultValue != null)
+        s += ": " + DefaultValue.ToString();
+      return s;
+    }
+
+    public event EventHandler TypeChanged;
+    protected virtual void OnTypeChanged() {
+      var handler = TypeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+    }
+
+    public event EventHandler DefaultValueChanged;
+    protected virtual void OnDefaultValueChanged() {
+      var handler = DefaultValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnToStringChanged();
+    }
+
+    public IMessageValue<T> CreateMessageValue() {
+      if (DefaultValue == null)
+        return new MessageValue<T>(Name);
+      else
+        return new MessageValue<T>(Name, (T)DefaultValue.Clone());
+    }
+    IMessageValue IPortParameter.CreateMessageValue() {
+      return CreateMessageValue();
+    }
+
+    #region DefaultValue Events
+    protected virtual void RegisterDefaultValueEvents() {
+      if (defaultValue != null) {
+        defaultValue.ToStringChanged += new EventHandler(DefaultValue_ToStringChanged);
+      }
+    }
+    protected virtual void DeregisterDefaultValueEvents() {
+      if (defaultValue != null) {
+        defaultValue.ToStringChanged -= new EventHandler(DefaultValue_ToStringChanged);
+      }
+    }
+    private void DefaultValue_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    #endregion
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterCollection.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterCollection.cs	(revision 12232)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Core.Networks {
+  [StorableClass]
+  [Item("PortParameterCollection", "A collection of port parameters.")]
+  public class PortParameterCollection : NamedItemCollection<IPortParameter> {
+    [StorableConstructor]
+    protected PortParameterCollection(bool deserializing) : base(deserializing) { }
+    protected PortParameterCollection(PortParameterCollection original, Cloner cloner) : base(original, cloner) { }
+    public PortParameterCollection() : base() { }
+    public PortParameterCollection(int capacity) : base(capacity) { }
+    public PortParameterCollection(IEnumerable<IPortParameter> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new PortParameterCollection(this, cloner); }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterType.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterType.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/PortParameterType.cs	(revision 12232)
@@ -0,0 +1,30 @@
+#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;
+
+namespace HeuristicLab.Core.Networks {
+  [Flags]
+  public enum PortParameterType {
+    Input = 1,
+    Output = 2
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj	(revision 11823)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj	(revision 12232)
@@ -18,5 +18,5 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -80,4 +80,91 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Algorithms.CMAEvolutionStrategy-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.CMAEvolutionStrategy-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Knapsack-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Knapsack-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TravelingSalesman-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.TravelingSalesman-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Scripting-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Scripting-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Selection-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -107,4 +194,31 @@
     <EmbeddedResource Include="KSPTSPNetworkCode.cs" />
     <EmbeddedResource Include="KSPTSPConcurrentControlNetworkCode.cs" />
+    <Compile Include="Core\IConnectablePort.cs" />
+    <Compile Include="Core\IMessage.cs" />
+    <Compile Include="Core\IMessagePort.cs" />
+    <Compile Include="Core\IMessageValue.cs" />
+    <Compile Include="Core\INetwork.cs" />
+    <Compile Include="Core\INetworkItem.cs" />
+    <Compile Include="Core\INode.cs" />
+    <Compile Include="Core\IParameterizedPort.cs" />
+    <Compile Include="Core\IPort.cs" />
+    <Compile Include="Core\IPortParameter.cs" />
+    <Compile Include="Core\Message.cs" />
+    <Compile Include="Core\MessageCollection.cs" />
+    <Compile Include="Core\MessagePort.cs" />
+    <Compile Include="Core\MessageValue.cs" />
+    <Compile Include="Core\MessageValueCollection.cs" />
+    <Compile Include="Core\Network.cs" />
+    <Compile Include="Core\NetworkItem.cs" />
+    <Compile Include="Core\Node.cs" />
+    <Compile Include="Core\NodeCollection.cs" />
+    <Compile Include="Core\ParameterizedPort.cs" />
+    <Compile Include="Core\Port.cs" />
+    <Compile Include="Core\PortCollection.cs" />
+    <Compile Include="Core\PortParameter.cs" />
+    <Compile Include="Core\PortParameterCollection.cs" />
+    <Compile Include="Core\PortParameterType.cs" />
+    <Compile Include="Operators\HookOperator.cs" />
+    <Compile Include="Operators\IHookOperator.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Programmable\IProgrammableNetwork.cs" />
@@ -122,4 +236,5 @@
     <Compile Include="Programmable\UserDefinedNode.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Scripting\IProgrammableItem.cs" />
     <Compile Include="UserDefinedMessagePort.cs" />
   </ItemGroup>
@@ -130,97 +245,8 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Algorithms.GeneticAlgorithm\3.3\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj">
-      <Project>{a51da44f-cb35-4f6f-99f5-2a2e904ab93b}</Project>
-      <Name>HeuristicLab.Algorithms.GeneticAlgorithm-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Algorithms.LocalSearch\3.3\HeuristicLab.Algorithms.LocalSearch-3.3.csproj">
-      <Project>{4ae3fc69-c575-42d2-bc46-0fad5850efc5}</Project>
-      <Name>HeuristicLab.Algorithms.LocalSearch-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Algorithms.VariableNeighborhoodSearch\3.3\HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3.csproj">
-      <Project>{e4cfb0c3-0589-4893-b38e-8bedf885c765}</Project>
-      <Name>HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
-      <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project>
-      <Name>HeuristicLab.Analysis-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
       <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
       <Name>HeuristicLab.Common.Resources-3.3</Name>
       <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj">
-      <Project>{66d249c3-a01d-42a8-82a2-919bc8ec3d83}</Project>
-      <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">
-      <Project>{dbecb8b0-b166-4133-baf1-ed67c3fd7fca}</Project>
-      <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
-      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
-      <Name>HeuristicLab.Optimization-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
-      <Project>{56f9106a-079f-4c61-92f6-86a84c2d84b7}</Project>
-      <Name>HeuristicLab.Parameters-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
-      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
-      <Name>HeuristicLab.Persistence-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
-      <Project>{3540e29e-4793-49e7-8ee2-fea7f61c3994}</Project>
-      <Name>HeuristicLab.Problems.Instances-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.Knapsack\3.3\HeuristicLab.Problems.Knapsack-3.3.csproj">
-      <Project>{e10f395f-c8a6-48ad-b470-9aa7a1f43809}</Project>
-      <Name>HeuristicLab.Problems.Knapsack-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj">
-      <Project>{d767c38d-8014-46b0-9a32-03a3aecce34a}</Project>
-      <Name>HeuristicLab.Problems.TravelingSalesman-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Scripting\3.3\HeuristicLab.Scripting-3.3.csproj">
-      <Project>{21977cc3-1757-4b3b-87bd-ff817aaa900f}</Project>
-      <Name>HeuristicLab.Scripting-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Selection\3.3\HeuristicLab.Selection-3.3.csproj">
-      <Project>{2c36cd4f-e5f5-43a4-801a-201ea895fe17}</Project>
-      <Name>HeuristicLab.Selection-3.3</Name>
     </ProjectReference>
   </ItemGroup>
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/HookOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/HookOperator.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/HookOperator.cs	(revision 12232)
@@ -0,0 +1,93 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Networks;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Linq;
+
+namespace HeuristicLab.Operators {
+  [Item("HookOperator", "An operator which interacts with an optimization network port.")]
+  [StorableClass]
+  public class HookOperator : Operator, IHookOperator {
+    public new ParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+
+    [Storable]
+    protected IMessagePort port;
+    public IMessagePort Port {
+      get { return port; }
+      set {
+        if (port != value) {
+          port = value;
+          OnPortChanged();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    protected HookOperator(bool deserializing) : base(deserializing) { }
+    protected HookOperator(HookOperator original, Cloner cloner)
+      : base(original, cloner) {
+      port = cloner.Clone(original.port);
+    }
+    public HookOperator() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new HookOperator(this, cloner);
+    }
+
+    public event EventHandler PortChanged;
+    protected virtual void OnPortChanged() {
+      var handler = PortChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public override IOperation Apply() {
+      if (Port != null) {
+        var msg = Port.PrepareMessage();
+        foreach (var output in Port.Parameters.Where(p => p.Type.HasFlag(PortParameterType.Output))) {
+          IParameter param;
+          if (Parameters.TryGetValue(output.Name, out param)) {
+            msg[output.Name] = param.ActualValue;
+          } else if (output.DefaultValue == null) {
+            throw new InvalidOperationException(string.Format("Cannot determine value for output parameter \"{0}\".", output.Name));
+          }
+        }
+
+        Port.SendMessage(msg, CancellationToken);
+
+        foreach (var input in Port.Parameters.Where(p => p.Type.HasFlag(PortParameterType.Input))) {
+          IParameter param;
+          if (Parameters.TryGetValue(input.Name, out param)) {
+            param.ActualValue = msg[input.Name];
+          } else {
+            throw new InvalidOperationException(string.Format("Cannot find operator parameter for input parameter \"{0}\".", input.Name));
+          }
+        }
+      }
+      return null;
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/IHookOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/IHookOperator.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Operators/IHookOperator.cs	(revision 12232)
@@ -0,0 +1,33 @@
+#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.Core;
+using HeuristicLab.Core.Networks;
+using System;
+
+namespace HeuristicLab.Operators {
+  public interface IHookOperator : IOperator {
+    new ParameterCollection Parameters { get; }
+    IMessagePort Port { get; set; }
+
+    event EventHandler PortChanged;
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Plugin.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Plugin.cs.frame	(revision 11823)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Plugin.cs.frame	(revision 12232)
@@ -33,7 +33,8 @@
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
-  [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Scripting", "3.3")]
Index: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Scripting/IProgrammableItem.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Scripting/IProgrammableItem.cs	(revision 12232)
+++ branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Scripting/IProgrammableItem.cs	(revision 12232)
@@ -0,0 +1,41 @@
+#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.Core;
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace HeuristicLab.Scripting {
+  public interface IProgrammableItem : IItem {
+    string Code { get; set; }
+    CompilerErrorCollection CompileErrors { get; }
+    bool CanChangeCode { get; }
+    VariableStore VariableStore { get; }
+
+    void Compile();
+    IEnumerable<Assembly> GetAssemblies();
+
+    event EventHandler CodeChanged;
+    event EventHandler CompileErrorsChanged;
+  }
+}
