Ménage dans le code pour enlever des lignes de commentaires.
Correction des figures de résultats.
This commit is contained in:
parent
6cf6c27b37
commit
74d645c236
8 changed files with 16 additions and 32 deletions
Binary file not shown.
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 177 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 43 KiB |
|
@ -16,28 +16,15 @@ public class MainClass {
|
|||
public static void main(String[] args) {
|
||||
|
||||
ParametersSchedules myScheduleParameters = new InitialSchedules.ParametersSchedules();
|
||||
for (int i = 0 ; i <= 30 ; i++) {
|
||||
|
||||
// ParametersAbsencesSimulator.probPresence = 1 - (double) i * 0.01; // Pour de 0.90 a 1.0 par increment de 0.01
|
||||
|
||||
// for (int j = 0 ; j <= 10 ; j++) {
|
||||
|
||||
// ParametersVariableDemandSimulator.probIncreasedDemandbyOne = (double) j * 0.1; // Pour de 0 a 1 par increment de 0.1
|
||||
// ParametersVariableDemandSimulator.probIncreasedDemandbyTwo = ParametersVariableDemandSimulator.probIncreasedDemandbyOne/5; // Pour de 0 a 0.25 par increment de 0.05
|
||||
// ParametersVariableDemandSimulator.probIncreasedDemandbyThree = ParametersVariableDemandSimulator.probIncreasedDemandbyOne/25; // Pour de 0 a 0.25 par increment de 0.05
|
||||
List<SchedulesArray> initialSchedulesArrayList = generateInitialSchedules(myScheduleParameters);
|
||||
|
||||
List<BankModifiedSchedules> listBankModifiedSchedules = GenerateModifiedSchedules(initialSchedulesArrayList, myScheduleParameters);
|
||||
List<SchedulesArray> initialSchedulesArrayList = generateInitialSchedules(myScheduleParameters);
|
||||
|
||||
List<BankRecoveredSchedules> bankRecoveredSchedulesOrderedByMeanCost = GenerateOptimalRecoveredSchedules(listBankModifiedSchedules);
|
||||
List<BankModifiedSchedules> listBankModifiedSchedules = GenerateModifiedSchedules(initialSchedulesArrayList, myScheduleParameters);
|
||||
|
||||
List<BankRecoveredSchedules> bankRecoveredSchedulesOrderedByMeanCost = GenerateRecoveredSchedules(listBankModifiedSchedules);
|
||||
|
||||
SchedulesWindows.ShowSolutionResultsFrame initialSchedulesViewer = new SchedulesWindows.ShowSolutionResultsFrame(bankRecoveredSchedulesOrderedByMeanCost);
|
||||
|
||||
SchedulesWindows.ShowSolutionResultsFrame initialSchedulesViewer = new SchedulesWindows.ShowSolutionResultsFrame(bankRecoveredSchedulesOrderedByMeanCost);
|
||||
|
||||
// int optimalFullTimeEmployee = bankRecoveredSchedulesOrderedByMeanCost.get(0).initialSchedulesArray.getNumberFullTimeEmployee();
|
||||
// System.out.print(optimalFullTimeEmployee + " ");
|
||||
// }
|
||||
// System.out.println(" ");
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -46,7 +33,7 @@ public class MainClass {
|
|||
// Trouver les horaires des employes a temps plein possibles pour different ratio templein/temps partiel
|
||||
List<SchedulesArray> initialSchedulesArrayList = new ArrayList<>();
|
||||
|
||||
int minFullTimeEmployee = 9; //La solution avec 1 employes est trop lente
|
||||
int minFullTimeEmployee = 2; //La solution avec 1 employes est trop lente
|
||||
|
||||
int maxFullTimeEmployee = 9; //9 est le max d'employes a temps plein pour la presente requiredWorkforce
|
||||
|
||||
|
@ -54,8 +41,6 @@ public class MainClass {
|
|||
|
||||
for (int numberFullTimeEmployees = minFullTimeEmployee ; numberFullTimeEmployees <= maxFullTimeEmployee ; numberFullTimeEmployees++) {
|
||||
|
||||
// System.out.println("numberFullTimeEmployees: " + numberFullTimeEmployees);
|
||||
|
||||
InitialSchedules.ModelFullTimeEmployeesInitialSchedules myModelFullTimeEmployeesInitialSchedules
|
||||
= new InitialSchedules.ModelFullTimeEmployeesInitialSchedules(myScheduleParameters, numberFullTimeEmployees);
|
||||
|
||||
|
@ -74,7 +59,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);
|
||||
|
@ -88,7 +73,7 @@ public class MainClass {
|
|||
}
|
||||
|
||||
// Pour afficher les horaires initiales
|
||||
// SchedulesWindows.ShowSchedulesFrame initialSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(initialSchedulesArrayList, "Initial Schedules"); // to be removed
|
||||
SchedulesWindows.ShowSchedulesFrame initialSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(initialSchedulesArrayList, "Initial Schedules"); // to be removed
|
||||
|
||||
return initialSchedulesArrayList;
|
||||
|
||||
|
@ -123,12 +108,12 @@ public class MainClass {
|
|||
}
|
||||
|
||||
// Pour afficher les horaires modifies
|
||||
// SchedulesWindows.ShowSchedulesFrame modifiedSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(listModifiedSchedules, "Modified Schedules"); // to be removed
|
||||
SchedulesWindows.ShowSchedulesFrame modifiedSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(listModifiedSchedules, "Modified Schedules"); // to be removed
|
||||
|
||||
return listBankModifiedSchedules;
|
||||
}
|
||||
|
||||
private static List<BankRecoveredSchedules> GenerateOptimalRecoveredSchedules(List<BankModifiedSchedules> listBankModifiedSchedules) {
|
||||
private static List<BankRecoveredSchedules> GenerateRecoveredSchedules(List<BankModifiedSchedules> listBankModifiedSchedules) {
|
||||
|
||||
BankRecoveredSchedulesComparator meanCostComparator = new BankRecoveredSchedulesComparator();
|
||||
PriorityQueue< BankRecoveredSchedules > bankRecoveredSchedulesOrderedByMeanCost = new PriorityQueue<>(meanCostComparator);
|
||||
|
@ -149,11 +134,10 @@ public class MainClass {
|
|||
|
||||
}
|
||||
bankRecoveredSimulations.meanCostRecoveredSimulations = totalCostRecoveredSimulations / bankRecoveredSimulations.bankRecoveredSimulation.size();
|
||||
System.out.println(bankRecoveredSimulations.meanCostRecoveredSimulations);
|
||||
bankRecoveredSchedulesOrderedByMeanCost.add(bankRecoveredSimulations);
|
||||
}
|
||||
// Pour afficher les horaires de recouvrement
|
||||
// SchedulesWindows.ShowSchedulesFrame recoveredSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(listRecoveredSchedules, "Recovered Schedules"); // to be removed
|
||||
SchedulesWindows.ShowSchedulesFrame recoveredSchedulesViewer = new SchedulesWindows.ShowSchedulesFrame(listRecoveredSchedules, "Recovered Schedules"); // to be removed
|
||||
|
||||
List<BankRecoveredSchedules> listbankRecoveredSchedulesOrderedByMeanCost = new ArrayList<>();
|
||||
while(!bankRecoveredSchedulesOrderedByMeanCost.isEmpty()){
|
||||
|
|
|
@ -10,7 +10,7 @@ package ModifiedSchedules;
|
|||
* @author frabe
|
||||
*/
|
||||
public class ParametersAbsencesSimulator {
|
||||
public static double probPresence = 0.98;
|
||||
public static double probPresence = 0.92;
|
||||
public static final double probReturn = 0.50;
|
||||
public static final int numberAbsenceSimulations = 100;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package ModifiedSchedules;
|
||||
|
||||
public class ParametersVariableDemandSimulator {
|
||||
public static double probIncreasedDemandbyOne = 1.00;
|
||||
public static double probIncreasedDemandbyOne = 0;
|
||||
public static double probIncreasedDemandbyTwo = probIncreasedDemandbyOne / 5;
|
||||
public static double probIncreasedDemandbyThree = probIncreasedDemandbyOne / 25;
|
||||
public static final int numberVariableDemandSimulations = 10;
|
||||
|
|
|
@ -24,10 +24,10 @@ public class RecoveredSchedulesArray extends SchedulesArray{
|
|||
super(modifiedSchedulesArray);
|
||||
this.myScheduleParameters = modifiedSchedulesArray.myScheduleParameters;
|
||||
this.modifiedSchedulesArray = modifiedSchedulesArray;
|
||||
recoverModifiedScheduleOptimally();
|
||||
recoverModifiedSchedule();
|
||||
}
|
||||
|
||||
private void recoverModifiedScheduleOptimally() {
|
||||
private void recoverModifiedSchedule() {
|
||||
boolean[][] initialRecoveredScheduleOfPartTimeEmployees = this.getDeepCopyEmployeesSchedules(this.modifiedSchedulesArray.partTimeSchedules);
|
||||
boolean[][] initialRecoveredScheduleOfFullTimeEmployees = this.getDeepCopyEmployeesSchedules(this.modifiedSchedulesArray.fullTimeSchedules);
|
||||
boolean[][] currentRecoveredScheduleOfPartTimeEmployees = this.getDeepCopyEmployeesSchedules(this.modifiedSchedulesArray.partTimeSchedules);
|
||||
|
|
Loading…
Reference in a new issue