Example #1
0
 public HSFLogData(Constraint constraint, Subsystem subsystem, Task task, double value, double timeInfo)
 {
     AssetName = constraint.Name;
     SubName = subsystem.Name;
     TaskName = task.Type.ToString();
     TargetName = task.Target.Name;
     ConstraintName = constraint.Name;
     Violation = "Constraint Failed";
     Value = value;
     TimeInfo = timeInfo;
 }
Example #2
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;
 }