Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13970 for branches/thasling


Ignore:
Timestamp:
07/01/16 17:53:05 (8 years ago)
Author:
thasling
Message:

#2615:
made minor changes

Location:
branches/thasling/DistributedGA
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs

    r13969 r13970  
    2828    private IMessageService host = null;
    2929
    30    public event EventHandler<Exception> ExceptionOccurend;   
     30    public event EventHandler<Exception> ExceptionOccurend;
    3131
    3232    public void Init(string lanIpPrefix, string contactServerUrl, string problemInstance, int messageCacheCapacity, double communicationRate) {
     
    150150          }
    151151        }
    152      
     152
    153153      }
    154154    }
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs

    r13965 r13970  
    119119
    120120        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 
    126121        var endpoint = new EndpointAddress(serviceUri);
    127122        using (var myChannelFactory = new ChannelFactory<IMessageContract>(binding, endpoint)) {
     
    132127      }
    133128      catch (Exception ex) {
     129        //ignore
    134130        Console.WriteLine(ex.Message);
    135131      }
  • branches/thasling/DistributedGA/DistributedGA.Hive/P2PMigrationAnalyzer.cs

    r13969 r13970  
    165165        //define how many migrants to send
    166166        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        }
    167171        var popQualities = QualityParameter.ActualValue;
    168172        var selectedMigStrat = MigrationStrategyParameter.Value.Value;
     
    172176        IScope emigrants = null;
    173177
    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++) {
    181179          //select emigrant depending on strategy
    182180          switch (selectedMigStrat) {
Note: See TracChangeset for help on using the changeset viewer.