private void InitializeWorkers() { _workerFactory = new WorkerFactory(); _laborConverter = new LaborConverter(_workerFactory, _shiftConverter, _skillConverter); _workers = new ConcurrentDictionary <int, IWorker>(); _laborsMap = new ConcurrentDictionary <int, ILabor>(); }
public WorkerManager(IShift shift, LaborConverter converter) { _shift = shift; _converter = converter; _inProcessJobs = new Dictionary<IWorker, IJob>(); _inProcessWorkers = new Dictionary<IJob, HashSet<IWorker>>(); _inProcessWorkerSchedules = new Dictionary<IJob, HashSet<IScheduledWorker>>(); _processedJobs = new Dictionary<IJob, Tuple<int, int>>(); _workerAvailableStates = new Dictionary<ISkill, Dictionary<int, bool>>(); foreach (var item in _converter.WorkerTypes) { _workerAvailableStates.Add(item.Key, new Dictionary<int, bool>()); foreach (var worker in item.Value) { _workerAvailableStates[item.Key].Add(worker.Key, true); } } }
public ShiftManager( ShiftConverter shiftConverter, SkillConverter skillConverter, LaborConverter laborConverter, ToolConverter toolConverter) { _shiftConverter = shiftConverter; _skillConverter = skillConverter; _laborConverter = laborConverter; _toolConverter = toolConverter; InitializeShifts(); InitializeSkills(); InitializeWorkers(); InitializeTools(); ShiftWorkerManager = new Dictionary<IShift, WorkerManager>(); ShiftToolManager = new Dictionary<IShift, ToolManager>(); }
public ShiftManager( ShiftConverter shiftConverter, SkillConverter skillConverter, LaborConverter laborConverter, ToolConverter toolConverter) { _shiftConverter = shiftConverter; _skillConverter = skillConverter; _laborConverter = laborConverter; _toolConverter = toolConverter; InitializeShifts(); InitializeSkills(); InitializeWorkers(); InitializeTools(); ShiftWorkerManager = new Dictionary <IShift, WorkerManager>(); ShiftToolManager = new Dictionary <IShift, ToolManager>(); }
public SolverDataManager(ProjectDataSet model, ConstraintSolverResult data) { _model = model; _solverResult = data; var jobFactory = new JobFactory(); var skillFactory = new SkillFactory(); var workerFactory = new WorkerFactory(); var toolFactory = new ToolFactory(); var zoneFactory = new ZoneFactory(); var shiftFactory = new ShiftFactory(); var shiftConverter = new ShiftConverter(shiftFactory); var skillConverter = new SkillConverter(skillFactory); var toolConverter = new ToolConverter(toolFactory, shiftConverter); var zoneConverter = new ZoneConverter(zoneFactory); var laborConverter = new LaborConverter(workerFactory, shiftConverter, skillConverter); var jobConverter = new JobConverter(jobFactory, skillConverter, toolConverter, zoneConverter); _shiftManager = new ShiftManager(shiftConverter, skillConverter, laborConverter, toolConverter); _jobManager = new JobManager(jobConverter); _zoneManager = new ZoneManager(zoneConverter); }
public SolverDataManager(ProjectDataSet model, ConstraintSolverResult data) { _model = model; _solverResult = data; var jobFactory = new JobFactory(); var skillFactory = new SkillFactory(); var workerFactory = new WorkerFactory(); var toolFactory = new ToolFactory(); var zoneFactory = new ZoneFactory(); var shiftFactory = new ShiftFactory(); var shiftConverter = new ShiftConverter(shiftFactory); var skillConverter = new SkillConverter(skillFactory); var toolConverter = new ToolConverter(toolFactory, shiftConverter); var zoneConverter = new ZoneConverter(zoneFactory); var laborConverter = new LaborConverter(workerFactory, shiftConverter, skillConverter); var jobConverter = new JobConverter(jobFactory, skillConverter, toolConverter, zoneConverter); _shiftManager = new ShiftManager(shiftConverter, skillConverter, laborConverter, toolConverter); _jobManager = new JobManager(jobConverter); _zoneManager = new ZoneManager(zoneConverter); }
private void InitializeWorkers() { _workerFactory = new WorkerFactory(); _laborConverter = new LaborConverter(_workerFactory, _shiftConverter, _skillConverter); _workers = new ConcurrentDictionary<int, IWorker>(); _laborsMap = new ConcurrentDictionary<int, ILabor>(); }