Пример #1
0
        private void Load(SwarmService swarmService, int seed)
        {
            swarmService.Generate();

            if (swarmService.Success)
            {
                _queue.Enqueue(new ResultCell(swarmService.Score, swarmService.Result));
            }

            if (swarmService.CanGenerate)
            {
                Load(swarmService, ++seed);
            }
        }
Пример #2
0
        private void StartLoading(int startHour, ParallelLoopState state)
        {
            var swarmService = new SwarmService(_teachers, _classes, _cabinetes, _rules, _scheduleLessons, _plans);

            Load(swarmService, 0);
        }