Example #1
0
 private DtoToSchedulingBenchmarkModelMapper(SchedulingPeriod schedulingPeriod)
 {
     _schedulingPeriod = schedulingPeriod ?? throw new ArgumentNullException(nameof(schedulingPeriod));
     _dayOffs          = MapDayOffs();
     _shiftOffRequests = MapShiftOffRequests();
     _shiftOnRequests  = MapShiftOnRequests();
     _contracts        = MapContracts();
 }
Example #2
0
        public SchedulingIpContext MapToSolver(SchedulingPeriod schedulingPeriod)
        {
            Map(schedulingPeriod);

            CreateConstraints();

            MapObjective();
            return(scheduleContext);
        }
Example #3
0
        //Constructor
        public ScheduleEvaluator(SchedulingPeriod inputData)
        {
            sp           = inputData;
            nrShiftTypes = sp.ShiftTypes.Shift.Count;
            DateTime startDate = Convert.ToDateTime(sp.StartDate);
            DateTime endDate   = Convert.ToDateTime(sp.EndDate);

            nrOfDaysInPeriod = endDate.Day - startDate.Day + 1;
            numTimeUnits     = nrOfDaysInPeriod * nrShiftTypes;
        }
Example #4
0
        private void Map(SchedulingPeriod schedulingPeriod)
        {
            MapShiftTypes(schedulingPeriod.ShiftTypes);
            MapPersons(schedulingPeriod.Employees);
            MapContracts(schedulingPeriod.Contracts);
            MapShifts(schedulingPeriod.CoverRequirements);
            MapShiftOnRequests(schedulingPeriod.ShiftOnRequests);
            MapShiftOffRequests(schedulingPeriod.ShiftOffRequests);
            MapFixedAssignments(schedulingPeriod.FixedAssignments);

            MapExtraInfomraiton();
        }
Example #5
0
        public Evalutador(SchedulingPeriod inputData)
        {
            //Data Initialization
            inputDataLocal = inputData;
            //var orderedShifts = inputDataLocal.ShiftTypes.Shift.OrderBy(x => DateTime.Parse(x.StartTime)).ThenBy(x => DateTime.Parse(x.EndTime)).ToList();
            var orderedShifts = inputDataLocal.ShiftTypes.Shift.ToList();

            orderedShifts.ForEach(shift => shiftTypesDict.Add(shift.ID, orderedShifts.IndexOf(shift)));
            numUnits = inputDataLocal.ShiftTypes.Shift.Count;
            DateTime startDate = Convert.ToDateTime(inputDataLocal.StartDate);
            DateTime endDate   = Convert.ToDateTime(inputDataLocal.EndDate);

            numDays       = endDate.Day - startDate.Day + 1;
            conditions    = new List <Condition>();
            firstSaturday = GetFirstSaturday(startDate, endDate);
            numWeekends   = GetNumWeekends(firstSaturday, startDate, endDate);
        }
Example #6
0
 public static SchedulingBenchmarkModel MapToSchedulingBenchmarkModel(SchedulingPeriod schedulingPeriod)
 => new DtoToSchedulingBenchmarkModelMapper(schedulingPeriod).MapToSchedulingBenchmarkModel();
 public void GlobalSetup()
 {
     _dto = SchedulingBenchmarkInstanceReader.FromXml(Instance);
 }
Example #8
0
 /// <summary>
 /// Evalutador overloaded constractor
 /// </summary>
 /// <param name="inputData"></param>
 /// <param name="nurseId"></param>
 public Evalutador(SchedulingPeriod inputData, int nurseId) : this(inputData)
 {
     scheduleEvaluator = new ScheduleEvaluator(inputDataLocal);
     conditions.Clear();
     BuildConditionsList(nurseId);
 }