This commit is contained in:
alexandre 2024-04-14 13:02:41 +02:00
parent 50f1940d6b
commit cca121b09c
5 changed files with 209 additions and 176 deletions

View File

@ -12,11 +12,15 @@
14 7 2 2024 14 7 2 2024
14 7 2 2024 14 7 2 2024
14 7 2 2024+ 14 7 2 2024+
14 7 2 2024+
14 7 2 2024+
15 7 2 2024 15 7 2 2024
15 7 2 2024 15 7 2 2024
15 7 2 2024 15 7 2 2024
16 7 2 2024 16 7 2 2024
16 7 2 2024+ 16 7 2 2024+
16 7 2 2024+
16 7 2 2024+
17 7 2 2024 17 7 2 2024
17 7 2 2024 17 7 2 2024
18 7 2 2024 18 7 2 2024

View File

@ -709,6 +709,7 @@ void add_colle(creneau* edt, colleur* chads, int grp, int id_edt, int id_chad) {
edt[id_edt].namelen = chads[id_chad].namelen; edt[id_edt].namelen = chads[id_chad].namelen;
str_copy(chads[id_chad].name, chads[id_chad].namelen, edt[id_edt].name); str_copy(chads[id_chad].name, chads[id_chad].namelen, edt[id_edt].name);
edt[id_edt].mat = chads[id_chad].mat; edt[id_edt].mat = chads[id_chad].mat;
//printf("{%d %s %d %d %d}\n", edt[id_edt].group, edt[id_edt].name, edt[id_edt].namelen, (int)(edt[id_edt].mat), id_edt);
} }
void remove_colle(creneau* edt, int id_edt) { void remove_colle(creneau* edt, int id_edt) {
@ -771,6 +772,7 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
bool has_math_dude = false; // length of colleur* bool has_math_dude = false; // length of colleur*
//printf("\n");
for(int week = 0; week < n_weeks; week++) { for(int week = 0; week < n_weeks; week++) {
int weeklen = weeks_len[week]; int weeklen = weeks_len[week];
@ -788,6 +790,7 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
} }
remaining_to_add++; // physics/english remaining_to_add++; // physics/english
//printf("%d -> (%d %d)\n", grp, week, remaining_to_add);
// initialize/reset variables // initialize/reset variables
r = rand()%weeklen; r = rand()%weeklen;
@ -796,7 +799,7 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
info++; info++;
// info colle // info colle
while(info >= 8) { while(info >= 6) {
if(edt[k+r%weeklen].group == 0 && edt[k+r%weeklen].length == 2) { if(edt[k+r%weeklen].group == 0 && edt[k+r%weeklen].length == 2) {
// if creneau is empty // if creneau is empty
// import all colleurs available // import all colleurs available
@ -831,14 +834,14 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
halt++; halt++;
} }
// reset the variables // reset the variables
r = rand()%16; r = rand()%weeklen;
found = false; found = false;
halt = 0; halt = 0;
// if there is a math colle to add, enter this loop // if there is a math colle to add, enter this loop
while(remaining_to_add == 2) { while(remaining_to_add == 2) {
if(edt[k+r%weeklen].group == 0 && edt[k+r%weeklen].length == 1) { if(edt[k+r%weeklen].mat == NOTHING && edt[k+r%weeklen].length == 1) {
// if creneau is empty // if creneau is empty
// import all colleurs available // import all colleurs available
free(dudes); free(dudes);
@ -863,6 +866,7 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
} else { } else {
found = true; found = true;
remaining_to_add--; remaining_to_add--;
//printf("+math for week %d and group %d (index %d)\n", week, grp, k+r%weeklen);
} }
} }
} }
@ -877,29 +881,30 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
halt++; halt++;
} }
// reset the variables // reset the variables
r = rand()%16; r = rand()%weeklen;
found = false; found = false;
halt = 0; halt = 0;
// do it again for physics/english colles // do it again for physics/english colles
while(remaining_to_add == 1) { while(remaining_to_add == 1) {
if(edt[k+r%weeklen].group == 0 && edt[k+r%weeklen].length == 1) { if(edt[k+r%weeklen].mat == NOTHING && edt[k+r%weeklen].length == 1) {
dudes = get_colleurs(chads, len_chads, edt[k+r%16].date, &len_dudes); dudes = get_colleurs(chads, len_chads, edt[k+r%16].date, &len_dudes);
len_perm = len_dudes; len_perm = len_dudes;
if(len_dudes != 0) { if(len_dudes != 0) {
generate_random_perm(perm, len_perm); generate_random_perm(perm, len_perm);
has_math_dude = false; has_math_dude = false;
for(int dude = 0; dude < len_perm*(1-has_math_dude); dude++) { /*for(int dude = 0; dude < len_perm*(1-has_math_dude); dude++) {
if(dudes[perm[dude]].mat == MATH) { if(dudes[dude].mat == MATH) {
has_math_dude = true; has_math_dude = true;
} }
} }*/
for(int dude = 0; dude < len_perm*(1-found)*(1-has_math_dude); dude++) { for(int dude = 0; dude < len_perm*(1-found)*(1-has_math_dude); dude++) {
//printf("%d\n", chads[perm[dude]]); //printf("%d\n", chads[perm[dude]]);
if(dudes[perm[dude]].mat == rotation) { if(dudes[perm[dude]].mat == rotation) {
add_colle(edt, dudes, grp, k+r%16, perm[dude]); add_colle(edt, dudes, grp, k+r%weeklen, perm[dude]);
found = true; found = true;
remaining_to_add--; remaining_to_add--;
//printf("+secondary for week %d and group %d (index %d)\n", week, grp, k+r%weeklen);
} }
} }
} }
@ -1037,7 +1042,7 @@ void aux_2(creneau* edt, int len_edt, colleur* chads, int len_chads, int n_group
for(int i = 0; i < n_groups; i++) { for(int i = 0; i < n_groups; i++) {
//for(int i = 0; i < 1; i++) { //for(int i = 0; i < 1; i++) {
//rintf("Adding colles for group %d...\n", i+1); //rintf("Adding colles for group %d...\n", i+1);
add_colles_for_group_MP2I(weeks_len, edt, len_edt, chads, len_chads, n_weeks, i+1, (topic)(2+i%2), i%4, i%8, &skipped); add_colles_for_group_MP2I(weeks_len, edt, len_edt, chads, len_chads, n_weeks, i+1, (topic)(2+i%2), i%4, i%6, &skipped);
} }
for(int i = 0; i < n_groups; i++) { for(int i = 0; i < n_groups; i++) {
//printf("Score for group %d : %d\n", i+1, score(edt, len_edt, i+1)); //printf("Score for group %d : %d\n", i+1, score(edt, len_edt, i+1));
@ -1048,7 +1053,7 @@ void aux_2(creneau* edt, int len_edt, colleur* chads, int len_chads, int n_group
local_group = i+1; local_group = i+1;
} }
} }
local_score -= skipped*35; local_score -= skipped*30;
if(local_score > max_score) { if(local_score > max_score) {
max_score = local_score; max_score = local_score;
screwed_group = local_group; screwed_group = local_group;

8
main.c
View File

@ -7,11 +7,11 @@ int main() {
srand(time(NULL)); srand(time(NULL));
//creneau* edt = import_creneaux("file.txt", 76); //creneau* edt = import_creneaux("file.txt", 76);
creneau* edt = import_creneaux_oneweek("MP2I-creneaux.txt", 29, 6); creneau* edt = import_creneaux_oneweek("MP2I-creneaux.txt", 33, 6);
int len_edt = 29*6; int len_edt = 33*6;
//colleur* dudes = import_colleurs("some_data.txt", 13, len_creneau); //colleur* dudes = import_colleurs("some_data.txt", 13, len_creneau);
colleur* dudes = import_colleurs_oneweek("MP2I-colleurs.txt", 16, 6, 29); colleur* dudes = import_colleurs_oneweek("MP2I-colleurs.txt", 16, 6, 33);
int n_colleurs = 16; int n_colleurs = 16;
//print_all_edt(edt, len_edt, 6, 31); //print_all_edt(edt, len_edt, 6, 31);
@ -24,7 +24,7 @@ int main() {
/*int* a = malloc(sizeof(int)*10); /*int* a = malloc(sizeof(int)*10);
generate_random_perm(a, 10); generate_random_perm(a, 10);
print_arr(a, 10);*/ print_arr(a, 10);*/
aux_2(edt, len_edt, dudes, n_colleurs, 15, 6, 1500); aux_2(edt, len_edt, dudes, n_colleurs, 15, 6, 1000);
//generate_colles_v1(edt, len_creneau, dudes, n_colleurs, 9, 4); //generate_colles_v1(edt, len_creneau, dudes, n_colleurs, 9, 4);
//generate_colles_v1(edt, len_creneau, dudes, n_colleurs, 15, 4); //generate_colles_v1(edt, len_creneau, dudes, n_colleurs, 15, 4);

View File

@ -1,175 +1,199 @@
hour,day,month,year,length,group,colleur,matiere hour,day,month,year,length,group,colleur,matiere
12,5,2,2024,1,14,Chevalier,Physique 12,5,2,2024,1,3,Herbaut,Anglais
13,5,2,2024,1,15,Herbaut,Anglais 13,5,2,2024,1,5,Belaggoune,Anglais
14,6,2,2024,1,3,Mullaert,Maths 14,6,2,2024,1,6,Chevalier,Physique
14,6,2,2024,1,0,none,none 14,6,2,2024,1,10,Chevalier,Physique
14,6,2,2024,1,0,none,none 14,6,2,2024,1,2,Mullaert,Maths
17,6,2,2024,1,2,Chevalier,Physique 17,6,2,2024,1,12,Colin,Physique
17,6,2,2024,1,6,Colin,Physique 17,6,2,2024,1,2,Colin,Physique
18,6,2,2024,1,8,Rapin,Maths 18,6,2,2024,1,4,Rapin,Maths
13,7,2,2024,1,4,Carpintero,Maths 13,7,2,2024,1,6,Carpintero,Maths
14,7,2,2024,1,7,Boully,Maths 14,7,2,2024,1,1,Le_Gouriellec,Anglais
14,7,2,2024,1,6,Bouverot,Maths 14,7,2,2024,1,10,Bouverot,Maths
14,7,2,2024,1,0,none,none 14,7,2,2024,1,11,Carpintero,Maths
14,7,2,2024,1,2,Carpintero,Maths 14,7,2,2024,1,12,Boully,Maths
14,7,2,2024,2,8,Colleur_Dinfo,Info 14,7,2,2024,2,12,Colleur_Dinfo,Info
15,7,2,2024,1,10,Bouverot,Maths 14,7,2,2024,2,0,none,none
15,7,2,2024,1,11,Boully,Maths 14,7,2,2024,2,6,Colleur_Dinfo,Info
15,7,2,2024,1,0,none,none 15,7,2,2024,1,8,Chevalier,Physique
16,7,2,2024,1,0,none,none 15,7,2,2024,1,13,Herbaut,Anglais
15,7,2,2024,1,14,Boully,Maths
16,7,2,2024,1,14,Chevalier,Physique
16,7,2,2024,2,0,none,none 16,7,2,2024,2,0,none,none
16,7,2,2024,2,0,none,none
16,7,2,2024,2,0,none,none
17,7,2,2024,1,4,De_Roux,Physique
17,7,2,2024,1,0,none,none 17,7,2,2024,1,0,none,none
17,7,2,2024,1,0,none,none 18,7,2,2024,1,7,Le_Gouriellec,Anglais
18,7,2,2024,1,0,none,none 14,8,2,2024,1,9,Le_Gouriellec,Anglais
14,8,2,2024,1,0,none,none 15,8,2,2024,1,11,Le_Gouriellec,Anglais
15,8,2,2024,1,0,none,none 18,8,2,2024,1,3,Rapin,Maths
18,8,2,2024,1,12,Rapin,Maths 18,8,2,2024,1,15,Le_Gouriellec,Anglais
18,8,2,2024,1,0,none,none
16,9,2,2024,1,0,none,none 16,9,2,2024,1,0,none,none
17,9,2,2024,1,14,Oubaha,Maths 17,9,2,2024,1,7,Oubaha,Maths
18,9,2,2024,1,15,Oubaha,Maths 18,9,2,2024,1,8,Oubaha,Maths
12,12,2,2024,1,15,Chevalier,Physique 12,12,2,2024,1,7,Chevalier,Physique
13,12,2,2024,1,14,Herbaut,Anglais 13,12,2,2024,1,9,Chevalier,Physique
14,13,2,2024,1,0,none,none 14,13,2,2024,1,11,Chevalier,Physique
14,13,2,2024,1,5,Mullaert,Maths 14,13,2,2024,1,4,Mullaert,Maths
14,13,2,2024,1,0,none,none 14,13,2,2024,1,6,Belaggoune,Anglais
17,13,2,2024,1,1,Chevalier,Physique 17,13,2,2024,1,15,Chevalier,Physique
17,13,2,2024,1,7,Chevalier,Physique 17,13,2,2024,1,0,none,none
18,13,2,2024,1,7,Rapin,Maths 18,13,2,2024,1,1,Rapin,Maths
13,14,2,2024,1,8,Carpintero,Maths 13,14,2,2024,1,7,Carpintero,Maths
14,14,2,2024,1,3,Bouverot,Maths 14,14,2,2024,1,2,Le_Gouriellec,Anglais
14,14,2,2024,1,0,none,none 14,14,2,2024,1,11,Carpintero,Maths
14,14,2,2024,1,1,Boully,Maths 14,14,2,2024,1,5,Bouverot,Maths
14,14,2,2024,1,12,Carpintero,Maths 14,14,2,2024,1,12,Boully,Maths
14,14,2,2024,2,15,Colleur_Dinfo,Info 14,14,2,2024,2,11,Colleur_Dinfo,Info
15,14,2,2024,1,4,Boully,Maths 14,14,2,2024,2,0,none,none
15,14,2,2024,1,9,Bouverot,Maths 14,14,2,2024,2,0,none,none
15,14,2,2024,1,0,none,none 15,14,2,2024,1,3,Bouverot,Maths
16,14,2,2024,1,0,none,none 15,14,2,2024,1,4,Herbaut,Anglais
16,14,2,2024,2,7,Colleur_Dinfo,Info 15,14,2,2024,1,3,Chevalier,Physique
16,14,2,2024,1,5,Chevalier,Physique
16,14,2,2024,2,5,Colleur_Dinfo,Info
16,14,2,2024,2,0,none,none
16,14,2,2024,2,0,none,none
17,14,2,2024,1,13,De_Roux,Physique
17,14,2,2024,1,0,none,none 17,14,2,2024,1,0,none,none
17,14,2,2024,1,0,none,none 18,14,2,2024,1,8,Le_Gouriellec,Anglais
18,14,2,2024,1,0,none,none 14,15,2,2024,1,10,Le_Gouriellec,Anglais
14,15,2,2024,1,0,none,none 15,15,2,2024,1,12,Le_Gouriellec,Anglais
15,15,2,2024,1,0,none,none 18,15,2,2024,1,8,Rapin,Maths
18,15,2,2024,1,11,Rapin,Maths 18,15,2,2024,1,14,Le_Gouriellec,Anglais
18,15,2,2024,1,0,none,none
16,16,2,2024,1,0,none,none 16,16,2,2024,1,0,none,none
17,16,2,2024,1,13,Oubaha,Maths 17,16,2,2024,1,9,Oubaha,Maths
18,16,2,2024,1,15,Oubaha,Maths 18,16,2,2024,1,1,Chevalier,Physique
12,19,2,2024,1,14,Chevalier,Physique 12,19,2,2024,1,3,Herbaut,Anglais
13,19,2,2024,1,15,Herbaut,Anglais 13,19,2,2024,1,6,Chevalier,Physique
14,20,2,2024,1,1,Mullaert,Maths 14,20,2,2024,1,8,Mullaert,Maths
14,20,2,2024,1,0,none,none 14,20,2,2024,1,10,Chevalier,Physique
14,20,2,2024,1,0,none,none 14,20,2,2024,1,12,Chevalier,Physique
17,20,2,2024,1,4,Colin,Physique 17,20,2,2024,1,14,Colin,Physique
17,20,2,2024,1,8,Chevalier,Physique 17,20,2,2024,1,0,none,none
18,20,2,2024,1,2,Rapin,Maths 18,20,2,2024,1,5,Rapin,Maths
13,21,2,2024,1,4,Carpintero,Maths 13,21,2,2024,1,9,Carpintero,Maths
14,21,2,2024,1,5,Boully,Maths 14,21,2,2024,1,10,Carpintero,Maths
14,21,2,2024,1,8,Bouverot,Maths 14,21,2,2024,1,12,Boully,Maths
14,21,2,2024,1,9,Carpintero,Maths 14,21,2,2024,1,13,Bouverot,Maths
14,21,2,2024,1,0,none,none 14,21,2,2024,1,15,Le_Gouriellec,Anglais
14,21,2,2024,2,6,Colleur_Dinfo,Info 14,21,2,2024,2,0,none,none
15,21,2,2024,1,6,Boully,Maths 14,21,2,2024,2,0,none,none
15,21,2,2024,1,10,Bouverot,Maths 14,21,2,2024,2,0,none,none
15,21,2,2024,1,0,none,none 15,21,2,2024,1,2,Boully,Maths
16,21,2,2024,1,0,none,none 15,21,2,2024,1,7,Herbaut,Anglais
16,21,2,2024,2,14,Colleur_Dinfo,Info 15,21,2,2024,1,4,Chevalier,Physique
16,21,2,2024,1,2,Chevalier,Physique
16,21,2,2024,2,4,Colleur_Dinfo,Info
16,21,2,2024,2,10,Colleur_Dinfo,Info
16,21,2,2024,2,0,none,none
17,21,2,2024,1,8,De_Roux,Physique
17,21,2,2024,1,0,none,none 17,21,2,2024,1,0,none,none
17,21,2,2024,1,0,none,none 18,21,2,2024,1,1,Le_Gouriellec,Anglais
18,21,2,2024,1,0,none,none 14,22,2,2024,1,5,Le_Gouriellec,Anglais
14,22,2,2024,1,0,none,none 15,22,2,2024,1,11,Le_Gouriellec,Anglais
15,22,2,2024,1,0,none,none 18,22,2,2024,1,1,Rapin,Maths
18,22,2,2024,1,12,Rapin,Maths 18,22,2,2024,1,13,Le_Gouriellec,Anglais
18,22,2,2024,1,0,none,none 16,23,2,2024,1,9,Le_Gouriellec,Anglais
16,23,2,2024,1,0,none,none 17,23,2,2024,1,4,Oubaha,Maths
17,23,2,2024,1,13,Oubaha,Maths 18,23,2,2024,1,6,Oubaha,Maths
18,23,2,2024,1,14,Oubaha,Maths 12,26,2,2024,1,13,Chevalier,Physique
12,26,2,2024,1,15,Chevalier,Physique 13,26,2,2024,1,9,Chevalier,Physique
13,26,2,2024,1,14,Herbaut,Anglais 14,27,2,2024,1,10,Mullaert,Maths
14,27,2,2024,1,14,Mullaert,Maths 14,27,2,2024,1,3,Chevalier,Physique
14,27,2,2024,1,0,none,none 14,27,2,2024,1,1,Chevalier,Physique
14,27,2,2024,1,0,none,none 17,27,2,2024,1,11,Chevalier,Physique
17,27,2,2024,1,13,Colin,Physique 17,27,2,2024,1,5,Colin,Physique
17,27,2,2024,1,0,none,none
18,27,2,2024,1,5,Rapin,Maths 18,27,2,2024,1,5,Rapin,Maths
13,28,2,2024,1,2,Carpintero,Maths 13,28,2,2024,1,11,Carpintero,Maths
14,28,2,2024,1,7,Bouverot,Maths 14,28,2,2024,1,13,Bouverot,Maths
14,28,2,2024,1,3,Boully,Maths 14,28,2,2024,1,14,Boully,Maths
14,28,2,2024,1,1,Carpintero,Maths 14,28,2,2024,1,6,Le_Gouriellec,Anglais
14,28,2,2024,1,0,none,none 14,28,2,2024,1,7,Carpintero,Maths
14,28,2,2024,2,5,Colleur_Dinfo,Info 14,28,2,2024,2,9,Colleur_Dinfo,Info
15,28,2,2024,1,6,Boully,Maths 14,28,2,2024,2,15,Colleur_Dinfo,Info
15,28,2,2024,1,9,Bouverot,Maths 14,28,2,2024,2,0,none,none
15,28,2,2024,1,0,none,none 15,28,2,2024,1,2,Boully,Maths
16,28,2,2024,1,0,none,none 15,28,2,2024,1,2,Herbaut,Anglais
16,28,2,2024,2,13,Colleur_Dinfo,Info 15,28,2,2024,1,1,Bouverot,Maths
16,28,2,2024,1,7,Chevalier,Physique
16,28,2,2024,2,0,none,none
16,28,2,2024,2,3,Colleur_Dinfo,Info
16,28,2,2024,2,0,none,none
17,28,2,2024,1,15,De_Roux,Physique
17,28,2,2024,1,0,none,none 17,28,2,2024,1,0,none,none
17,28,2,2024,1,0,none,none 18,28,2,2024,1,8,Le_Gouriellec,Anglais
18,28,2,2024,1,0,none,none 14,29,2,2024,1,12,Le_Gouriellec,Anglais
14,29,2,2024,1,0,none,none 15,29,2,2024,1,14,Le_Gouriellec,Anglais
15,29,2,2024,1,0,none,none 18,29,2,2024,1,4,Le_Gouriellec,Anglais
18,29,2,2024,1,10,Rapin,Maths 18,29,2,2024,1,6,Rapin,Maths
18,29,2,2024,1,0,none,none 16,1,3,2024,1,10,Le_Gouriellec,Anglais
16,1,3,2024,1,0,none,none 17,1,3,2024,1,3,Oubaha,Maths
17,1,3,2024,1,11,Oubaha,Maths 18,1,3,2024,1,9,Oubaha,Maths
18,1,3,2024,1,13,Oubaha,Maths 12,4,3,2024,1,2,Chevalier,Physique
12,4,3,2024,1,12,Chevalier,Physique 13,4,3,2024,1,5,Belaggoune,Anglais
13,4,3,2024,1,15,Herbaut,Anglais 14,5,3,2024,1,8,Mullaert,Maths
14,5,3,2024,1,0,none,none 14,5,3,2024,1,1,Belaggoune,Anglais
14,5,3,2024,1,0,none,none 14,5,3,2024,1,8,Chevalier,Physique
14,5,3,2024,1,3,Mullaert,Maths 17,5,3,2024,1,10,Colin,Physique
17,5,3,2024,1,2,Chevalier,Physique 17,5,3,2024,1,12,Chevalier,Physique
17,5,3,2024,1,14,Chevalier,Physique 18,5,3,2024,1,2,Rapin,Maths
18,5,3,2024,1,4,Rapin,Maths 13,6,3,2024,1,4,Carpintero,Maths
13,6,3,2024,1,6,Carpintero,Maths 14,6,3,2024,1,12,Boully,Maths
14,6,3,2024,1,8,Carpintero,Maths 14,6,3,2024,1,13,Le_Gouriellec,Anglais
14,6,3,2024,1,2,Bouverot,Maths 14,6,3,2024,1,14,Carpintero,Maths
14,6,3,2024,1,11,Boully,Maths 14,6,3,2024,1,11,Bouverot,Maths
14,6,3,2024,1,0,none,none 14,6,3,2024,2,2,Colleur_Dinfo,Info
14,6,3,2024,2,4,Colleur_Dinfo,Info 14,6,3,2024,2,8,Colleur_Dinfo,Info
15,6,3,2024,1,7,Boully,Maths 14,6,3,2024,2,14,Colleur_Dinfo,Info
15,6,3,2024,1,6,Boully,Maths
15,6,3,2024,1,10,Bouverot,Maths 15,6,3,2024,1,10,Bouverot,Maths
15,6,3,2024,1,0,none,none 15,6,3,2024,1,3,Belaggoune,Anglais
16,6,3,2024,1,0,none,none 16,6,3,2024,1,14,Chevalier,Physique
16,6,3,2024,2,12,Colleur_Dinfo,Info 16,6,3,2024,2,0,none,none
16,6,3,2024,2,0,none,none
16,6,3,2024,2,0,none,none
17,6,3,2024,1,6,De_Roux,Physique
17,6,3,2024,1,0,none,none 17,6,3,2024,1,0,none,none
17,6,3,2024,1,0,none,none 18,6,3,2024,1,11,Le_Gouriellec,Anglais
18,6,3,2024,1,0,none,none 14,7,3,2024,1,15,Le_Gouriellec,Anglais
14,7,3,2024,1,0,none,none
15,7,3,2024,1,0,none,none 15,7,3,2024,1,0,none,none
18,7,3,2024,1,12,Rapin,Maths 18,7,3,2024,1,3,Rapin,Maths
18,7,3,2024,1,0,none,none 18,7,3,2024,1,7,Le_Gouriellec,Anglais
16,8,3,2024,1,0,none,none 16,8,3,2024,1,9,Le_Gouriellec,Anglais
17,8,3,2024,1,14,Oubaha,Maths 17,8,3,2024,1,7,Oubaha,Maths
18,8,3,2024,1,15,Oubaha,Maths 18,8,3,2024,1,4,Chevalier,Physique
12,11,3,2024,1,13,Chevalier,Physique 12,11,3,2024,1,8,Herbaut,Anglais
13,11,3,2024,1,14,Herbaut,Anglais 13,11,3,2024,1,7,Chevalier,Physique
14,12,3,2024,1,5,Mullaert,Maths 14,12,3,2024,1,9,Mullaert,Maths
14,12,3,2024,1,0,none,none 14,12,3,2024,1,11,Chevalier,Physique
14,12,3,2024,1,0,none,none 14,12,3,2024,1,13,Colin,Physique
17,12,3,2024,1,15,Chevalier,Physique
17,12,3,2024,1,0,none,none 17,12,3,2024,1,0,none,none
18,12,3,2024,1,7,Rapin,Maths 17,12,3,2024,1,15,Colin,Physique
13,13,3,2024,1,8,Carpintero,Maths 18,12,3,2024,1,1,Rapin,Maths
14,13,3,2024,1,9,Carpintero,Maths 13,13,3,2024,1,11,Carpintero,Maths
14,13,3,2024,1,11,Boully,Maths 14,13,3,2024,1,6,Le_Gouriellec,Anglais
14,13,3,2024,1,1,Bouverot,Maths 14,13,3,2024,1,2,Le_Gouriellec,Anglais
14,13,3,2024,1,0,none,none 14,13,3,2024,1,4,Boully,Maths
14,13,3,2024,2,3,Colleur_Dinfo,Info 14,13,3,2024,1,12,Carpintero,Maths
15,13,3,2024,1,3,Bouverot,Maths 14,13,3,2024,2,1,Colleur_Dinfo,Info
15,13,3,2024,1,4,Boully,Maths 14,13,3,2024,2,7,Colleur_Dinfo,Info
15,13,3,2024,1,0,none,none 14,13,3,2024,2,13,Colleur_Dinfo,Info
16,13,3,2024,1,0,none,none 15,13,3,2024,1,1,Chevalier,Physique
16,13,3,2024,2,11,Colleur_Dinfo,Info 15,13,3,2024,1,8,Bouverot,Maths
15,13,3,2024,1,5,Chevalier,Physique
16,13,3,2024,1,9,Chevalier,Physique
16,13,3,2024,2,0,none,none
16,13,3,2024,2,0,none,none
16,13,3,2024,2,0,none,none
17,13,3,2024,1,3,De_Roux,Physique
17,13,3,2024,1,0,none,none 17,13,3,2024,1,0,none,none
17,13,3,2024,1,0,none,none 18,13,3,2024,1,4,Le_Gouriellec,Anglais
18,13,3,2024,1,0,none,none 14,14,3,2024,1,10,Le_Gouriellec,Anglais
14,14,3,2024,1,0,none,none 15,14,3,2024,1,12,Le_Gouriellec,Anglais
15,14,3,2024,1,0,none,none 18,14,3,2024,1,5,Rapin,Maths
18,14,3,2024,1,12,Rapin,Maths 18,14,3,2024,1,14,Le_Gouriellec,Anglais
18,14,3,2024,1,0,none,none
16,15,3,2024,1,0,none,none 16,15,3,2024,1,0,none,none
17,15,3,2024,1,13,Oubaha,Maths 17,15,3,2024,1,7,Oubaha,Maths
18,15,3,2024,1,15,Oubaha,Maths 18,15,3,2024,1,3,Oubaha,Maths

1 hour day month year length group colleur matiere
2 12 5 2 2024 1 14 3 Chevalier Herbaut Physique Anglais
3 13 5 2 2024 1 15 5 Herbaut Belaggoune Anglais
4 14 6 2 2024 1 3 6 Mullaert Chevalier Maths Physique
5 14 6 2 2024 1 0 10 none Chevalier none Physique
6 14 6 2 2024 1 0 2 none Mullaert none Maths
7 17 6 2 2024 1 2 12 Chevalier Colin Physique
8 17 6 2 2024 1 6 2 Colin Physique
9 18 6 2 2024 1 8 4 Rapin Maths
10 13 7 2 2024 1 4 6 Carpintero Maths
11 14 7 2 2024 1 7 1 Boully Le_Gouriellec Maths Anglais
12 14 7 2 2024 1 6 10 Bouverot Maths
13 14 7 2 2024 1 0 11 none Carpintero none Maths
14 14 7 2 2024 1 2 12 Carpintero Boully Maths
15 14 7 2 2024 2 8 12 Colleur_Dinfo Info
16 15 14 7 2 2024 1 2 10 0 Bouverot none Maths none
17 15 14 7 2 2024 1 2 11 6 Boully Colleur_Dinfo Maths Info
18 15 7 2 2024 1 0 8 none Chevalier none Physique
19 16 15 7 2 2024 1 0 13 none Herbaut none Anglais
20 15 7 2 2024 1 14 Boully Maths
21 16 7 2 2024 1 14 Chevalier Physique
22 16 7 2 2024 2 0 none none
23 16 7 2 2024 2 0 none none
24 16 7 2 2024 2 0 none none
25 17 7 2 2024 1 4 De_Roux Physique
26 17 7 2 2024 1 0 none none
27 17 18 7 2 2024 1 0 7 none Le_Gouriellec none Anglais
28 18 14 7 8 2 2024 1 0 9 none Le_Gouriellec none Anglais
29 14 15 8 2 2024 1 0 11 none Le_Gouriellec none Anglais
30 15 18 8 2 2024 1 0 3 none Rapin none Maths
31 18 8 2 2024 1 12 15 Rapin Le_Gouriellec Maths Anglais
18 8 2 2024 1 0 none none
32 16 9 2 2024 1 0 none none
33 17 9 2 2024 1 14 7 Oubaha Maths
34 18 9 2 2024 1 15 8 Oubaha Maths
35 12 12 2 2024 1 15 7 Chevalier Physique
36 13 12 2 2024 1 14 9 Herbaut Chevalier Anglais Physique
37 14 13 2 2024 1 0 11 none Chevalier none Physique
38 14 13 2 2024 1 5 4 Mullaert Maths
39 14 13 2 2024 1 0 6 none Belaggoune none Anglais
40 17 13 2 2024 1 1 15 Chevalier Physique
41 17 13 2 2024 1 7 0 Chevalier none Physique none
42 18 13 2 2024 1 7 1 Rapin Maths
43 13 14 2 2024 1 8 7 Carpintero Maths
44 14 14 2 2024 1 3 2 Bouverot Le_Gouriellec Maths Anglais
45 14 14 2 2024 1 0 11 none Carpintero none Maths
46 14 14 2 2024 1 1 5 Boully Bouverot Maths
47 14 14 2 2024 1 12 Carpintero Boully Maths
48 14 14 2 2024 2 15 11 Colleur_Dinfo Info
49 15 14 14 2 2024 1 2 4 0 Boully none Maths none
50 15 14 14 2 2024 1 2 9 0 Bouverot none Maths none
51 15 14 2 2024 1 0 3 none Bouverot none Maths
52 16 15 14 2 2024 1 0 4 none Herbaut none Anglais
53 16 15 14 2 2024 2 1 7 3 Colleur_Dinfo Chevalier Info Physique
54 16 14 2 2024 1 5 Chevalier Physique
55 16 14 2 2024 2 5 Colleur_Dinfo Info
56 16 14 2 2024 2 0 none none
57 16 14 2 2024 2 0 none none
58 17 14 2 2024 1 13 De_Roux Physique
59 17 14 2 2024 1 0 none none
60 17 18 14 2 2024 1 0 8 none Le_Gouriellec none Anglais
61 18 14 14 15 2 2024 1 0 10 none Le_Gouriellec none Anglais
62 14 15 15 2 2024 1 0 12 none Le_Gouriellec none Anglais
63 15 18 15 2 2024 1 0 8 none Rapin none Maths
64 18 15 2 2024 1 11 14 Rapin Le_Gouriellec Maths Anglais
18 15 2 2024 1 0 none none
65 16 16 2 2024 1 0 none none
66 17 16 2 2024 1 13 9 Oubaha Maths
67 18 16 2 2024 1 15 1 Oubaha Chevalier Maths Physique
68 12 19 2 2024 1 14 3 Chevalier Herbaut Physique Anglais
69 13 19 2 2024 1 15 6 Herbaut Chevalier Anglais Physique
70 14 20 2 2024 1 1 8 Mullaert Maths
71 14 20 2 2024 1 0 10 none Chevalier none Physique
72 14 20 2 2024 1 0 12 none Chevalier none Physique
73 17 20 2 2024 1 4 14 Colin Physique
74 17 20 2 2024 1 8 0 Chevalier none Physique none
75 18 20 2 2024 1 2 5 Rapin Maths
76 13 21 2 2024 1 4 9 Carpintero Maths
77 14 21 2 2024 1 5 10 Boully Carpintero Maths
78 14 21 2 2024 1 8 12 Bouverot Boully Maths
79 14 21 2 2024 1 9 13 Carpintero Bouverot Maths
80 14 21 2 2024 1 0 15 none Le_Gouriellec none Anglais
81 14 21 2 2024 2 6 0 Colleur_Dinfo none Info none
82 15 14 21 2 2024 1 2 6 0 Boully none Maths none
83 15 14 21 2 2024 1 2 10 0 Bouverot none Maths none
84 15 21 2 2024 1 0 2 none Boully none Maths
85 16 15 21 2 2024 1 0 7 none Herbaut none Anglais
86 16 15 21 2 2024 2 1 14 4 Colleur_Dinfo Chevalier Info Physique
87 16 21 2 2024 1 2 Chevalier Physique
88 16 21 2 2024 2 4 Colleur_Dinfo Info
89 16 21 2 2024 2 10 Colleur_Dinfo Info
90 16 21 2 2024 2 0 none none
91 17 21 2 2024 1 8 De_Roux Physique
92 17 21 2 2024 1 0 none none
93 17 18 21 2 2024 1 0 1 none Le_Gouriellec none Anglais
94 18 14 21 22 2 2024 1 0 5 none Le_Gouriellec none Anglais
95 14 15 22 2 2024 1 0 11 none Le_Gouriellec none Anglais
96 15 18 22 2 2024 1 0 1 none Rapin none Maths
97 18 22 2 2024 1 12 13 Rapin Le_Gouriellec Maths Anglais
98 18 16 22 23 2 2024 1 0 9 none Le_Gouriellec none Anglais
99 16 17 23 2 2024 1 0 4 none Oubaha none Maths
100 17 18 23 2 2024 1 13 6 Oubaha Maths
101 18 12 23 26 2 2024 1 14 13 Oubaha Chevalier Maths Physique
102 12 13 26 2 2024 1 15 9 Chevalier Physique
103 13 14 26 27 2 2024 1 14 10 Herbaut Mullaert Anglais Maths
104 14 27 2 2024 1 14 3 Mullaert Chevalier Maths Physique
105 14 27 2 2024 1 0 1 none Chevalier none Physique
106 14 17 27 2 2024 1 0 11 none Chevalier none Physique
107 17 27 2 2024 1 13 5 Colin Physique
17 27 2 2024 1 0 none none
108 18 27 2 2024 1 5 Rapin Maths
109 13 28 2 2024 1 2 11 Carpintero Maths
110 14 28 2 2024 1 7 13 Bouverot Maths
111 14 28 2 2024 1 3 14 Boully Maths
112 14 28 2 2024 1 1 6 Carpintero Le_Gouriellec Maths Anglais
113 14 28 2 2024 1 0 7 none Carpintero none Maths
114 14 28 2 2024 2 5 9 Colleur_Dinfo Info
115 15 14 28 2 2024 1 2 6 15 Boully Colleur_Dinfo Maths Info
116 15 14 28 2 2024 1 2 9 0 Bouverot none Maths none
117 15 28 2 2024 1 0 2 none Boully none Maths
118 16 15 28 2 2024 1 0 2 none Herbaut none Anglais
119 16 15 28 2 2024 2 1 13 1 Colleur_Dinfo Bouverot Info Maths
120 16 28 2 2024 1 7 Chevalier Physique
121 16 28 2 2024 2 0 none none
122 16 28 2 2024 2 3 Colleur_Dinfo Info
123 16 28 2 2024 2 0 none none
124 17 28 2 2024 1 15 De_Roux Physique
125 17 28 2 2024 1 0 none none
126 17 18 28 2 2024 1 0 8 none Le_Gouriellec none Anglais
127 18 14 28 29 2 2024 1 0 12 none Le_Gouriellec none Anglais
128 14 15 29 2 2024 1 0 14 none Le_Gouriellec none Anglais
129 15 18 29 2 2024 1 0 4 none Le_Gouriellec none Anglais
130 18 29 2 2024 1 10 6 Rapin Maths
131 18 16 29 1 2 3 2024 1 0 10 none Le_Gouriellec none Anglais
132 16 17 1 3 2024 1 0 3 none Oubaha none Maths
133 17 18 1 3 2024 1 11 9 Oubaha Maths
134 18 12 1 4 3 2024 1 13 2 Oubaha Chevalier Maths Physique
135 12 13 4 3 2024 1 12 5 Chevalier Belaggoune Physique Anglais
136 13 14 4 5 3 2024 1 15 8 Herbaut Mullaert Anglais Maths
137 14 5 3 2024 1 0 1 none Belaggoune none Anglais
138 14 5 3 2024 1 0 8 none Chevalier none Physique
139 14 17 5 3 2024 1 3 10 Mullaert Colin Maths Physique
140 17 5 3 2024 1 2 12 Chevalier Physique
141 17 18 5 3 2024 1 14 2 Chevalier Rapin Physique Maths
142 18 13 5 6 3 2024 1 4 Rapin Carpintero Maths
143 13 14 6 3 2024 1 6 12 Carpintero Boully Maths
144 14 6 3 2024 1 8 13 Carpintero Le_Gouriellec Maths Anglais
145 14 6 3 2024 1 2 14 Bouverot Carpintero Maths
146 14 6 3 2024 1 11 Boully Bouverot Maths
147 14 6 3 2024 1 2 0 2 none Colleur_Dinfo none Info
148 14 6 3 2024 2 4 8 Colleur_Dinfo Info
149 15 14 6 3 2024 1 2 7 14 Boully Colleur_Dinfo Maths Info
150 15 6 3 2024 1 6 Boully Maths
151 15 6 3 2024 1 10 Bouverot Maths
152 15 6 3 2024 1 0 3 none Belaggoune none Anglais
153 16 6 3 2024 1 0 14 none Chevalier none Physique
154 16 6 3 2024 2 12 0 Colleur_Dinfo none Info none
155 16 6 3 2024 2 0 none none
156 16 6 3 2024 2 0 none none
157 17 6 3 2024 1 6 De_Roux Physique
158 17 6 3 2024 1 0 none none
159 17 18 6 3 2024 1 0 11 none Le_Gouriellec none Anglais
160 18 14 6 7 3 2024 1 0 15 none Le_Gouriellec none Anglais
14 7 3 2024 1 0 none none
161 15 7 3 2024 1 0 none none
162 18 7 3 2024 1 12 3 Rapin Maths
163 18 7 3 2024 1 0 7 none Le_Gouriellec none Anglais
164 16 8 3 2024 1 0 9 none Le_Gouriellec none Anglais
165 17 8 3 2024 1 14 7 Oubaha Maths
166 18 8 3 2024 1 15 4 Oubaha Chevalier Maths Physique
167 12 11 3 2024 1 13 8 Chevalier Herbaut Physique Anglais
168 13 11 3 2024 1 14 7 Herbaut Chevalier Anglais Physique
169 14 12 3 2024 1 5 9 Mullaert Maths
170 14 12 3 2024 1 0 11 none Chevalier none Physique
171 14 12 3 2024 1 0 13 none Colin none Physique
17 12 3 2024 1 15 Chevalier Physique
172 17 12 3 2024 1 0 none none
173 18 17 12 3 2024 1 7 15 Rapin Colin Maths Physique
174 13 18 13 12 3 2024 1 8 1 Carpintero Rapin Maths
175 14 13 13 3 2024 1 9 11 Carpintero Maths
176 14 13 3 2024 1 11 6 Boully Le_Gouriellec Maths Anglais
177 14 13 3 2024 1 1 2 Bouverot Le_Gouriellec Maths Anglais
178 14 13 3 2024 1 0 4 none Boully none Maths
179 14 13 3 2024 2 1 3 12 Colleur_Dinfo Carpintero Info Maths
180 15 14 13 3 2024 1 2 3 1 Bouverot Colleur_Dinfo Maths Info
181 15 14 13 3 2024 1 2 4 7 Boully Colleur_Dinfo Maths Info
182 15 14 13 3 2024 1 2 0 13 none Colleur_Dinfo none Info
183 16 15 13 3 2024 1 0 1 none Chevalier none Physique
184 16 15 13 3 2024 2 1 11 8 Colleur_Dinfo Bouverot Info Maths
185 15 13 3 2024 1 5 Chevalier Physique
186 16 13 3 2024 1 9 Chevalier Physique
187 16 13 3 2024 2 0 none none
188 16 13 3 2024 2 0 none none
189 16 13 3 2024 2 0 none none
190 17 13 3 2024 1 3 De_Roux Physique
191 17 13 3 2024 1 0 none none
192 17 18 13 3 2024 1 0 4 none Le_Gouriellec none Anglais
193 18 14 13 14 3 2024 1 0 10 none Le_Gouriellec none Anglais
194 14 15 14 3 2024 1 0 12 none Le_Gouriellec none Anglais
195 15 18 14 3 2024 1 0 5 none Rapin none Maths
196 18 14 3 2024 1 12 14 Rapin Le_Gouriellec Maths Anglais
18 14 3 2024 1 0 none none
197 16 15 3 2024 1 0 none none
198 17 15 3 2024 1 13 7 Oubaha Maths
199 18 15 3 2024 1 15 3 Oubaha Maths

View File

@ -350,7 +350,7 @@ creneau* import_creneaux_oneweek(char* filename, int len_file, int n_weeks) {
} }
/*for(int k = 0; k < len_file*n_weeks; k++) { /*for(int k = 0; k < len_file*n_weeks; k++) {
printf("%d %d %d %d\n", edt[k].date.hour, edt[k].date.day, edt[k].date.month, edt[k].date.year); printf("%d %d %d %d %d %d\n", edt[k].date.hour, edt[k].date.day, edt[k].date.month, edt[k].date.year, edt[k].group, (int)(edt[k].mat));
}*/ }*/
if(!is_sorted(edt, n_weeks*len_file)) { if(!is_sorted(edt, n_weeks*len_file)) {