예제 #1
0
 private void InitializeTools()
 {
     _toolFactory   = new ToolFactory();
     _toolConverter = new ToolConverter(_toolFactory, _shiftConverter);
     _tools         = new ConcurrentDictionary <int, ITool>();
     _toolTypes     = new ConcurrentDictionary <string, ITool>();
     _toolsMap      = new ConcurrentDictionary <int, DataSetServices.Data.Modeling.Resources.ITool>();
 }
예제 #2
0
 public JobConverter(
     EntityGenerator <IJob> factory,
     SkillConverter skillConverter,
     ToolConverter toolConverter,
     ZoneConverter zoneConverter) : base(factory)
 {
     _skillConverter = skillConverter;
     _toolConverter  = toolConverter;
     _zoneConverter  = zoneConverter;
 }
예제 #3
0
 public ToolManager(IShift shift, ToolConverter converter)
 {
     _shift = shift;
     _converter = converter;
     _inProcessJobs = new Dictionary<IToolInstance, IJob>();
     _inProcessTools = new Dictionary<IJob, HashSet<IToolInstance>>();
     _inProcessToolSchedules = new Dictionary<IJob, HashSet<IScheduledTool>>();
     _processedJobs = new Dictionary<IJob, Tuple<int, int>>();
     _toolAvailableStates = new Dictionary<ITool, Dictionary<int, bool>>();
     foreach (var tool in _converter.ToolTypes)
     {
         _toolAvailableStates.Add(tool.Key, new Dictionary<int, bool>());
         foreach (var ti in tool.Value)
         {
             _toolAvailableStates[tool.Key].Add(ti.Key, true);
         }
     }
 }
예제 #4
0
        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>();
        }
예제 #5
0
        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 InitializeTools()
 {
     _toolFactory = new ToolFactory();
     _toolConverter = new ToolConverter(_toolFactory, _shiftConverter);
     _tools = new ConcurrentDictionary<int, ITool>();
     _toolTypes = new ConcurrentDictionary<string, ITool>();
     _toolsMap = new ConcurrentDictionary<int, DataSetServices.Data.Modeling.Resources.ITool>();
 }