/// <summary> /// Получено решение для миграции /// </summary> /// <param name="message"></param> private void OnMigrateSolutions(MigrateSolutionsMessage message) { foreach (var solution in message.Solutions) { Solutions.Add(solution); } }
/// <summary> /// Принять популяцию /// </summary> /// <param name="message"></param> private void OnReceiveMigrateSolutions(MigrateSolutionsMessage message) { _geneticCore.AddIndividuals(message.Solutions.ToList()); }
/// <summary> /// Отправить решение на другой остров /// </summary> /// <param name="island">Остров</param> /// <param name="solutions">Миграция</param> private void MigrateSolutionTo(IActorRef island, List <IChromosome> solutions) { MigrateSolutionsMessage message = new MigrateSolutionsMessage(solutions); island.Tell(message); }