modification tableau temps partiel

This commit is contained in:
François Pelletier 2018-03-28 16:20:16 -04:00
parent 48a2beaaf3
commit 01bcfd4e6e
4 changed files with 10 additions and 10 deletions

View file

@ -235,12 +235,12 @@ public class ModelInitialSchedules {
// Calcul du salaire versé
IntVar PartTimeEmployeesSalary =
chocoModelInitialSchedules.intVar(1000, this.maxPartTimeEmployee *
chocoModelInitialSchedules.intVar(0, this.maxPartTimeEmployee *
this.myScheduleParameters.workPeriodsPerSchedule *
this.myScheduleParameters.hourlyRateOfPartTimeEmployees, true);
IntVar FullTimeEmployeesSalary =
chocoModelInitialSchedules.intVar(1000, this.maxFullTimeEmployee *
chocoModelInitialSchedules.intVar(0, this.maxFullTimeEmployee *
this.myScheduleParameters.workPeriodsPerSchedule *
this.myScheduleParameters.regularHourlyRateOfFullTimeEmployees, true);

View file

@ -82,7 +82,7 @@ public class ParametersInitialSchedules {
this.requiredWorkforce = new int[this.daysPerSchedule * this.workPeriodsPerDay];
this.totalWorkedPeriodsInSchedule = 0;
int[] dailyRequiredWorkforce = new int[]{2, 2, 4, 4, 3, 3};
int[] dailyRequiredWorkforce = new int[]{1, 1, 1, 1, 1, 1};
for (int day = 0; day < this.daysPerSchedule; day++) {
for(int shift = 0; shift < this.workPeriodsPerDay; shift++) {
this.requiredWorkforce[day * this.workPeriodsPerDay + shift] = dailyRequiredWorkforce[shift];

View file

@ -18,11 +18,7 @@ public class ValidPartTimeEmployeeShift {
{0, 0, 0, 1, 1, 0},
{0, 0, 1, 1, 0, 0},
{0, 1, 1, 0, 0, 0},
{1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1},
{0, 0, 0, 1, 1, 1},
{0, 0, 0, 1, 1, 1},
{0, 0, 0, 1, 1, 1}
{1, 1, 0, 0, 0, 0}
};
}

View file

@ -2,6 +2,7 @@ import AbsenceSchedules.AbsenceSchedulesArray;
import InitialSchedules.InitialSchedulesArray;
import jdistlib.rng.MersenneTwister;
import jdistlib.rng.RandomEngine;
import org.chocosolver.solver.Model;
import org.chocosolver.solver.Solution;
import org.chocosolver.solver.Solver;
import org.chocosolver.solver.exception.ContradictionException;
@ -46,11 +47,14 @@ public class MainClass {
//solverInitialSchedules.showDashboard();
/*solverInitialSchedules.setSearch(Search.domOverWDegSearch(myModelInitialSchedules.allWorkPeriods));*/
//solverInitialSchedules.setRestartOnSolutions(); /*Sans restart, toutes les horaires sont identiques*/
solverInitialSchedules.limitSolution(2);
solverInitialSchedules.limitSolution(1);
solverInitialSchedules.limitTime(10000);
List<Solution> myInitialSchedulesSolutions;
/*myInitialSchedulesSolutions = solverInitialSchedules.findAllOptimalSolutions
(myModelInitialSchedules.TotalEmployeesSalary, Model.MINIMIZE);*/
myInitialSchedulesSolutions = solverInitialSchedules.findAllSolutions
(/*myModelInitialSchedules.TotalEmployeesSalary, Model.MINIMIZE*/);
();
// fonction pour reduire le nombre d'horaire dans la banque d'horaire.
// InitialSchedules.UtilInitialSchedules.refineInitialSchedules(bestInitialSchedules);