public void ScheduleJobTypeFinishEvent(double timeIn, JobType jobTypeIn) { JobTypeFinishEvent jobTypeFinishEvent = new JobTypeFinishEvent(timeIn, this.manager, jobTypeIn); this.ScheduleEvent(jobTypeFinishEvent); }
public double CalculateAverageLeadTime(JobType jobTypeIn) { double leadTime = 0; return(leadTime); }
public void ScheduleArrivalEvent(double timeIn, JobType jobTypeIn) { ArrivalEvent arrivalEvent = new ArrivalEvent(timeIn, this.manager, jobTypeIn); this.ScheduleEvent(arrivalEvent); }
public void ReadReleaseInformation(Stream streamIn, double timeIn) { DataSet releases = new DataSet(); releases.ReadXml(streamIn); if (releases.Tables.Count > 0) { foreach (DataRow currentRow in releases.Tables[0].Rows) { int quantity = Int32.Parse(currentRow["Quantity"].ToString()); string typeName = currentRow["Type"].ToString(); JobType jobType = this.jobMix.JobTypes[typeName]; if (quantity >= 0) { jobType.Unreleased += quantity; } else { if (quantity <= jobType.Unreleased) { jobType.Unreleased -= quantity; } else { quantity -= jobType.Unreleased; jobType.Unreleased = 0; JobList cancellableJobs = new JobList(); foreach (Job job in jobType.Jobs) { bool cancel = true; foreach (Unitload unitload in job.Unitloads) { if ((unitload.Location != jobType.InputStation.InQueue) || (unitload.Location == jobType.InputStation.InQueue && unitload.InTransfer == true)) { cancel = false; break; } } if (cancel == true) { cancellableJobs.Insert(0, job); } } while (quantity > 0 && cancellableJobs.Count > 0) { Job currentJob = cancellableJobs[0]; cancellableJobs.RemoveAt(0); quantity--; foreach (Unitload unitload in currentJob.Unitloads) { this.unitloads.Remove(unitload); } this.jobs.Remove(currentJob); Statistics submitted = jobType.Statistics["Submitted"]; submitted.UpdateCount(timeIn, -1); } } } } } streamIn.Close(); }