package InitialSchedules;

import org.chocosolver.solver.Solution;

public class InitialSchedulesArray {

    public int[][] InitialPartTimeSchedules;
    public int[][] InitialFullTimeSchedules;
    private ModelInitialSchedules myModelInitialSchedules;
    private Solution mySolution;

    public InitialSchedulesArray(ModelInitialSchedules m, Solution s) {
        this.myModelInitialSchedules = m;
        this.mySolution = s;
        this.InitialPartTimeSchedules = new int[myModelInitialSchedules.maxPartTimeEmployee][myModelInitialSchedules.myScheduleParameters.workPeriodsPerSchedule];
        this.InitialFullTimeSchedules = new int[myModelInitialSchedules.maxFullTimeEmployee][myModelInitialSchedules.myScheduleParameters.workPeriodsPerSchedule];
        for (int workPeriod = 0; workPeriod < myModelInitialSchedules.myScheduleParameters.workPeriodsPerSchedule; workPeriod++) {
            for (int employee = 0; employee < myModelInitialSchedules.maxPartTimeEmployee; employee++) {
                this.InitialPartTimeSchedules[employee][workPeriod] = mySolution.getIntVal(myModelInitialSchedules.workPeriodsSchedulesOfPartTimeEmployees[employee][workPeriod]);
            }
        }

        for (int workPeriod = 0; workPeriod < myModelInitialSchedules.myScheduleParameters.workPeriodsPerSchedule; workPeriod++) {
            for (int employee = 0; employee < myModelInitialSchedules.maxFullTimeEmployee; employee++) {
                this.InitialFullTimeSchedules[employee][workPeriod] = mySolution.getIntVal(myModelInitialSchedules.workPeriodsSchedulesOfFullTimeEmployees[employee][workPeriod]);
            }
        }

    }
}
