Пример #1
0
        public void CalculateSolutionPenalty(List <Node> nodesToEvaluate)
        {
            bool enableViolTracking = true;

            if (nodesToEvaluate == null)
            {
                throw new NullReferenceException();
            }
            scheduleEvaluator = new ScheduleEvaluator(inputDataLocal);
            foreach (Node node in nodesToEvaluate)
            {
                conditions.Clear();
                BuildConditionsList(node.NurseId);
                node.Violations = new List <string>();
                int nodeCost = scheduleEvaluator.GetCost(node, conditions, enableViolTracking);
            }
        }
Пример #2
0
        /// <summary>
        /// Calculate penalty and cost of a single node
        /// </summary>
        /// <param name="node">Node to evaluate</param>
        public void CalculateNodePenalty(Node node)
        {
            int nodeCost = scheduleEvaluator.GetCost(node, conditions);

            node.Cost = nodeCost;
        }