- Timestamp:
- 07/13/16 19:13:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs
r14060 r14061 56 56 get { return (ILookupParameter<IntValue>)Parameters["MigrationIterations"]; } 57 57 } 58 public I LookupParameter<PercentValue> MigrationRatesParameter {59 get { return (I LookupParameter<PercentValue>)Parameters["MigrationRate"]; }60 } 61 public I LookupParameter<PercentValue> CommunicationRatesParameter {62 get { return (I LookupParameter<PercentValue>)Parameters["CommunicationRate"]; }63 } 64 public I LookupParameter<IntValue> MessageCacheCapacityParameter {65 get { return (I LookupParameter<IntValue>)Parameters["MessageCacheCapacity"]; }58 public IValueParameter<PercentValue> MigrationRatesParameter { 59 get { return (IValueParameter<PercentValue>)Parameters["MigrationRate"]; } 60 } 61 public IValueParameter<PercentValue> CommunicationRatesParameter { 62 get { return (IValueParameter<PercentValue>)Parameters["CommunicationRate"]; } 63 } 64 public IValueParameter<IntValue> MessageCacheCapacityParameter { 65 get { return (IValueParameter<IntValue>)Parameters["MessageCacheCapacity"]; } 66 66 } 67 67 public ILookupParameter<IRandom> RandomParameter { … … 118 118 Parameters.Add(new ValueParameter<StringValue>("ContactServerURL", "", new StringValue("net.tcp://10.42.1.150:9090/DistributedGA.ContactServer/ContactService"))); 119 119 Parameters.Add(new ValueParameter<StringValue>("JobGUID", "", new StringValue(Guid.NewGuid().ToString()))); 120 //public ILookupParameter<StringValue> JobGuidParameter {121 // get { return (ILookupParameter<StringValue>)Parameters["JobGUID"]; }122 //}123 124 120 Parameters.Add(new ValueParameter<ILog>("Log", "The log", new Log(1000))); 125 121 … … 237 233 List<KeyValuePair<PeerInfo, byte[]>> immigrants = new List<KeyValuePair<PeerInfo, byte[]>>(); 238 234 //limit number of immigrants to use 239 if(noOfEmigrants < message.Count) 240 { 235 if (noOfEmigrants < message.Count) { 241 236 immigrants = message.Skip(Math.Max(0, message.Count() - noOfEmigrants)).ToList(); 242 237 } else { 243 238 immigrants = message; 244 239 } 245 240 246 241 // remove individuals from population to make place for immigrants 247 242 for (int i = 0; i < immigrants.Count; i++) {
Note: See TracChangeset
for help on using the changeset viewer.