Ejemplo n.º 1
0
 public SchedulareSatisfaction(Schedulare schedulare, double satisfaction, ShiftsContainer shiftsContainer, double weight, double executeTime, double mostUnfortunateWorkerPer)
 {
     Schedulare               = schedulare;
     Satisfaction             = satisfaction;
     ShiftsContainer          = shiftsContainer;
     Weight                   = weight;
     ExecuteTime              = executeTime;
     MostUnfortunateWorkerPer = mostUnfortunateWorkerPer;
 }
Ejemplo n.º 2
0
        private void InitializeParams(ShiftsContainer shiftsContainer)
        {
            //List<Shift> shifts = CreateNewShift(shiftsContainer);

            List <Day> days = new List <Day>();

            for (int i = 0; i < shiftsContainer.ShiftParams.DaysOfWork; i++)
            {
                days.Add(new Day()
                {
                    Name = week[i], Shifts = CreateNewShift(shiftsContainer)
                });
            }
            Days = days;
        }
Ejemplo n.º 3
0
        private List <Shift> CreateNewShift(ShiftsContainer shiftsContainer)
        {
            //List<Worker> workers = new List<Worker>();
            //for (int i = 0; i < shiftsContainer.ShiftParams.NumberOfWokersInShift; i++)
            //{
            //    workers.Add(new Worker());
            //}

            List <Shift>  shifts      = new List <Shift>();
            var           numOfShifts = shiftsContainer.ShiftParams.NumberOfShiftsInDay;
            List <string> shiftsType;

            shiftsTypes.TryGetValue(numOfShifts, out shiftsType);
            for (int i = 0; i < numOfShifts; i++)
            {
                shifts.Add(new Shift()
                {
                    Name = shiftsType[i], Workers = new List <Worker>()
                });
            }

            return(shifts);
        }
Ejemplo n.º 4
0
 public Schedulare(ShiftsContainer shiftsContainer)
 {
     InitializeParams(shiftsContainer);
 }