Changeset 13970
- Timestamp:
- 07/01/16 17:53:05 (8 years ago)
- Location:
- branches/thasling/DistributedGA
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
r13969 r13970 28 28 private IMessageService host = null; 29 29 30 public event EventHandler<Exception> ExceptionOccurend;30 public event EventHandler<Exception> ExceptionOccurend; 31 31 32 32 public void Init(string lanIpPrefix, string contactServerUrl, string problemInstance, int messageCacheCapacity, double communicationRate) { … … 150 150 } 151 151 } 152 152 153 153 } 154 154 } -
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
r13965 r13970 119 119 120 120 var binding = new NetTcpBinding(); 121 binding.ReaderQuotas.MaxArrayLength = 2147483647;122 binding.ReaderQuotas.MaxNameTableCharCount = 2147483647;123 binding.ReaderQuotas.MaxBytesPerRead = 2147483647;124 binding.ReaderQuotas.MaxStringContentLength = 2147483647;125 126 121 var endpoint = new EndpointAddress(serviceUri); 127 122 using (var myChannelFactory = new ChannelFactory<IMessageContract>(binding, endpoint)) { … … 132 127 } 133 128 catch (Exception ex) { 129 //ignore 134 130 Console.WriteLine(ex.Message); 135 131 } -
branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs
r13969 r13970 165 165 //define how many migrants to send 166 166 var migrationRate = ((PercentValue)Parameters["MigrationRate"].ActualValue).Value; 167 int noOfEmigrants = Convert.ToInt32(scope.SubScopes.Count * migrationRate); 168 if (noOfEmigrants == 0 && scope.SubScopes.Count > 0) { 169 noOfEmigrants = 0; 170 } 167 171 var popQualities = QualityParameter.ActualValue; 168 172 var selectedMigStrat = MigrationStrategyParameter.Value.Value; … … 172 176 IScope emigrants = null; 173 177 174 //determine how many emigrants to send 175 int max = Convert.ToInt32(scope.SubScopes.Count * migrationRate); 176 if (max == 0 && scope.SubScopes.Count > 0) { 177 max = 0; 178 } 179 180 for (int i = 0; i < max; i++) { 178 for (int i = 0; i < noOfEmigrants; i++) { 181 179 //select emigrant depending on strategy 182 180 switch (selectedMigStrat) {
Note: See TracChangeset
for help on using the changeset viewer.