internal void Depart(Job departing) { departing.ExitTime = _sim.ClockTime; JobsDeparted.Add(departing); JobsInSystem.Remove(departing); TimeSeries_JobHoursInSystem.Add((departing.ExitTime - departing.EnterTime).TotalHours); }
internal Job GetWaitingJob_onFinishProcess(Job finishing) { var machine = finishing.BeingProcessedBy; finishing.CurrentStage++; finishing.BeingProcessedBy = null; machine.Processing = null; if (Queues[machine.Type.Id].Count > 0) return Queues[machine.Type.Id].Dequeue(); return null; }
internal FinishProcess(Simulator sim, Job job) : base(sim) { Job = job; }
internal void Enqueue(Job toWait) { Queues[toWait.CurrentMachineTypeIndex].Enqueue(toWait); }
internal void Update_StartProcess(Job starting, Machine machine) { machine.Processing = starting; starting.BeingProcessedBy = machine; }
internal Job Generate_EnteringJob(Random rs) { var job = new Job { Id = JobCounter++, Type = _sim.Scenario.Generate_JobType(rs), EnterTime = _sim.ClockTime, CurrentStage = 0 }; JobsInSystem.Add(job); return job; }
internal StartProcess(Simulator sim, Job job) : base(sim) { Job = job; }