Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/GenericPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/GenericPort.cs	(revision 11529)
+++ 	(revision )
@@ -1,273 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Drawing;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace HeuristicLab.Core.Networks {
-  [Item("GenericPort", "A generic port of an optimization network node.")]
-  [StorableClass]
-  public class GenericPort : ParameterizedPort, IGenericPort, IConnectedPort {
-    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 IConnectedPort connectedPort;
-    public IConnectedPort ConnectedPort {
-      get { return connectedPort; }
-      set {
-        if (connectedPort != value) {
-          DeregisterConnectedPortEvents();
-          connectedPort = value;
-          RegisterConnectedPortEvents();
-          OnConnectedPortChanged();
-          OnInterfaceChanged();
-        }
-      }
-    }
-    [Storable]
-    protected bool portConnectionValid;
-    public bool PortConnectionValid {
-      get { return portConnectionValid; }
-      protected set {
-        if (value != portConnectionValid) {
-          portConnectionValid = value;
-          OnPortConnectionValidChanged();
-          OnItemImageChanged();
-        }
-      }
-    }
-    [Storable]
-    protected bool logMessages;
-    public bool LogMessages {
-      get { return logMessages; }
-      set {
-        if (value != logMessages) {
-          logMessages = value;
-          OnLogMessagesChanged();
-        }
-      }
-    }
-    [Storable]
-    protected MessageCollection messages;
-    public MessageCollection Messages {
-      get { return messages; }
-    }
-
-    [StorableConstructor]
-    protected GenericPort(bool deserializing) : base(deserializing) { }
-    protected GenericPort(GenericPort original, Cloner cloner)
-      : base(original, cloner) {
-      connectedPort = cloner.Clone(original.connectedPort);
-      portConnectionValid = original.portConnectionValid;
-      logMessages = original.logMessages;
-      messages = cloner.Clone(original.messages);
-      RegisterConnectedPortEvents();
-    }
-    public GenericPort()
-      : base("GenericPort") {
-      portConnectionValid = true;
-      logMessages = false;
-      messages = new MessageCollection();
-    }
-    public GenericPort(string name)
-      : base(name) {
-      portConnectionValid = true;
-      logMessages = false;
-      messages = new MessageCollection();
-    }
-    public GenericPort(string name, string description)
-      : base(name, description) {
-      portConnectionValid = true;
-      logMessages = false;
-      messages = new MessageCollection();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      RegisterConnectedPortEvents();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new GenericPort(this, cloner);
-    }
-
-    public bool CanConnectToPort(IPort port) {
-      if (port == null) return true;
-
-      var cp = port as IConnectedPort;
-      if (cp == null) return false;
-
-      // check connected port input parameters
-      foreach (var input in cp.Parameters.Where(p => p.Type.HasFlag(PortParameterType.Input))) {
-        IPortParameter param;
-        Parameters.TryGetValue(input.Name, out param);
-        if ((param == null) && (input.DefaultValue == null)) return false;
-        if (!param.Type.HasFlag(PortParameterType.Output)) return false;
-        if (!input.DataType.IsAssignableFrom(param.DataType)) return false;
-      }
-      // check local port input parameters
-      foreach (var input in Parameters.Where(p => p.Type.HasFlag(PortParameterType.Input))) {
-        IPortParameter param;
-        cp.Parameters.TryGetValue(input.Name, out param);
-        if ((param == null) && (input.DefaultValue == null)) return false;
-        if (!param.Type.HasFlag(PortParameterType.Output)) return false;
-        if (!input.DataType.IsAssignableFrom(param.DataType)) return false;
-      }
-      return true;
-    }
-    public void CloneConnectedPortParameters() {
-      Parameters.Clear();
-      foreach (var p in connectedPort.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 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 input parameters from connected port
-      if (ConnectedPort != null) {
-        message.Values.AddRange(
-          ConnectedPort.Parameters
-            .Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name))
-            .Select(p => p.CreateMessageValue())
-        );
-      }
-
-      // collect output parameters from connected port
-      if (ConnectedPort != null) {
-        message.Values.AddRange(
-          ConnectedPort.Parameters
-            .Where(p => p.Type.HasFlag(PortParameterType.Output) && !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 (LogMessages) Messages.Add(message);
-      if (ConnectedPort != null) ConnectedPort.ReceiveMessage(message, token);
-      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");
-      if (LogMessages) Messages.Add(message);
-      OnMessageReceived(message, token);
-    }
-    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 LogMessagesChanged;
-    protected virtual void OnLogMessagesChanged() {
-      var handler = LogMessagesChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    protected override void OnInterfaceChanged() {
-      PortConnectionValid = CanConnectToPort(connectedPort);
-      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) {
-      OnInterfaceChanged();
-    }
-    protected virtual void ConnectedPort_MessageSent(object sender, EventArgs<IMessage, CancellationToken> e) {
-      ReceiveMessage(e.Value, e.Value2);
-    }
-    #endregion
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IConnectedPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IConnectedPort.cs	(revision 11529)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using System;
-using System.Threading;
-
-namespace HeuristicLab.Core.Networks {
-  public interface IConnectedPort : IParameterizedPort {
-    void ReceiveMessage(IMessage message, CancellationToken token);
-    event EventHandler<EventArgs<IMessage, CancellationToken>> MessageSent;
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IGenericPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IGenericPort.cs	(revision 11529)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace HeuristicLab.Core.Networks {
-  public interface IGenericPort : IParameterizedPort {
-    new PortParameterCollection Parameters { get; }
-
-    IConnectedPort ConnectedPort { get; set; }
-    bool PortConnectionValid { get; }
-    bool LogMessages { get; set; }
-    MessageCollection Messages { get; }
-
-    event EventHandler ConnectedPortChanged;
-    event EventHandler PortConnectionValidChanged;
-    event EventHandler LogMessagesChanged;
-
-    bool CanConnectToPort(IPort port);
-    void CloneConnectedPortParameters();
-
-    IMessage PrepareMessage();
-    void SendMessage(IMessage message);
-    void SendMessage(IMessage message, CancellationToken token);
-    Task SendMessageAsync(IMessage message);
-    Task SendMessageAsync(IMessage message, CancellationToken token);
-
-    event EventHandler<EventArgs<IMessage, CancellationToken>> MessageReceived;
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IMessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IMessagePort.cs	(revision 11530)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IMessagePort.cs	(revision 11530)
@@ -0,0 +1,50 @@
+#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 {
+    IMessagePort ConnectedPort { get; set; }
+    bool PortConnectionValid { get; }
+    bool LogMessages { get; set; }
+    MessageCollection Messages { get; }
+
+    bool CanConnectToPort(IPort port);
+
+    event EventHandler ConnectedPortChanged;
+    event EventHandler PortConnectionValidChanged;
+    event EventHandler LogMessagesChanged;
+
+    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.Optimization.Networks/3.3/Core.Networks/IParameterizedPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IParameterizedPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IParameterizedPort.cs	(revision 11530)
@@ -26,4 +26,6 @@
     IKeyedItemCollection<string, IPortParameter> Parameters { get; }
 
+    void CloneParametersFromPort(IParameterizedPort port);
+
     event EventHandler InterfaceChanged;
   }
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IUserDefinedMessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IUserDefinedMessagePort.cs	(revision 11530)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IUserDefinedMessagePort.cs	(revision 11530)
@@ -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 IUserDefinedMessagePort : IMessagePort {
+    new PortParameterCollection Parameters { get; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/MessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/MessagePort.cs	(revision 11530)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/MessagePort.cs	(revision 11530)
@@ -0,0 +1,249 @@
+#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();
+          OnInterfaceChanged();
+        }
+      }
+    }
+    [Storable]
+    protected bool portConnectionValid;
+    public bool PortConnectionValid {
+      get { return portConnectionValid; }
+      protected set {
+        if (value != portConnectionValid) {
+          portConnectionValid = value;
+          OnPortConnectionValidChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+    [Storable]
+    protected bool logMessages;
+    public bool LogMessages {
+      get { return logMessages; }
+      set {
+        if (value != logMessages) {
+          logMessages = value;
+          OnLogMessagesChanged();
+        }
+      }
+    }
+    [Storable]
+    protected MessageCollection messages;
+    public MessageCollection Messages {
+      get { return messages; }
+    }
+
+    [StorableConstructor]
+    protected MessagePort(bool deserializing) : base(deserializing) { }
+    protected MessagePort(MessagePort original, Cloner cloner)
+      : base(original, cloner) {
+      connectedPort = cloner.Clone(original.connectedPort);
+      portConnectionValid = original.portConnectionValid;
+      logMessages = original.logMessages;
+      messages = cloner.Clone(original.messages);
+      RegisterConnectedPortEvents();
+    }
+    public MessagePort()
+      : base("MessagePort") {
+      portConnectionValid = true;
+      logMessages = false;
+      messages = new MessageCollection();
+    }
+    public MessagePort(string name)
+      : base(name) {
+      portConnectionValid = true;
+      logMessages = false;
+      messages = new MessageCollection();
+    }
+    public MessagePort(string name, string description)
+      : base(name, description) {
+      portConnectionValid = true;
+      logMessages = false;
+      messages = new MessageCollection();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterConnectedPortEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new MessagePort(this, cloner);
+    }
+
+    public bool CanConnectToPort(IPort port) {
+      if (port == null) return true;
+
+      var p = port as IMessagePort;
+      if (p == null) return false;
+
+      // check if the local parameters are compatible to the input parameters of the port
+      if (!ParametersCompatibleToTarget(Parameters, p.Parameters)) return false;
+      // check if the parameters of the port are compatible to the local input parameters
+      if (!ParametersCompatibleToTarget(p.Parameters, Parameters)) return false;
+
+      return true;
+    }
+
+    public IMessage PrepareMessage() {
+      if (!PortConnectionValid) throw new InvalidOperationException("Port connection is not valid");
+      var message = new Message();
+
+      // collect parameters from local port
+      message.Values.AddRange(Parameters.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())
+        );
+      }
+
+      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 (LogMessages) Messages.Add(message);
+      if (ConnectedPort != null) ConnectedPort.ReceiveMessage(message, token);
+      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");
+      if (LogMessages) Messages.Add(message);
+      OnMessageReceived(message, token);
+    }
+    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 LogMessagesChanged;
+    protected virtual void OnLogMessagesChanged() {
+      var handler = LogMessagesChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnInterfaceChanged() {
+      PortConnectionValid = CanConnectToPort(connectedPort);
+      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) {
+      OnInterfaceChanged();
+    }
+    protected virtual void ConnectedPort_MessageSent(object sender, EventArgs<IMessage, CancellationToken> e) {
+      ReceiveMessage(e.Value, e.Value2);
+    }
+    #endregion
+
+    #region Helpers
+    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.Optimization.Networks/3.3/Core.Networks/ParameterizedPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ParameterizedPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ParameterizedPort.cs	(revision 11530)
@@ -83,4 +83,15 @@
     }
 
+    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() {
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/UserDefinedMessagePort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/UserDefinedMessagePort.cs	(revision 11530)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/UserDefinedMessagePort.cs	(revision 11530)
@@ -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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Core.Networks {
+  [Item("User-Defined Message Port", "A message port of a network which can be defined by the user.")]
+  [StorableClass]
+  public sealed class UserDefinedMessagePort : MessagePort, IUserDefinedMessagePort {
+    new public PortParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+
+    [StorableConstructor]
+    private UserDefinedMessagePort(bool deserializing) : base(deserializing) { }
+    private UserDefinedMessagePort(UserDefinedMessagePort original, Cloner cloner) : base(original, cloner) { }
+    public UserDefinedMessagePort() : base("UserDefinedMessagePort") { }
+    public UserDefinedMessagePort(string name) : base(name) { }
+    public UserDefinedMessagePort(string name, string description) : base(name, description) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new UserDefinedMessagePort(this, cloner);
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj	(revision 11530)
@@ -90,10 +90,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Core.Networks\IUserDefinedMessagePort.cs" />
+    <Compile Include="Core.Networks\IMessagePort.cs" />
     <Compile Include="Core.Networks\IUserDefinedNetwork.cs" />
     <Compile Include="Core.Networks\IUserDefinedNode.cs" />
+    <Compile Include="Core.Networks\MessagePort.cs" />
     <Compile Include="Core.Networks\UserDefinedNetwork.cs" />
-    <Compile Include="Core.Networks\GenericPort.cs" />
-    <Compile Include="Core.Networks\IConnectedPort.cs" />
-    <Compile Include="Core.Networks\IGenericPort.cs" />
     <Compile Include="Core.Networks\IMessage.cs" />
     <Compile Include="Core.Networks\IMessageValue.cs" />
@@ -118,4 +118,5 @@
     <Compile Include="Core.Networks\PortParameterCollection.cs" />
     <Compile Include="Core.Networks\PortParameterType.cs" />
+    <Compile Include="Core.Networks\UserDefinedMessagePort.cs" />
     <Compile Include="Core.Networks\UserDefinedNode.cs" />
     <Compile Include="Operators\HookOperator.cs" />
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/HookOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/HookOperator.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/HookOperator.cs	(revision 11530)
@@ -36,6 +36,6 @@
 
     [Storable]
-    protected IGenericPort port;
-    public IGenericPort Port {
+    protected IMessagePort port;
+    public IMessagePort Port {
       get { return port; }
       set {
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/IHookOperator.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/IHookOperator.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Operators/IHookOperator.cs	(revision 11530)
@@ -27,5 +27,5 @@
   public interface IHookOperator : IOperator {
     new ParameterCollection Parameters { get; }
-    IGenericPort Port { get; set; }
+    IMessagePort Port { get; set; }
 
     event EventHandler PortChanged;
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPConnector.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPConnector.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPConnector.cs	(revision 11530)
@@ -65,10 +65,10 @@
 
     protected virtual void Initialize() {
-      var parameters = new GenericPort("Parameters");
+      var parameters = new MessagePort("Parameters");
       Ports.Add(parameters);
       parameters.Parameters.Add(new PortParameter<DoubleMatrix>("Cities") { Type = PortParameterType.Input });
       parameters.Parameters.Add(new PortParameter<DoubleValue>("TransportCostsFactor") { Type = PortParameterType.Input });
 
-      var ksp = new GenericPort("KSP Connector");
+      var ksp = new MessagePort("KSP Connector");
       Ports.Add(ksp);
       ksp.Parameters.Add(new PortParameter<BinaryVector>("KnapsackSolution") { Type = PortParameterType.Input });
@@ -77,5 +77,5 @@
       ksp.Parameters.Add(new PortParameter<PathTSPTour>("Route") { Type = PortParameterType.Output });
 
-      var tsp = new GenericPort("TSP Connector");
+      var tsp = new MessagePort("TSP Connector");
       Ports.Add(tsp);
       tsp.Parameters.Add(new PortParameter<DoubleMatrix>("Coordinates") { Type = PortParameterType.Output });
@@ -85,5 +85,5 @@
 
     protected virtual void RegisterEvents() {
-      var ksp = (IGenericPort)Ports["KSP Connector"];
+      var ksp = (IMessagePort)Ports["KSP Connector"];
       ksp.MessageReceived += Knapsack_MessageReceived;
     }
@@ -91,5 +91,5 @@
     protected virtual void Knapsack_MessageReceived(object sender, EventArgs<IMessage, System.Threading.CancellationToken> e) {
       // get parameters
-      var parametersPort = (IGenericPort)Ports["Parameters"];
+      var parametersPort = (IMessagePort)Ports["Parameters"];
       var parameters = parametersPort.PrepareMessage();
       parametersPort.SendMessage(parameters, e.Value2);
@@ -112,5 +112,5 @@
 
       // solve TSP
-      var tspConnectorPort = (IGenericPort)Ports["TSP Connector"];
+      var tspConnectorPort = (IMessagePort)Ports["TSP Connector"];
       var tspMsg = tspConnectorPort.PrepareMessage();
       tspMsg["Coordinates"] = coords;
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPNetwork.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPNetwork.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPNetwork.cs	(revision 11530)
@@ -63,5 +63,5 @@
       Nodes.Add(paramsNode);
 
-      var paramsPort = new GenericPort("Parameters");
+      var paramsPort = new MessagePort("Parameters");
       paramsNode.Ports.Add(paramsPort);
 
@@ -111,5 +111,5 @@
       });
 
-      var evaluatePort = new GenericPort("EvaluateRoute");
+      var evaluatePort = new MessagePort("EvaluateRoute");
       kspNode.Ports.Add(evaluatePort);
 
@@ -175,7 +175,7 @@
       hook.Port = evaluatePort;
       configPort.ConnectedPort = paramsPort;
-      evaluatePort.ConnectedPort = (IConnectedPort)ksptspConnector.Ports["KSP Connector"];
-      ((IGenericPort)ksptspConnector.Ports["Parameters"]).ConnectedPort = paramsPort;
-      ((IGenericPort)ksptspConnector.Ports["TSP Connector"]).ConnectedPort = executePort;
+      evaluatePort.ConnectedPort = (IMessagePort)ksptspConnector.Ports["KSP Connector"];
+      ((IMessagePort)ksptspConnector.Ports["Parameters"]).ConnectedPort = paramsPort;
+      ((IMessagePort)ksptspConnector.Ports["TSP Connector"]).ConnectedPort = executePort;
 
       paramsPort.SendMessage(paramsPort.PrepareMessage());
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ConfigurationPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ConfigurationPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ConfigurationPort.cs	(revision 11530)
@@ -28,5 +28,5 @@
   [Item("ConfigurationPort", "A port of an optimization network node which triggers configuration changes.")]
   [StorableClass]
-  public class ConfigurationPort : GenericPort, IConfigurationPort {
+  public class ConfigurationPort : MessagePort, IConfigurationPort {
     [StorableConstructor]
     protected ConfigurationPort(bool deserializing) : base(deserializing) { }
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ExecutionPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ExecutionPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/ExecutionPort.cs	(revision 11530)
@@ -28,5 +28,5 @@
   [Item("ExecutionPort", "A port of an optimization network node which triggers execution.")]
   [StorableClass]
-  public class ExecutionPort : GenericPort, IExecutionPort {
+  public class ExecutionPort : MessagePort, IExecutionPort {
     [StorableConstructor]
     protected ExecutionPort(bool deserializing) : base(deserializing) { }
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IConfigurationPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IConfigurationPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IConfigurationPort.cs	(revision 11530)
@@ -23,4 +23,4 @@
 
 namespace HeuristicLab.Optimization.Networks {
-  public interface IConfigurationPort : IGenericPort { }
+  public interface IConfigurationPort : IMessagePort { }
 }
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IExecutionPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IExecutionPort.cs	(revision 11529)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks/IExecutionPort.cs	(revision 11530)
@@ -23,4 +23,4 @@
 
 namespace HeuristicLab.Optimization.Networks {
-  public interface IExecutionPort : IGenericPort { }
+  public interface IExecutionPort : IMessagePort { }
 }
