Esempio n. 1
0
        /// <summary>
        /// Gets a new Solution from the _solutionsQueue and processes it.
        /// </summary>
        private void TakeNewSolutions()
        {
            foreach (var solution in _solutionsQueue.GetConsumingEnumerable())
            {
                Task processingSolutionTask = Task.Run(() => ProcessSolution(solution));
                AlgorithmTasks.Add(solution.Id, processingSolutionTask);
            }

            void ProcessSolution(ToSolution solution)
            {
                SolverValidator.Validate(solution);
                SolverEvaluator.Evaluate(solution);
            }
        }
Esempio n. 2
0
 internal void InitConstraintsToValidate() => SolverValidator.InitializeProblemConstraints();