Ajout d'une boucle dans le main pour faire une matrice des ratios d'employés optimaux en fonction des probabilités d'absence et d'augmentation de la demande.
This commit is contained in:
parent
1c3f6b2b0b
commit
cb8a2f4fd2
3 changed files with 20 additions and 11 deletions
Binary file not shown.
|
@ -9,8 +9,8 @@ package AbsenceSchedules;
|
|||
*
|
||||
* @author frabe
|
||||
*/
|
||||
public interface ParametersAbsencesSimulator {
|
||||
public final double probPresence = 0.99;
|
||||
public final double probReturn = 0.50;
|
||||
public final int numberAbsenceSimulations = 1000;
|
||||
public class ParametersAbsencesSimulator {
|
||||
public static double probPresence = 0.9;
|
||||
public static final double probReturn = 0.50;
|
||||
public static int numberAbsenceSimulations = 1000;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
//import AbsenceSchedules.AbsenceSchedulesArray;
|
||||
|
||||
import AbsenceSchedules.*;
|
||||
import InitialSchedules.*;
|
||||
import ScheduleUtil.*;
|
||||
|
@ -16,14 +14,25 @@ public class MainClass {
|
|||
|
||||
public static void main(String[] args) {
|
||||
|
||||
List<SchedulesArray> initialSchedulesArrayList = generateInitialSchedules();
|
||||
// for (int i = 0 ; i <= 10 ; i++) {
|
||||
|
||||
// ParametersAbsencesSimulator.probPresence = (double) i * 0.01 + 0.9; // Pour de 0.9 a 1.0 par increment de 0.01
|
||||
|
||||
// System.out.print("Probabilité absence = " + (1-ParametersAbsencesSimulator.probPresence));
|
||||
|
||||
List<BankAbsenceSchedules> listBankAbsenceSchedules = GenerateAbsencesSchedules(initialSchedulesArrayList);
|
||||
// Placer une sous-boucle pour faire varier la probabilite d'augmentation de la demande.
|
||||
|
||||
List<SchedulesArray> initialSchedulesArrayList = generateInitialSchedules();
|
||||
|
||||
List<BankRecoveredSchedules> bankRecoveredSchedulesOrderedByMeanCost = GenerateOptimalRecoveredSchedules(listBankAbsenceSchedules);
|
||||
List<BankAbsenceSchedules> listBankAbsenceSchedules = GenerateAbsencesSchedules(initialSchedulesArrayList);
|
||||
|
||||
SchedulesWindows.ShowSolutionResultsFrame initialSchedulesViewer = new SchedulesWindows.ShowSolutionResultsFrame(bankRecoveredSchedulesOrderedByMeanCost);
|
||||
List<BankRecoveredSchedules> bankRecoveredSchedulesOrderedByMeanCost = GenerateOptimalRecoveredSchedules(listBankAbsenceSchedules);
|
||||
|
||||
SchedulesWindows.ShowSolutionResultsFrame initialSchedulesViewer = new SchedulesWindows.ShowSolutionResultsFrame(bankRecoveredSchedulesOrderedByMeanCost);
|
||||
|
||||
// int optimalFullTimeEmployee = bankRecoveredSchedulesOrderedByMeanCost.get(0).initialSchedulesArray.getNumberFullTimeEmployee();
|
||||
// System.out.println(optimalFullTimeEmployee + " ");
|
||||
// }
|
||||
}
|
||||
|
||||
private static List<SchedulesArray> generateInitialSchedules() {
|
||||
|
@ -61,7 +70,7 @@ public class MainClass {
|
|||
|
||||
SolverInitialSchedules mySolverPartTimeEmployeesInitialSchedules = new SolverInitialSchedules(myModelPartTimeEmployeesInitialSchedules);
|
||||
List<Solution> myInitialPartTimeEmployeesSchedulesSolutions = mySolverPartTimeEmployeesInitialSchedules.findAllSolution();
|
||||
mySolverPartTimeEmployeesInitialSchedules.printStatistics();
|
||||
// mySolverPartTimeEmployeesInitialSchedules.printStatistics();
|
||||
|
||||
for (Solution CurrentPartTimeEmployeesSolution : myInitialPartTimeEmployeesSchedulesSolutions) {
|
||||
PartTimeEmployeeScheduleArray partTimeSchedulesArray = new PartTimeEmployeeScheduleArray(myModelPartTimeEmployeesInitialSchedules, CurrentPartTimeEmployeesSolution);
|
||||
|
|
Loading…
Reference in a new issue