public override void Restart(bool overReplication = false)
        {
            base.Restart();
            Patient.ResetId();
            Worker.ResetId();
            NotArrivedPatients   = 0;
            WaitingRoom          = 0;
            ActualSimulationTime = 0;

            RegistrationRoom.Restart();
            ExaminationRoom.Restart();
            VaccinationRoom.Restart();

            RegistrationFront.Clear();
            ExaminationFront.Clear();
            VaccinationFront.Clear();

            SetNotArriveProbability();
            AddFirstEvent();

            RegistrationWaiting.Clear();
            ExaminationWaiting.Clear();
            VaccinationWaiting.Clear();

            RegistrationLength.Clear();
            ExaminationLength.Clear();
            VaccinationLength.Clear();
            WaitingRoomLength.Clear();

            if (!overReplication)
            {
                OR_RegistrationLength.Clear();
                OR_RegistrationWaiting.Clear();
                OR_RegistrationWorkload.Clear();
                OR_ExaminationLength.Clear();
                OR_ExaminationWaiting.Clear();
                OR_ExaminationWorkload.Clear();
                OR_VaccinationLength.Clear();
                OR_VaccinationWaiting.Clear();
                OR_VaccinationWorkload.Clear();
                OR_WaitingRoomLength.Clear();
                OR_MissingPatients.Clear();
                OR_Overtime.Clear();
            }
        }
Beispiel #2
0
        // GET: Student/PHONGs/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PHONG pHONG = db.PHONGs.Find(id);

            if (pHONG == null)
            {
                return(HttpNotFound());
            }
            var ph        = db.PHONGs.SingleOrDefault(x => x.MAPHONG.Equals(id));
            var idSession = new RegistrationRoom();

            idSession.ID = ph.MAPHONG;
            Session.Add(CommonConstants.ID_SESSION, idSession);
            return(View(pHONG));
        }
 private AfterEventValues GetAfterEventValues()
 {
     return(new AfterEventValues
     {
         SimulationTime = ActualSimulationTime,
         RegistrationWorkersStats = RegistrationRoom.GetWorkersStats(),
         RegistrationFrontLength = RegistrationFront.Count,
         RegistrationAverageTime = RegistrationWaiting.Average,
         RegistrationAverageLength = RegistrationLength.Average,
         ExaminationWorkersStats = ExaminationRoom.GetWorkersStats(),
         ExaminationFrontLength = ExaminationFront.Count,
         ExaminationAverageTime = ExaminationWaiting.Average,
         ExaminationAverageLength = ExaminationLength.Average,
         VaccinationWorkersStats = VaccinationRoom.GetWorkersStats(),
         VaccinationFrontLength = VaccinationFront.Count,
         VaccinationAverageTime = VaccinationWaiting.Average,
         VaccinationAverageLength = VaccinationLength.Average,
         WaitingRoomPatients = WaitingRoom,
         WaitingRoomAverageLength = WaitingRoomLength.Average
     });
 }