Index: /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13956)
+++ /branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13957)
@@ -135,5 +135,5 @@
 
     private void OnDataRecieved(object sender, MessageRecieveEventArgs e) {
-      if (e != null) {
+      if (e != null && e.Sender.ProblemInstance.Equals(ownInstance.ProblemInstance)) {
         lock (activeQueueLocker) {
           foreach (byte[] item in e.data) {
Index: /branches/thasling/DistributedGA/DistributedGA.Hive/DistributedGA.Hive.csproj
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Hive/DistributedGA.Hive.csproj	(revision 13956)
+++ /branches/thasling/DistributedGA/DistributedGA.Hive/DistributedGA.Hive.csproj	(revision 13957)
@@ -97,4 +97,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="MigrationStrategy.cs" />
     <Compile Include="P2PTask.cs" />
     <Compile Include="Plugin.cs" />
Index: /branches/thasling/DistributedGA/DistributedGA.Hive/MigrationStrategy.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Hive/MigrationStrategy.cs	(revision 13957)
+++ /branches/thasling/DistributedGA/DistributedGA.Hive/MigrationStrategy.cs	(revision 13957)
@@ -0,0 +1,9 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DistributedGA.Hive {
+  public enum MigrationStrategy  { TakeBestReplaceBad, TakeRandomReplaceBad, TakeBestReplaceRandom, TakeRandomReplaceRandom };
+}
Index: /branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs
===================================================================
--- /branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs	(revision 13956)
+++ /branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs	(revision 13957)
@@ -28,4 +28,5 @@
 using DistributedGA.Core.Implementation;
 using DistributedGA.Core.Interface;
+using DistributedGA.Hive;
 using HeuristicLab.Clients.Hive;
 using HeuristicLab.Common;
@@ -45,4 +46,13 @@
     public ILookupParameter<IntValue> MigrationIterationsParameter {
       get { return (ILookupParameter<IntValue>)Parameters["MigrationIterations"]; }
+    }
+    public ILookupParameter<IntValue> MigrationRatesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MigrationRate"]; }
+    }
+    public ILookupParameter<IntValue> CommunicationRatesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["CommunicationRate"]; }
+    }
+    public ILookupParameter<IntValue> MessageCacheCapacityParameter {                         
+      get { return (ILookupParameter<IntValue>)Parameters["MessageCacheCapacity"]; }
     }
     public ILookupParameter<IRandom> RandomParameter {
@@ -76,4 +86,7 @@
       Parameters.Add(new LookupParameter<IntValue>("MigrationIterations"));
       Parameters.Add(new ValueParameter<IntValue>("MigrationInterval", "", new IntValue(1)));
+      Parameters.Add(new ValueParameter<IntValue>("MigrationRate", "", new IntValue(5)));
+      Parameters.Add(new ValueParameter<IntValue>("CommunicationRate", "", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("MessageCacheCapacity", "", new IntValue(100)));
       Parameters.Add(new ValueParameter<StringValue>("LanIpPrefix", "", new StringValue("10.")));
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator"));
@@ -100,5 +113,7 @@
       var contactServerUri = ((StringValue)(Parameters["ContactServerURL"].ActualValue)).Value;
       var problemInstance = ((StringValue)Parameters["JobGUID"].ActualValue).Value;
-      h.Init(lanIpPrefix, contactServerUri, problemInstance, 10000, 100);
+      var communicationRate = ((IntValue)Parameters["CommunicationRate"].ActualValue).Value;
+      var messageCacheCapacity = ((IntValue)Parameters["MessageCacheCapacity"].ActualValue).Value;
+      h.Init(lanIpPrefix, contactServerUri, problemInstance, messageCacheCapacity, communicationRate);
       var peer = h.GetPeerInfo();
     }
@@ -113,4 +128,9 @@
         IScope scope = ExecutionContext.Scope;
         List<IScope> emigrantsList = new List<IScope>();
+
+        //define how many migrants to send
+        var migrationRate = ((IntValue)Parameters["MigrationRate"].ActualValue).Value;
+
+        //TODO: SELECT MIGRATION STRATEGY
 
         // select best as emigrant
