override public void ItPassEmbarking(Tram tram) { int pnew = updatePassWaiting(); transferPassNew += pnew; tram.tramActivitylog.WriteLine(Time.Now().ToString() + " , ItPassExchange , " + Name); if (Simulation.EXPLICIT) { Console.WriteLine("iterative passenger embarkation"); } int pin = Math.Min(tram.PassMax - tram.PassCurr, PassWaiting); PassWaiting -= pin; int deltat = (int)RNG.Gamma3(2, 0.2 * (double)pin, 0.0); if ((!tram.cameFromDepot) && (Time.Now() - tram.arrivaltime < Dweltime)) { new PassEmbarkWait(tram.arrivaltime + Dweltime, tram, pin, this); } else if (NextDeparture() > Time.Now() + 5) { new PassEmbarkWait(NextDeparture() - 5, tram, pin, this); } else { new EndPassTransfer((Time.Now() + deltat), tram, this, pin, 0, false); } }
override public void ItPassEmbarking(Tram tram) { int pnew = updatePassWaiting(); transferPassNew += pnew; tram.busy = true; tram.tramActivitylog.WriteLine(Time.Now().ToString() + " , ItPassExchange , " + Name); int pin = Math.Min(tram.PassMax - tram.PassCurr, PassWaiting); PassWaiting -= pin; int deltat = (int)RNG.Gamma3(2, 0.2 * pin, 0.0); new EndPassTransfer((Time.Now() + deltat), tram, this, pin, 0, false); }
override protected int TimePassExchange(int pin, int pout) { double delta = 12.5 + 0.13 * Convert.ToDouble(pout) + 0.22 * Convert.ToDouble(pin); return((int)RNG.Gamma3(2, delta, 0.8 * delta)); }