Esempio n. 1
0
 /// <summary>
 /// Check if the constraint has been violated in progressing the state of the system
 /// </summary>
 /// <param name="system"></param>
 /// <param name="proposedSchedule"></param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 private static bool CheckConstraints(SystemClass system, SystemSchedule proposedSchedule, Constraint constraint)
 {
     if (!constraint.Accepts(proposedSchedule.AllStates.GetLastState()))
     {
         // TODO: Change this to logger
         // HSFLogger.Log(new HSFLogData(constraint, subsystem, task, value, time));
         Console.WriteLine("Constraint Failed");
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        private static bool CheckConstraints(SystemClass system, SystemSchedule proposedSchedule, Constraint constraint)
        {
            // pass the state for checking
            if (!constraint.Accepts(proposedSchedule.AllStates.GetLastState()))
            {
                Logger.Report("Constraint Failed: " + constraint.GetType().ToString());
                return(false);
            }


            return(true);
        }