private Task PostOperationActionAsync(PollinatorsGroup group, Pollinator currentPollinator, Pollinator newPollinator) { var ruleArgument = new ResetPollinationRuleArgument(group, newPollinator); return(_resetPollinationRule.ApplyRuleAsync(currentPollinator, ruleArgument)); }
private Task <Pollinator> LocalPollinationAsync(PollinatorsGroup group, Pollinator pollinator) { var randomPollinator = group.ElementAt(RandomGenerator.Random.Next() % group.Count()); var ruleArgument = new LocalPollinationRuleArgument(randomPollinator); return(_localPollinationRule.ApplyRuleAsync(pollinator, ruleArgument)); }
private Task <Pollinator> GlobalPollinationAsync(PollinatorsGroup group, Pollinator pollinator) { var bestPollinator = group.GetBestSolution(_functionStrategy, _algorithmSettings.IsMin); var ruleArgument = new GlobalPollinationRuleArgument(bestPollinator); return(_globalPollinationRule.ApplyRuleAsync(pollinator, ruleArgument)); }