Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Entity.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Entity.cs	(revision 11177)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Entity.cs	(revision 11177)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Networks {
+  [Item("Entity", "An entity of an optimization network.")]
+  [StorableClass]
+  public class Entity : NamedItem, IEntity {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }
+    }
+
+    [Storable]
+    private PortCollection ports;
+    protected PortCollection Ports {
+      get { return ports; }
+    }
+    private ReadOnlyKeyedItemCollection<string, IPort> readOnlyPorts;
+    IKeyedItemCollection<string, IPort> IEntity.Ports {
+      get {
+        if (readOnlyPorts == null) readOnlyPorts = ports.AsReadOnly();
+        return readOnlyPorts;
+      }
+    }
+
+    [StorableConstructor]
+    protected Entity(bool deserializing) : base(deserializing) { }
+    protected Entity(Entity original, Cloner cloner)
+      : base(original, cloner) {
+      ports = cloner.Clone(original.ports);
+      readOnlyPorts = null;
+    }
+    public Entity()
+      : base("Anonymous") {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+    }
+    public Entity(string name)
+      : base(name) {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+    }
+    public Entity(string name, string description)
+      : base(name, description) {
+      ports = new PortCollection();
+      readOnlyPorts = null;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Entity(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 11069)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj	(revision 11177)
@@ -40,4 +40,5 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -47,4 +48,9 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Entity.cs" />
+    <Compile Include="IEntity.cs" />
+    <Compile Include="IPort.cs" />
+    <Compile Include="PortCollection.cs" />
+    <Compile Include="Port.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -56,4 +62,24 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </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>
+    </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>
+    </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>
+    </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>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
       <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IEntity.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IEntity.cs	(revision 11177)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IEntity.cs	(revision 11177)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization.Networks {
+  public interface IEntity : INamedItem {
+    IKeyedItemCollection<string, IPort> Ports { get; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IPort.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IPort.cs	(revision 11177)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IPort.cs	(revision 11177)
@@ -0,0 +1,35 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization.Networks {
+  public interface IPort : INamedItem {
+    object Value { get; set; }
+
+    event EventHandler ValueChanged;
+  }
+
+  public interface IPort<T> : IPort where T : class, IItem {
+    new T Value { get; set; }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame	(revision 11069)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame	(revision 11177)
@@ -28,11 +28,11 @@
   [Plugin("HeuristicLab.Optimization.Networks", "3.3.11.$WCREV$")]
   [PluginFile("HeuristicLab.Optimization.Networks-3.3.dll", PluginFileType.Assembly)]
-//  [PluginDependency("HeuristicLab.Collections", "3.3")]
-//  [PluginDependency("HeuristicLab.Common", "3.3")]
-//  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
-//  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
 //  [PluginDependency("HeuristicLab.Data", "3.3")]
 //  [PluginDependency("HeuristicLab.Parameters", "3.3")]
-//  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
   public class HeuristicLabOptimizationNetworksPlugin : PluginBase {
   }
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Port.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Port.cs	(revision 11177)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Port.cs	(revision 11177)
@@ -0,0 +1,126 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Networks {
+  [Item("Port", "A port of an optimization network entity.")]
+  [StorableClass]
+  public class Port<T> : NamedItem, IPort<T> where T : class, IItem {
+    public override Image ItemImage {
+      get {
+        if (value != null) return value.ItemImage;
+        else return base.ItemImage;
+      }
+    }
+
+    [Storable]
+    protected T value;
+    public T Value {
+      get { return value; }
+      set {
+        if (value != this.value) {
+          DeregisterValueEvents();
+          this.value = value;
+          RegisterValueEvents();
+          OnValueChanged();
+        }
+      }
+    }
+    object IPort.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 Port(bool deserializing) : base(deserializing) { }
+    protected Port(Port<T> original, Cloner cloner)
+      : base(original, cloner) {
+      value = cloner.Clone(original.value);
+      RegisterValueEvents();
+    }
+    public Port() : base("Anonymous") { }
+    public Port(string name) : base(name) { }
+    public Port(string name, string description) : base(name, description) { }
+    public Port(string name, T value)
+      : base(name) {
+      this.value = value;
+      RegisterValueEvents();
+    }
+    public Port(string name, string description, T value)
+      : base(name, description) {
+      this.value = value;
+      RegisterValueEvents();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterValueEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Port<T>(this, cloner);
+    }
+
+    public override string ToString() {
+      return Name + ": " + (Value != null ? Value.ToString() : "null");
+    }
+
+    public event EventHandler ValueChanged;
+    protected virtual void OnValueChanged() {
+      EventHandler handler = ValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+      OnToStringChanged();
+    }
+
+    private void RegisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged += new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void DeregisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged -= new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void Value_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Value_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/PortCollection.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/PortCollection.cs	(revision 11177)
+++ branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/PortCollection.cs	(revision 11177)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization.Networks {
+  [StorableClass]
+  [Item("PortCollection", "Represents a collection of ports.")]
+  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(int capacity) : base(capacity) { }
+    public PortCollection(IEnumerable<IPort> collection) : base(collection) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new PortCollection(this, cloner); }
+  }
+}
