示例#1
0
 internal void Depart(Job departing)
 {
     departing.ExitTime = _sim.ClockTime;
     JobsDeparted.Add(departing);
     JobsInSystem.Remove(departing);
     TimeSeries_JobHoursInSystem.Add((departing.ExitTime - departing.EnterTime).TotalHours);
 }
示例#2
0
 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;
 }
示例#3
0
 internal FinishProcess(Simulator sim, Job job) : base(sim) { Job = job; }
示例#4
0
 internal void Enqueue(Job toWait)
 {
     Queues[toWait.CurrentMachineTypeIndex].Enqueue(toWait);
 }
示例#5
0
 internal void Update_StartProcess(Job starting, Machine machine)
 {
     machine.Processing = starting;
     starting.BeingProcessedBy = machine;            
 }
示例#6
0
 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;
 }
示例#7
0
 internal StartProcess(Simulator sim, Job job) : base(sim) { Job = job; }