Example #1
0
        //meta! sender="AgentOkolia", id="28", type="Notice"
        public void ProcessNoticeNaplanujPrichod(MessageForm message)
        {
            //int multiplier = 1;
            var sim = MySim as VacCenterSimulation;

            /*while (_generatorPravdepodobnosti.Sample() < MyAgent.PocetNepridenychPacientov / (double)MyAgent.PocetObjednanychPacientov)
             * {
             ++multiplier;
             *                  if(multiplier * MyAgent.CasMedziPrichodmi + MySim.CurrentTime > sim.CasPrevadzkyVSekundach)
             *  {
             *                          MyAgent.Generuj = false;
             *                          return;
             *  }
             * }*/
            if (_haldaPrichodov.Count == 0)
            {
                MyAgent.Generuj = false;
                return;
            }


            message.Code = Mc.NoticePrichodPacienta;
            double casPrichodu = _haldaPrichodov.GetMin();

            //System.Console.WriteLine(casPrichodu - sim.CurrentTime);
            Hold(casPrichodu - sim.CurrentTime, message);
        }