public MockSchedule(IWorkforce workforce) { Workforce = workforce; }
public ScheduleService(ISchedule schedule, IWorkforce workforce, IBusinessRules rules) { _schedule = schedule; _workforce = workforce; _rules = rules; }
public SimulationModel(double util, double orderAmount, double pr, double cr, double lcf, double dueDateFix, double dueDateVar, double dueDateCV, double procTimeCV, double interarrivalCV, IWorkforce workforce, DispatchStrategy dispatch, int rseed = 0, double observationTime = 3600, double warmupTime = 600) { _randDemand = new PcgRandom(rseed); _randDueDate = new PcgRandom(rseed + 1); _randProc = new PcgRandom(rseed + 2); _randWorkerTieBreak = new PcgRandom(rseed + 3); UtilizationTarget = util; OrderAmount = orderAmount; ProcessingRatioWorker = pr; ChangeTimeRatio = cr; LineChangeFactor = lcf; DueDateHorizonFix = dueDateFix; DueDateHorizonVar = dueDateVar; CV_DueDate = dueDateCV; CV_ProcessingTime = procTimeCV; CV_Interarrival = interarrivalCV; ObservationTime = observationTime; WarmupTime = warmupTime; ProcessingTimeStations = 1; _capacity = new[] { 8, 8, 4, 4, 8, 8, 4, 4 }.Select(c => (int)Math.Round(c / pr)).ToArray(); // 2 products per independent line InterArrivalMean = (2 * OrderAmount * ProcessingTimeStations) / (UtilizationTarget * _capacity[0]); var ct = ChangeTimeRatio * ProcessingRatioWorker * ProcessingTimeStations; var lct = ct * LineChangeFactor; _changeTimeMean = new double[, ] { { 0, ct, ct, ct, lct, lct, lct, lct }, { ct, 0, ct, ct, lct, lct, lct, lct }, { ct, ct, 0, 0, lct, lct, lct, lct }, { ct, ct, 0, 0, lct, lct, lct, lct }, { lct, lct, lct, lct, 0, ct, ct, ct }, { lct, lct, lct, lct, ct, 0, ct, ct }, { lct, lct, lct, lct, ct, ct, 0, 0 }, { lct, lct, lct, lct, ct, ct, 0, 0 } }; _qualificationByStation = new[] { 0, 1, 2, 2, 3, 4, 5, 5 }; _workforce = workforce; _dispatch = dispatch; _env = new Simulation(rseed); _pool = new ResourcePool(_env, Enumerable.Range(0, _workforce.Workers).Cast <object>()); _workersByQualification = _workforce.GetWorkersByQualification().ToList(); _qualificationByWorker = _workforce.GetQualificationByWorker().ToList(); _stations = _capacity.Select(m => new Resource(_env, Math.Max(m, 1))).ToArray(); _lastStationByWorker = Enumerable.Repeat(-1, _workforce.Workers).ToArray(); _activeStations = new int[_capacity.Length]; _activeWorkers = 0; Backlog = _stations.Select(t => new TimeBasedStatistics(_env)).ToArray(); SystemUtilization = new TimeBasedStatistics(_env); StationUtilization = _stations.Select(t => new TimeBasedStatistics(_env)).ToArray(); WIPInventory = new TimeBasedStatistics(_env); FGIInventory = new TimeBasedStatistics(_env); WorkerUtilization = new TimeBasedStatistics(_env); WorkerUtilizations = Enumerable.Range(0, _workforce.Workers).Select(x => new TimeBasedStatistics(_env)).ToArray(); Backorders = new TimeBasedStatistics(_env); WIPLeadTime = new BasicStatistics(); FGILeadTime = new BasicStatistics(); Tardiness = new BasicStatistics(); ServiceLevel = new BasicStatistics(); _backorderedJobs = new Dictionary <Process, Tuple <double, double> >(); }
public Schedule(IWorkforce workforce) { Shifts = new List <IShift>(); Workforce = workforce; }