Ejemplo n.º 1
0
 public static void NewOrder(List <Event> scheduler) // order on N blood units
 {
     if (OrderFlag == false)
     {
         Console.WriteLine("\n### NEW ORDER ###");
         int         timeG  = 15; // Time from generator (Time of transport the New Order)
         const int   nUnits = 20;
         BloodSupply temp   = new BloodSupply(timeG, "BS", nUnits, false);
         AddToScheduler(scheduler, temp);
         Sorted(scheduler);
         OrderFlag = true;
     }
 }
Ejemplo n.º 2
0
 public static void EmergencyOrder(List <Event> scheduler)             // order on Q blood units
 {
     if (EmergencyFlag == false)
     {
         Console.WriteLine("\n### EMERGENCY ORDER ###");
         const int   timeG  = 10; //  Time from generator(Time of transport the Emergency Order)
         const int   timeG1 = 50; // Time from generator(Time of restoring emergency order)
         const int   qUnits = 11;
         BloodSupply temp   = new BloodSupply(timeG, "BS", qUnits, true);
         AddToScheduler(scheduler, temp);
         ReturnBlood rest = new ReturnBlood(timeG1, "RB", timeG); // timeG is being used to track right units of blood to destroy
         AddToScheduler(scheduler, rest);
         Sorted(scheduler);
         EmergencyFlag = true;
     }
 }