コード例 #1
0
ファイル: AppGUI.cs プロジェクト: Mirc224/Agent_VacCenter_GUI
        public void OnUIRefresh(OSPABA.Simulation sim)
        {
            var simulacia = sim as simulation.VacCenterSimulation;

            if (casLabel.InvokeRequired)
            {
                GUIStatUpdateCallback d = new GUIStatUpdateCallback(OnUIRefresh);
                Invoke(d, new object[] { sim });
            }
            else
            {
                UpdateGUI();
            }
        }
コード例 #2
0
ファイル: AppGUI.cs プロジェクト: Mirc224/Agent_VacCenter_GUI
        public void OnFinish(OSPABA.Simulation sim)
        {
            var simulacia = sim as simulation.VacCenterSimulation;

            if (casLabel.InvokeRequired)
            {
                GUIStatUpdateCallback d = new GUIStatUpdateCallback(OnFinish);
                Invoke(d, new object[] { sim });
            }
            else
            {
                startPauseButton.Text = "Start";
                UpdateGUI();
                if (simulacia.AktualneParametreSimulacie.ZobrazenieZavislosti)
                {
                    _zobrazovanaKrivka.Points.Add(new OxyPlot.DataPoint(simulacia.AgentVysetrenia.PocetPracovnikov, simulacia.PriemernaDlzkaRaduVysetrenie.Mean()));
                    PrekresliGraf();
                }
            }
        }
コード例 #3
0
ファイル: AppGUI.cs プロジェクト: Mirc224/Agent_VacCenter_GUI
 private void OnPause(OSPABA.Simulation sim)
 {
     OnUIRefresh(_simulation);
 }
コード例 #4
0
ファイル: AppGUI.cs プロジェクト: Mirc224/Agent_VacCenter_GUI
        public void OnReplicationStart(OSPABA.Simulation sim)
        {
            if (casLabel.InvokeRequired)
            {
                GUIStatUpdateCallback d = new GUIStatUpdateCallback(OnReplicationStart);
                Invoke(d, new object[] { sim });
            }
            else
            {
                tabulkaPacienti.Rows.Clear();

                double[] confidenceInterval;
                int      i          = 0;
                int      replikacia = _simulation.CurrentReplication + 1;
                tabulkaReplikacie.Rows[i++].Cells[1].Value = (replikacia).ToString();


                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}min", ((_simulation.PriemernyNadcas.Mean() / 60)));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}", (_simulation.PriemernaDlzkaRaduRegistracia.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}s", (_simulation.PriemernyCasCakaniaRegistracia.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.##}%", (_simulation.PriemerneVytazenieAdmin.Mean() * 100));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}", (_simulation.PriemernaDlzkaRaduVysetrenie.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}s", (_simulation.PriemernyCasCakaniaVysetrenie.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.##}%", (_simulation.PriemerneVytazenieDoktor.Mean() * 100));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}", (_simulation.PriemernaDlzkaRaduOckovanie.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}s", (_simulation.PriemernyCasCakaniaOckovanie.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.##}%", (_simulation.PriemerneVytazenieSestricka.Mean() * 100));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}", (_simulation.PriemernaDlzkaRaduStriekacky.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.####}s", (_simulation.PriemernyCasCakaniaStriekacky.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.##}", (_simulation.PriemernyPocetLudiVCakarni.Mean()));
                tabulkaReplikacie.Rows[i++].Cells[1].Value = string.Format("{0:0.##}s", (_simulation.PriemernaCakaciaDoba.Mean()));


                if (_simulation.CurrentReplication > 1)
                {
                    i = 1;
                    confidenceInterval = _simulation.PriemernyNadcas.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.####}", confidenceInterval[0] / 60)}, {string.Format("{0:0.####}", confidenceInterval[1] / 60)}>");

                    confidenceInterval = _simulation.PriemernaDlzkaRaduRegistracia.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.####}", confidenceInterval[0])}, {string.Format("{0:0.####}", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernyCasCakaniaRegistracia.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}s", confidenceInterval[0])}, {string.Format("{0:0.##}s", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemerneVytazenieAdmin.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}", confidenceInterval[0] * 100)}, {string.Format("{0:0.##}", confidenceInterval[1] * 100)}>");

                    confidenceInterval = _simulation.PriemernaDlzkaRaduVysetrenie.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.####}", confidenceInterval[0])}, {string.Format("{0:0.####}", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernyCasCakaniaVysetrenie.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}s", confidenceInterval[0])}, {string.Format("{0:0.##}s", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemerneVytazenieDoktor.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}", confidenceInterval[0] * 100)}, {string.Format("{0:0.##}", confidenceInterval[1] * 100)}>");

                    confidenceInterval = _simulation.PriemernaDlzkaRaduOckovanie.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.####}", confidenceInterval[0])}, {string.Format("{0:0.####}", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernyCasCakaniaOckovanie.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}s", confidenceInterval[0])}, {string.Format("{0:0.##}s", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemerneVytazenieSestricka.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}", confidenceInterval[0] * 100)}, {string.Format("{0:0.##}", confidenceInterval[1] * 100)}>");

                    confidenceInterval = _simulation.PriemernaDlzkaRaduStriekacky.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.####}", confidenceInterval[0])}, {string.Format("{0:0.####}", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernyCasCakaniaStriekacky.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}s", confidenceInterval[0])}, {string.Format("{0:0.##}s", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernyPocetLudiVCakarni.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}", confidenceInterval[0])}, {string.Format("{0:0.##}", confidenceInterval[1])}>");

                    confidenceInterval = _simulation.PriemernaCakaciaDoba.ConfidenceInterval95;
                    tabulkaReplikacie.Rows[i++].Cells[2].Value = string.Format($"<{string.Format("{0:0.##}s", confidenceInterval[0])}, {string.Format("{0:0.##}s", confidenceInterval[1])}>");
                }
            }
        }
コード例 #5
0
 public StavovaEntita(OSPABA.Simulation sim)
     : base(sim)
 {
 }
コード例 #6
0
 public Sestricka(OSPABA.Simulation sim)
     : base(sim)
 {
 }