Compare commits

..

No commits in common. "a0fd63a4ed6e9497d9f5b09e6810cfc0558d3c90" and "4bb708822aefb91db6638785fad25a5e006b67e7" have entirely different histories.

2 changed files with 3 additions and 30 deletions

1
.gitignore vendored
View File

@ -56,4 +56,3 @@ obj/
bin/
output.csv
*.log
output-S3.csv

View File

@ -1238,7 +1238,7 @@ int** occurencies(creneau* edt, int len_edt, colleur* dudes, int n_groups, int n
printf("\n"); // caused a minor panic */
bool halt = false;
for(int it = 0; it < 5*(1-is_debug); it++) {
for(int it = 0; it < 3*(1-is_debug); it++) {
for(int grp = 0; grp < n_groups; grp++) {
for(int dud = 0; dud < n_colleurs; dud++) {
if(res[grp][dud] > max_occ && get_mat_from_id(dudes, n_colleurs, dud) != INFO) {
@ -1266,36 +1266,11 @@ int** occurencies(creneau* edt, int len_edt, colleur* dudes, int n_groups, int n
edt[id_src].group += edt[id_dest].group;
edt[id_dest].group = edt[id_src].group - edt[id_dest].group;
edt[id_src].group -= edt[id_dest].group;
if(is_overlap_creneau(edt, len_edt, id_src, grp2+1)) {
res[grp][dud] -= 1;
res[grp2][dud2] -= 1;
res[grp2][dud] += 1;
res[grp][dud2] += 1;
//printf("%d %d | ", edt[id_src].group, edt[id_dest].group);
edt[id_src].group += edt[id_dest].group;
edt[id_dest].group = edt[id_src].group - edt[id_dest].group;
edt[id_src].group -= edt[id_dest].group;
} else if(is_overlap_creneau(edt, len_edt, id_dest, grp+1)) {
res[grp][dud] -= 1;
res[grp2][dud2] -= 1;
res[grp2][dud] += 1;
res[grp][dud2] += 1;
//printf("%d %d | ", edt[id_src].group, edt[id_dest].group);
edt[id_src].group += edt[id_dest].group;
edt[id_dest].group = edt[id_src].group - edt[id_dest].group;
edt[id_src].group -= edt[id_dest].group;
} else {
halt = true;
dud--;
}
//printf("%d %d\n", edt[id_src].group, edt[id_dest].group);
//printf("[%d %d - %d] <==> [%d %d - %d]\n", grp+1, id_src, edt[id_src].group, grp2+1, id_dest, edt[id_dest].group);
halt = true;
dud--;
}
}
}
@ -1373,7 +1348,6 @@ void aux_2(creneau* edt, int len_edt, colleur* chads, int len_chads, int n_group
//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);
add_colles_for_group_MP2I(weeks_len, edt, len_edt, chads, len_chads, n_weeks, i+1, (topic)(2+i%2), i%3, i%info_app, &skipped, math_halt, info_app);
}
//int** temp_data = generate_matrix(n_groups, len_chads, 0);
int** temp_data = occurencies(edt, len_edt, chads, n_groups, len_chads, n_weeks, false);
for(int i = 0; i < n_groups; i++) {
//printf("Score for group %d : %d\n", i+1, score(edt, len_edt, i+1));