added temporary fix to rotations + tweaked score to be more punishing towards farther-than-averages values
This commit is contained in:
parent
a261c7bb3e
commit
c5c083788a
14
Makefile
14
Makefile
|
@ -6,16 +6,22 @@ LFLAGS=
|
||||||
all: bin/colloscope
|
all: bin/colloscope
|
||||||
|
|
||||||
test: bin/colloscope
|
test: bin/colloscope
|
||||||
bin/colloscope -v S3-creneaux.txt 31 S3-colleurs.txt 16 7 15 3000 output-S3.csv 3 6
|
bin/colloscope -v S3-creneaux.txt 31 S3-colleurs.txt 16 7 15 3000 output-S3.csv 4 6
|
||||||
|
|
||||||
|
mpi-ALL: bin/colloscope
|
||||||
|
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 21 14 10000 output-MPI.csv 4 999999
|
||||||
|
|
||||||
|
mpi-all: bin/colloscope
|
||||||
|
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 21 14 1000 output-MPI.csv 4 999999
|
||||||
|
|
||||||
mpi-20: bin/colloscope
|
mpi-20: bin/colloscope
|
||||||
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 20 14 2500 output-MPI.csv 3 999999
|
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 20 14 2500 output-MPI.csv 4 999999
|
||||||
|
|
||||||
mpi-12: bin/colloscope
|
mpi-12: bin/colloscope
|
||||||
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 12 14 7000 output-MPI.csv 3 999999
|
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 12 14 7000 output-MPI.csv 4 999999
|
||||||
|
|
||||||
mpi-8: bin/colloscope
|
mpi-8: bin/colloscope
|
||||||
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 8 14 10000 output-MPI.csv 3 999999
|
bin/colloscope -v MPI-creneaux.txt 26 MPI-colleurs.txt 15 8 14 10000 output-MPI.csv 4 999999
|
||||||
|
|
||||||
mem: bin/
|
mem: bin/
|
||||||
valgrind --leak-check=full ./bin/colloscope -v S3-creneaux.txt 21 S3-colleurs.txt 16 7 15 100 output-S3.csv 3 6
|
valgrind --leak-check=full ./bin/colloscope -v S3-creneaux.txt 21 S3-colleurs.txt 16 7 15 100 output-S3.csv 3 6
|
||||||
|
|
|
@ -0,0 +1,567 @@
|
||||||
|
hour,day,month,year,length,group,colleur,matiere
|
||||||
|
18,16,9,2024,1,2,Bouverot,Maths
|
||||||
|
17,17,9,2024,1,8,Dailly,Maths
|
||||||
|
17,17,9,2024,1,12,Pelletier,Maths
|
||||||
|
17,17,9,2024,1,3,Riveline,Maths
|
||||||
|
17,17,9,2024,1,4,Chevalier,Physique
|
||||||
|
18,17,9,2024,1,11,Dailly,Maths
|
||||||
|
18,17,9,2024,1,10,Pelletier,Maths
|
||||||
|
18,17,9,2024,1,4,Riveline,Maths
|
||||||
|
8,18,9,2024,1,0,none,none
|
||||||
|
14,18,9,2024,1,14,Sabban,Maths
|
||||||
|
16,18,9,2024,1,5,Montarou,Anglais
|
||||||
|
16,18,9,2024,1,1,Graff,Anglais
|
||||||
|
17,18,9,2024,1,12,Robin,Physique
|
||||||
|
17,18,9,2024,1,6,Giral-Martinez,Maths
|
||||||
|
17,18,9,2024,1,10,Pignard,Physique
|
||||||
|
17,18,9,2024,1,3,Graff,Anglais
|
||||||
|
17,18,9,2024,1,7,Montarou,Anglais
|
||||||
|
18,18,9,2024,1,11,Montarou,Anglais
|
||||||
|
18,18,9,2024,1,13,LeLouarne,Anglais
|
||||||
|
18,18,9,2024,1,6,Pignard,Physique
|
||||||
|
18,18,9,2024,1,9,Graff,Anglais
|
||||||
|
18,18,9,2024,1,7,Giral-Martinez,Maths
|
||||||
|
14,19,9,2024,1,8,Creuset,Physique
|
||||||
|
14,19,9,2024,2,0,none,none
|
||||||
|
15,19,9,2024,1,2,Creuset,Physique
|
||||||
|
16,20,9,2024,1,14,Thiébaud,Physique
|
||||||
|
18,23,9,2024,1,12,Bouverot,Maths
|
||||||
|
|
||||||
|
17,24,9,2024,1,11,Chevalier,Physique
|
||||||
|
17,24,9,2024,1,9,Dailly,Maths
|
||||||
|
17,24,9,2024,1,3,Riveline,Maths
|
||||||
|
17,24,9,2024,1,11,Pelletier,Maths
|
||||||
|
18,24,9,2024,1,13,Dailly,Maths
|
||||||
|
18,24,9,2024,1,8,Pelletier,Maths
|
||||||
|
18,24,9,2024,1,7,Riveline,Maths
|
||||||
|
8,25,9,2024,1,4,Bouverot,Maths
|
||||||
|
14,25,9,2024,1,14,Sabban,Maths
|
||||||
|
16,25,9,2024,1,4,Montarou,Anglais
|
||||||
|
16,25,9,2024,1,2,Graff,Anglais
|
||||||
|
17,25,9,2024,1,8,Montarou,Anglais
|
||||||
|
17,25,9,2024,1,13,Robin,Physique
|
||||||
|
17,25,9,2024,1,6,Graff,Anglais
|
||||||
|
17,25,9,2024,1,1,Giral-Martinez,Maths
|
||||||
|
17,25,9,2024,1,9,Pignard,Physique
|
||||||
|
18,25,9,2024,1,5,Giral-Martinez,Maths
|
||||||
|
18,25,9,2024,1,1,Pignard,Physique
|
||||||
|
18,25,9,2024,1,14,LeLouarne,Anglais
|
||||||
|
18,25,9,2024,1,12,Montarou,Anglais
|
||||||
|
18,25,9,2024,1,10,Graff,Anglais
|
||||||
|
14,26,9,2024,1,7,Creuset,Physique
|
||||||
|
14,26,9,2024,2,0,none,none
|
||||||
|
15,26,9,2024,1,3,Creuset,Physique
|
||||||
|
16,27,9,2024,1,5,Thiébaud,Physique
|
||||||
|
18,30,9,2024,1,4,Bouverot,Maths
|
||||||
|
|
||||||
|
17,1,10,2024,1,6,Riveline,Maths
|
||||||
|
17,1,10,2024,1,1,Pelletier,Maths
|
||||||
|
17,1,10,2024,1,10,Chevalier,Physique
|
||||||
|
17,1,10,2024,1,5,Dailly,Maths
|
||||||
|
18,1,10,2024,1,13,Riveline,Maths
|
||||||
|
18,1,10,2024,1,2,Pelletier,Maths
|
||||||
|
18,1,10,2024,1,8,Dailly,Maths
|
||||||
|
8,2,10,2024,1,0,none,none
|
||||||
|
14,2,10,2024,1,12,Sabban,Maths
|
||||||
|
16,2,10,2024,1,9,Graff,Anglais
|
||||||
|
16,2,10,2024,1,1,Montarou,Anglais
|
||||||
|
17,2,10,2024,1,11,Graff,Anglais
|
||||||
|
17,2,10,2024,1,6,Robin,Physique
|
||||||
|
17,2,10,2024,1,5,Montarou,Anglais
|
||||||
|
17,2,10,2024,1,10,Giral-Martinez,Maths
|
||||||
|
17,2,10,2024,1,12,Pignard,Physique
|
||||||
|
18,2,10,2024,1,9,Giral-Martinez,Maths
|
||||||
|
18,2,10,2024,1,13,LeLouarne,Anglais
|
||||||
|
18,2,10,2024,1,7,Graff,Anglais
|
||||||
|
18,2,10,2024,1,3,Montarou,Anglais
|
||||||
|
18,2,10,2024,1,2,Pignard,Physique
|
||||||
|
14,3,10,2024,1,14,Creuset,Physique
|
||||||
|
14,3,10,2024,2,0,none,none
|
||||||
|
15,3,10,2024,1,4,Creuset,Physique
|
||||||
|
16,4,10,2024,1,8,Thiébaud,Physique
|
||||||
|
18,7,10,2024,1,5,Bouverot,Maths
|
||||||
|
|
||||||
|
17,8,10,2024,1,9,Dailly,Maths
|
||||||
|
17,8,10,2024,1,6,Pelletier,Maths
|
||||||
|
17,8,10,2024,1,14,Riveline,Maths
|
||||||
|
17,8,10,2024,1,13,Chevalier,Physique
|
||||||
|
18,8,10,2024,1,7,Riveline,Maths
|
||||||
|
18,8,10,2024,1,10,Dailly,Maths
|
||||||
|
18,8,10,2024,1,2,Pelletier,Maths
|
||||||
|
8,9,10,2024,1,11,Bouverot,Maths
|
||||||
|
14,9,10,2024,1,13,Sabban,Maths
|
||||||
|
16,9,10,2024,1,6,Graff,Anglais
|
||||||
|
16,9,10,2024,1,8,Montarou,Anglais
|
||||||
|
17,9,10,2024,1,9,Robin,Physique
|
||||||
|
17,9,10,2024,1,10,Graff,Anglais
|
||||||
|
17,9,10,2024,1,1,Pignard,Physique
|
||||||
|
17,9,10,2024,1,12,Montarou,Anglais
|
||||||
|
17,9,10,2024,1,1,Giral-Martinez,Maths
|
||||||
|
18,9,10,2024,1,5,Pignard,Physique
|
||||||
|
18,9,10,2024,1,3,Giral-Martinez,Maths
|
||||||
|
18,9,10,2024,1,4,Montarou,Anglais
|
||||||
|
18,9,10,2024,1,14,LeLouarne,Anglais
|
||||||
|
18,9,10,2024,1,2,Graff,Anglais
|
||||||
|
14,10,10,2024,1,3,Creuset,Physique
|
||||||
|
14,10,10,2024,2,0,none,none
|
||||||
|
15,10,10,2024,1,7,Creuset,Physique
|
||||||
|
16,11,10,2024,1,11,Thiébaud,Physique
|
||||||
|
18,14,10,2024,1,4,Bouverot,Maths
|
||||||
|
|
||||||
|
17,15,10,2024,1,8,Riveline,Maths
|
||||||
|
17,15,10,2024,1,14,Dailly,Maths
|
||||||
|
17,15,10,2024,1,3,Pelletier,Maths
|
||||||
|
17,15,10,2024,1,14,Chevalier,Physique
|
||||||
|
18,15,10,2024,1,11,Dailly,Maths
|
||||||
|
18,15,10,2024,1,2,Pelletier,Maths
|
||||||
|
18,15,10,2024,1,12,Riveline,Maths
|
||||||
|
8,16,10,2024,1,0,none,none
|
||||||
|
14,16,10,2024,1,6,Sabban,Maths
|
||||||
|
16,16,10,2024,1,11,Graff,Anglais
|
||||||
|
16,16,10,2024,1,1,Montarou,Anglais
|
||||||
|
17,16,10,2024,1,7,Graff,Anglais
|
||||||
|
17,16,10,2024,1,10,Giral-Martinez,Maths
|
||||||
|
17,16,10,2024,1,5,Montarou,Anglais
|
||||||
|
17,16,10,2024,1,6,Pignard,Physique
|
||||||
|
17,16,10,2024,1,8,Robin,Physique
|
||||||
|
18,16,10,2024,1,13,LeLouarne,Anglais
|
||||||
|
18,16,10,2024,1,12,Pignard,Physique
|
||||||
|
18,16,10,2024,1,7,Giral-Martinez,Maths
|
||||||
|
18,16,10,2024,1,9,Graff,Anglais
|
||||||
|
18,16,10,2024,1,3,Montarou,Anglais
|
||||||
|
14,17,10,2024,1,10,Creuset,Physique
|
||||||
|
14,17,10,2024,2,0,none,none
|
||||||
|
15,17,10,2024,1,2,Creuset,Physique
|
||||||
|
16,18,10,2024,1,4,Thiébaud,Physique
|
||||||
|
18,21,10,2024,1,12,Bouverot,Maths
|
||||||
|
|
||||||
|
17,22,10,2024,1,14,Dailly,Maths
|
||||||
|
17,22,10,2024,1,3,Riveline,Maths
|
||||||
|
17,22,10,2024,1,8,Pelletier,Maths
|
||||||
|
17,22,10,2024,1,13,Chevalier,Physique
|
||||||
|
18,22,10,2024,1,7,Dailly,Maths
|
||||||
|
18,22,10,2024,1,11,Riveline,Maths
|
||||||
|
18,22,10,2024,1,1,Pelletier,Maths
|
||||||
|
8,23,10,2024,1,4,Bouverot,Maths
|
||||||
|
14,23,10,2024,1,13,Sabban,Maths
|
||||||
|
16,23,10,2024,1,10,Montarou,Anglais
|
||||||
|
16,23,10,2024,1,4,Graff,Anglais
|
||||||
|
17,23,10,2024,1,6,Graff,Anglais
|
||||||
|
17,23,10,2024,1,9,Giral-Martinez,Maths
|
||||||
|
17,23,10,2024,1,1,Pignard,Physique
|
||||||
|
17,23,10,2024,1,5,Robin,Physique
|
||||||
|
17,23,10,2024,1,2,Montarou,Anglais
|
||||||
|
18,23,10,2024,1,8,Graff,Anglais
|
||||||
|
18,23,10,2024,1,9,Pignard,Physique
|
||||||
|
18,23,10,2024,1,5,Giral-Martinez,Maths
|
||||||
|
18,23,10,2024,1,12,Montarou,Anglais
|
||||||
|
18,23,10,2024,1,14,LeLouarne,Anglais
|
||||||
|
14,24,10,2024,1,7,Creuset,Physique
|
||||||
|
14,24,10,2024,2,0,none,none
|
||||||
|
15,24,10,2024,1,3,Creuset,Physique
|
||||||
|
16,25,10,2024,1,11,Thiébaud,Physique
|
||||||
|
18,28,10,2024,1,8,Bouverot,Maths
|
||||||
|
|
||||||
|
17,29,10,2024,1,6,Riveline,Maths
|
||||||
|
17,29,10,2024,1,10,Dailly,Maths
|
||||||
|
17,29,10,2024,1,1,Pelletier,Maths
|
||||||
|
17,29,10,2024,1,2,Chevalier,Physique
|
||||||
|
18,29,10,2024,1,5,Riveline,Maths
|
||||||
|
18,29,10,2024,1,4,Dailly,Maths
|
||||||
|
18,29,10,2024,1,0,none,none
|
||||||
|
8,30,10,2024,1,2,Bouverot,Maths
|
||||||
|
14,30,10,2024,1,9,Sabban,Maths
|
||||||
|
16,30,10,2024,1,9,Montarou,Anglais
|
||||||
|
16,30,10,2024,1,5,Graff,Anglais
|
||||||
|
17,30,10,2024,1,12,Giral-Martinez,Maths
|
||||||
|
17,30,10,2024,1,7,Montarou,Anglais
|
||||||
|
17,30,10,2024,1,12,Pignard,Physique
|
||||||
|
17,30,10,2024,1,3,Graff,Anglais
|
||||||
|
17,30,10,2024,1,14,Robin,Physique
|
||||||
|
18,30,10,2024,1,11,LeLouarne,Anglais
|
||||||
|
18,30,10,2024,1,13,Graff,Anglais
|
||||||
|
18,30,10,2024,1,13,Giral-Martinez,Maths
|
||||||
|
18,30,10,2024,1,10,Pignard,Physique
|
||||||
|
18,30,10,2024,1,1,Montarou,Anglais
|
||||||
|
14,31,10,2024,1,4,Creuset,Physique
|
||||||
|
14,31,10,2024,2,0,none,none
|
||||||
|
15,31,10,2024,1,6,Creuset,Physique
|
||||||
|
16,1,11,2024,1,8,Thiébaud,Physique
|
||||||
|
18,4,11,2024,1,3,Bouverot,Maths
|
||||||
|
|
||||||
|
17,5,11,2024,1,5,Dailly,Maths
|
||||||
|
17,5,11,2024,1,13,Pelletier,Maths
|
||||||
|
17,5,11,2024,1,14,Riveline,Maths
|
||||||
|
17,5,11,2024,1,1,Chevalier,Physique
|
||||||
|
18,5,11,2024,1,6,Pelletier,Maths
|
||||||
|
18,5,11,2024,1,2,Dailly,Maths
|
||||||
|
18,5,11,2024,1,11,Riveline,Maths
|
||||||
|
8,6,11,2024,1,1,Bouverot,Maths
|
||||||
|
14,6,11,2024,1,7,Sabban,Maths
|
||||||
|
16,6,11,2024,1,6,Montarou,Anglais
|
||||||
|
16,6,11,2024,1,14,Graff,Anglais
|
||||||
|
17,6,11,2024,1,5,Pignard,Physique
|
||||||
|
17,6,11,2024,1,9,Giral-Martinez,Maths
|
||||||
|
17,6,11,2024,1,13,Robin,Physique
|
||||||
|
17,6,11,2024,1,2,Montarou,Anglais
|
||||||
|
17,6,11,2024,1,8,Graff,Anglais
|
||||||
|
18,6,11,2024,1,7,Pignard,Physique
|
||||||
|
18,6,11,2024,1,4,Graff,Anglais
|
||||||
|
18,6,11,2024,1,10,Giral-Martinez,Maths
|
||||||
|
18,6,11,2024,1,12,LeLouarne,Anglais
|
||||||
|
18,6,11,2024,1,10,Montarou,Anglais
|
||||||
|
14,7,11,2024,1,3,Creuset,Physique
|
||||||
|
14,7,11,2024,2,0,none,none
|
||||||
|
15,7,11,2024,1,9,Creuset,Physique
|
||||||
|
16,8,11,2024,1,11,Thiébaud,Physique
|
||||||
|
18,11,11,2024,1,3,Bouverot,Maths
|
||||||
|
|
||||||
|
17,12,11,2024,1,14,Dailly,Maths
|
||||||
|
17,12,11,2024,1,7,Riveline,Maths
|
||||||
|
17,12,11,2024,1,8,Pelletier,Maths
|
||||||
|
17,12,11,2024,1,8,Chevalier,Physique
|
||||||
|
18,12,11,2024,1,11,Pelletier,Maths
|
||||||
|
18,12,11,2024,1,4,Dailly,Maths
|
||||||
|
18,12,11,2024,1,2,Riveline,Maths
|
||||||
|
8,13,11,2024,1,0,none,none
|
||||||
|
14,13,11,2024,1,10,Sabban,Maths
|
||||||
|
16,13,11,2024,1,9,Graff,Anglais
|
||||||
|
16,13,11,2024,1,13,Montarou,Anglais
|
||||||
|
17,13,11,2024,1,6,Pignard,Physique
|
||||||
|
17,13,11,2024,1,6,Giral-Martinez,Maths
|
||||||
|
17,13,11,2024,1,14,Robin,Physique
|
||||||
|
17,13,11,2024,1,11,Graff,Anglais
|
||||||
|
17,13,11,2024,1,5,Montarou,Anglais
|
||||||
|
18,13,11,2024,1,7,Montarou,Anglais
|
||||||
|
18,13,11,2024,1,3,LeLouarne,Anglais
|
||||||
|
18,13,11,2024,1,1,Graff,Anglais
|
||||||
|
18,13,11,2024,1,2,Pignard,Physique
|
||||||
|
18,13,11,2024,1,12,Giral-Martinez,Maths
|
||||||
|
14,14,11,2024,1,10,Creuset,Physique
|
||||||
|
14,14,11,2024,2,0,none,none
|
||||||
|
15,14,11,2024,1,4,Creuset,Physique
|
||||||
|
16,15,11,2024,1,12,Thiébaud,Physique
|
||||||
|
18,18,11,2024,1,9,Bouverot,Maths
|
||||||
|
|
||||||
|
17,19,11,2024,1,5,Dailly,Maths
|
||||||
|
17,19,11,2024,1,12,Riveline,Maths
|
||||||
|
17,19,11,2024,1,3,Pelletier,Maths
|
||||||
|
17,19,11,2024,1,5,Chevalier,Physique
|
||||||
|
18,19,11,2024,1,14,Dailly,Maths
|
||||||
|
18,19,11,2024,1,8,Pelletier,Maths
|
||||||
|
18,19,11,2024,1,7,Riveline,Maths
|
||||||
|
8,20,11,2024,1,4,Bouverot,Maths
|
||||||
|
14,20,11,2024,1,13,Sabban,Maths
|
||||||
|
16,20,11,2024,1,12,Montarou,Anglais
|
||||||
|
16,20,11,2024,1,10,Graff,Anglais
|
||||||
|
17,20,11,2024,1,6,Graff,Anglais
|
||||||
|
17,20,11,2024,1,11,Robin,Physique
|
||||||
|
17,20,11,2024,1,8,Montarou,Anglais
|
||||||
|
17,20,11,2024,1,7,Pignard,Physique
|
||||||
|
17,20,11,2024,1,1,Giral-Martinez,Maths
|
||||||
|
18,20,11,2024,1,4,LeLouarne,Anglais
|
||||||
|
18,20,11,2024,1,14,Graff,Anglais
|
||||||
|
18,20,11,2024,1,2,Montarou,Anglais
|
||||||
|
18,20,11,2024,1,9,Pignard,Physique
|
||||||
|
18,20,11,2024,1,11,Giral-Martinez,Maths
|
||||||
|
14,21,11,2024,1,1,Creuset,Physique
|
||||||
|
14,21,11,2024,2,0,none,none
|
||||||
|
15,21,11,2024,1,3,Creuset,Physique
|
||||||
|
16,22,11,2024,1,13,Thiébaud,Physique
|
||||||
|
18,25,11,2024,1,10,Bouverot,Maths
|
||||||
|
|
||||||
|
17,26,11,2024,1,8,Pelletier,Maths
|
||||||
|
17,26,11,2024,1,1,Riveline,Maths
|
||||||
|
17,26,11,2024,1,6,Chevalier,Physique
|
||||||
|
17,26,11,2024,1,12,Dailly,Maths
|
||||||
|
18,26,11,2024,1,6,Dailly,Maths
|
||||||
|
18,26,11,2024,1,2,Riveline,Maths
|
||||||
|
18,26,11,2024,1,0,none,none
|
||||||
|
8,27,11,2024,1,13,Bouverot,Maths
|
||||||
|
14,27,11,2024,1,4,Sabban,Maths
|
||||||
|
16,27,11,2024,1,1,Montarou,Anglais
|
||||||
|
16,27,11,2024,1,5,Graff,Anglais
|
||||||
|
17,27,11,2024,1,9,Graff,Anglais
|
||||||
|
17,27,11,2024,1,8,Pignard,Physique
|
||||||
|
17,27,11,2024,1,5,Giral-Martinez,Maths
|
||||||
|
17,27,11,2024,1,13,Montarou,Anglais
|
||||||
|
17,27,11,2024,1,10,Robin,Physique
|
||||||
|
18,27,11,2024,1,9,Giral-Martinez,Maths
|
||||||
|
18,27,11,2024,1,3,Montarou,Anglais
|
||||||
|
18,27,11,2024,1,2,Pignard,Physique
|
||||||
|
18,27,11,2024,1,7,Graff,Anglais
|
||||||
|
18,27,11,2024,1,11,LeLouarne,Anglais
|
||||||
|
14,28,11,2024,1,12,Creuset,Physique
|
||||||
|
14,28,11,2024,2,0,none,none
|
||||||
|
15,28,11,2024,1,4,Creuset,Physique
|
||||||
|
16,29,11,2024,1,14,Thiébaud,Physique
|
||||||
|
18,2,12,2024,1,6,Bouverot,Maths
|
||||||
|
|
||||||
|
17,3,12,2024,1,10,Dailly,Maths
|
||||||
|
17,3,12,2024,1,11,Pelletier,Maths
|
||||||
|
17,3,12,2024,1,7,Riveline,Maths
|
||||||
|
17,3,12,2024,1,7,Chevalier,Physique
|
||||||
|
18,3,12,2024,1,5,Dailly,Maths
|
||||||
|
18,3,12,2024,1,13,Pelletier,Maths
|
||||||
|
18,3,12,2024,1,1,Riveline,Maths
|
||||||
|
8,4,12,2024,1,2,Bouverot,Maths
|
||||||
|
14,4,12,2024,1,14,Sabban,Maths
|
||||||
|
16,4,12,2024,1,12,Montarou,Anglais
|
||||||
|
16,4,12,2024,1,8,Graff,Anglais
|
||||||
|
17,4,12,2024,1,6,Graff,Anglais
|
||||||
|
17,4,12,2024,1,11,Robin,Physique
|
||||||
|
17,4,12,2024,1,9,Giral-Martinez,Maths
|
||||||
|
17,4,12,2024,1,10,Montarou,Anglais
|
||||||
|
17,4,12,2024,1,1,Pignard,Physique
|
||||||
|
18,4,12,2024,1,3,Giral-Martinez,Maths
|
||||||
|
18,4,12,2024,1,14,LeLouarne,Anglais
|
||||||
|
18,4,12,2024,1,4,Graff,Anglais
|
||||||
|
18,4,12,2024,1,2,Montarou,Anglais
|
||||||
|
18,4,12,2024,1,5,Pignard,Physique
|
||||||
|
14,5,12,2024,1,3,Creuset,Physique
|
||||||
|
14,5,12,2024,2,0,none,none
|
||||||
|
15,5,12,2024,1,9,Creuset,Physique
|
||||||
|
16,6,12,2024,1,13,Thiébaud,Physique
|
||||||
|
18,9,12,2024,1,11,Bouverot,Maths
|
||||||
|
|
||||||
|
17,10,12,2024,1,12,Pelletier,Maths
|
||||||
|
17,10,12,2024,1,2,Dailly,Maths
|
||||||
|
17,10,12,2024,1,4,Chevalier,Physique
|
||||||
|
17,10,12,2024,1,3,Riveline,Maths
|
||||||
|
18,10,12,2024,1,14,Dailly,Maths
|
||||||
|
18,10,12,2024,1,0,none,none
|
||||||
|
18,10,12,2024,1,7,Riveline,Maths
|
||||||
|
8,11,12,2024,1,10,Bouverot,Maths
|
||||||
|
14,11,12,2024,1,6,Sabban,Maths
|
||||||
|
16,11,12,2024,1,11,Montarou,Anglais
|
||||||
|
16,11,12,2024,1,5,Graff,Anglais
|
||||||
|
17,11,12,2024,1,14,Robin,Physique
|
||||||
|
17,11,12,2024,1,9,Montarou,Anglais
|
||||||
|
17,11,12,2024,1,13,Graff,Anglais
|
||||||
|
17,11,12,2024,1,8,Giral-Martinez,Maths
|
||||||
|
17,11,12,2024,1,12,Pignard,Physique
|
||||||
|
18,11,12,2024,1,7,Graff,Anglais
|
||||||
|
18,11,12,2024,1,1,LeLouarne,Anglais
|
||||||
|
18,11,12,2024,1,4,Giral-Martinez,Maths
|
||||||
|
18,11,12,2024,1,10,Pignard,Physique
|
||||||
|
18,11,12,2024,1,3,Montarou,Anglais
|
||||||
|
14,12,12,2024,1,8,Creuset,Physique
|
||||||
|
14,12,12,2024,2,0,none,none
|
||||||
|
15,12,12,2024,1,2,Creuset,Physique
|
||||||
|
16,13,12,2024,1,6,Thiébaud,Physique
|
||||||
|
18,16,12,2024,1,3,Bouverot,Maths
|
||||||
|
|
||||||
|
17,17,12,2024,1,14,Riveline,Maths
|
||||||
|
17,17,12,2024,1,11,Pelletier,Maths
|
||||||
|
17,17,12,2024,1,7,Chevalier,Physique
|
||||||
|
17,17,12,2024,1,7,Dailly,Maths
|
||||||
|
18,17,12,2024,1,1,Pelletier,Maths
|
||||||
|
18,17,12,2024,1,5,Dailly,Maths
|
||||||
|
18,17,12,2024,1,8,Riveline,Maths
|
||||||
|
8,18,12,2024,1,4,Bouverot,Maths
|
||||||
|
14,18,12,2024,1,12,Sabban,Maths
|
||||||
|
16,18,12,2024,1,12,Montarou,Anglais
|
||||||
|
16,18,12,2024,1,8,Graff,Anglais
|
||||||
|
17,18,12,2024,1,6,Montarou,Anglais
|
||||||
|
17,18,12,2024,1,1,Pignard,Physique
|
||||||
|
17,18,12,2024,1,5,Robin,Physique
|
||||||
|
17,18,12,2024,1,4,Graff,Anglais
|
||||||
|
17,18,12,2024,1,9,Giral-Martinez,Maths
|
||||||
|
18,18,12,2024,1,2,Graff,Anglais
|
||||||
|
18,18,12,2024,1,10,LeLouarne,Anglais
|
||||||
|
18,18,12,2024,1,14,Montarou,Anglais
|
||||||
|
18,18,12,2024,1,9,Pignard,Physique
|
||||||
|
18,18,12,2024,1,13,Giral-Martinez,Maths
|
||||||
|
14,19,12,2024,1,11,Creuset,Physique
|
||||||
|
14,19,12,2024,2,0,none,none
|
||||||
|
15,19,12,2024,1,3,Creuset,Physique
|
||||||
|
16,20,12,2024,1,13,Thiébaud,Physique
|
||||||
|
18,23,12,2024,1,12,Bouverot,Maths
|
||||||
|
|
||||||
|
17,24,12,2024,1,5,Pelletier,Maths
|
||||||
|
17,24,12,2024,1,8,Dailly,Maths
|
||||||
|
17,24,12,2024,1,1,Riveline,Maths
|
||||||
|
17,24,12,2024,1,12,Chevalier,Physique
|
||||||
|
18,24,12,2024,1,9,Pelletier,Maths
|
||||||
|
18,24,12,2024,1,4,Dailly,Maths
|
||||||
|
18,24,12,2024,1,13,Riveline,Maths
|
||||||
|
8,25,12,2024,1,2,Bouverot,Maths
|
||||||
|
14,25,12,2024,1,6,Sabban,Maths
|
||||||
|
16,25,12,2024,1,11,Montarou,Anglais
|
||||||
|
16,25,12,2024,1,5,Graff,Anglais
|
||||||
|
17,25,12,2024,1,9,Montarou,Anglais
|
||||||
|
17,25,12,2024,1,13,Graff,Anglais
|
||||||
|
17,25,12,2024,1,14,Robin,Physique
|
||||||
|
17,25,12,2024,1,8,Pignard,Physique
|
||||||
|
17,25,12,2024,1,0,none,none
|
||||||
|
18,25,12,2024,1,3,Montarou,Anglais
|
||||||
|
18,25,12,2024,1,10,Giral-Martinez,Maths
|
||||||
|
18,25,12,2024,1,7,Graff,Anglais
|
||||||
|
18,25,12,2024,1,1,LeLouarne,Anglais
|
||||||
|
18,25,12,2024,1,2,Pignard,Physique
|
||||||
|
14,26,12,2024,1,10,Creuset,Physique
|
||||||
|
14,26,12,2024,2,0,none,none
|
||||||
|
15,26,12,2024,1,6,Creuset,Physique
|
||||||
|
16,27,12,2024,1,4,Thiébaud,Physique
|
||||||
|
18,30,12,2024,1,9,Bouverot,Maths
|
||||||
|
|
||||||
|
17,31,12,2024,1,10,Riveline,Maths
|
||||||
|
17,31,12,2024,1,13,Dailly,Maths
|
||||||
|
17,31,12,2024,1,3,Chevalier,Physique
|
||||||
|
17,31,12,2024,1,14,Pelletier,Maths
|
||||||
|
18,31,12,2024,1,7,Riveline,Maths
|
||||||
|
18,31,12,2024,1,1,Pelletier,Maths
|
||||||
|
18,31,12,2024,1,2,Dailly,Maths
|
||||||
|
8,1,1,2025,1,11,Bouverot,Maths
|
||||||
|
14,1,1,2025,1,3,Sabban,Maths
|
||||||
|
16,1,1,2025,1,12,Montarou,Anglais
|
||||||
|
16,1,1,2025,1,14,Graff,Anglais
|
||||||
|
17,1,1,2025,1,6,Giral-Martinez,Maths
|
||||||
|
17,1,1,2025,1,9,Pignard,Physique
|
||||||
|
17,1,1,2025,1,11,Robin,Physique
|
||||||
|
17,1,1,2025,1,6,Graff,Anglais
|
||||||
|
17,1,1,2025,1,8,Montarou,Anglais
|
||||||
|
18,1,1,2025,1,5,Giral-Martinez,Maths
|
||||||
|
18,1,1,2025,1,1,Pignard,Physique
|
||||||
|
18,1,1,2025,1,4,Montarou,Anglais
|
||||||
|
18,1,1,2025,1,10,Graff,Anglais
|
||||||
|
18,1,1,2025,1,2,LeLouarne,Anglais
|
||||||
|
14,2,1,2025,1,7,Creuset,Physique
|
||||||
|
14,2,1,2025,2,0,none,none
|
||||||
|
15,2,1,2025,1,13,Creuset,Physique
|
||||||
|
16,3,1,2025,1,5,Thiébaud,Physique
|
||||||
|
18,6,1,2025,1,11,Bouverot,Maths
|
||||||
|
|
||||||
|
17,7,1,2025,1,3,Dailly,Maths
|
||||||
|
17,7,1,2025,1,12,Pelletier,Maths
|
||||||
|
17,7,1,2025,1,8,Riveline,Maths
|
||||||
|
17,7,1,2025,1,2,Chevalier,Physique
|
||||||
|
18,7,1,2025,1,7,Riveline,Maths
|
||||||
|
18,7,1,2025,1,4,Dailly,Maths
|
||||||
|
18,7,1,2025,1,2,Pelletier,Maths
|
||||||
|
8,8,1,2025,1,0,none,none
|
||||||
|
14,8,1,2025,1,6,Sabban,Maths
|
||||||
|
16,8,1,2025,1,3,Graff,Anglais
|
||||||
|
16,8,1,2025,1,5,Montarou,Anglais
|
||||||
|
17,8,1,2025,1,10,Giral-Martinez,Maths
|
||||||
|
17,8,1,2025,1,13,Graff,Anglais
|
||||||
|
17,8,1,2025,1,7,Montarou,Anglais
|
||||||
|
17,8,1,2025,1,12,Robin,Physique
|
||||||
|
17,8,1,2025,1,4,Pignard,Physique
|
||||||
|
18,8,1,2025,1,14,Giral-Martinez,Maths
|
||||||
|
18,8,1,2025,1,11,Graff,Anglais
|
||||||
|
18,8,1,2025,1,14,Pignard,Physique
|
||||||
|
18,8,1,2025,1,1,Montarou,Anglais
|
||||||
|
18,8,1,2025,1,9,LeLouarne,Anglais
|
||||||
|
14,9,1,2025,1,10,Creuset,Physique
|
||||||
|
14,9,1,2025,2,0,none,none
|
||||||
|
15,9,1,2025,1,8,Creuset,Physique
|
||||||
|
16,10,1,2025,1,6,Thiébaud,Physique
|
||||||
|
18,13,1,2025,1,9,Bouverot,Maths
|
||||||
|
|
||||||
|
17,14,1,2025,1,5,Riveline,Maths
|
||||||
|
17,14,1,2025,1,13,Dailly,Maths
|
||||||
|
17,14,1,2025,1,3,Chevalier,Physique
|
||||||
|
17,14,1,2025,1,14,Pelletier,Maths
|
||||||
|
18,14,1,2025,1,3,Riveline,Maths
|
||||||
|
18,14,1,2025,1,7,Dailly,Maths
|
||||||
|
18,14,1,2025,1,1,Pelletier,Maths
|
||||||
|
8,15,1,2025,1,4,Bouverot,Maths
|
||||||
|
14,15,1,2025,1,12,Sabban,Maths
|
||||||
|
16,15,1,2025,1,12,Montarou,Anglais
|
||||||
|
16,15,1,2025,1,10,Graff,Anglais
|
||||||
|
17,15,1,2025,1,6,Montarou,Anglais
|
||||||
|
17,15,1,2025,1,5,Robin,Physique
|
||||||
|
17,15,1,2025,1,1,Pignard,Physique
|
||||||
|
17,15,1,2025,1,14,Graff,Anglais
|
||||||
|
17,15,1,2025,1,8,Giral-Martinez,Maths
|
||||||
|
18,15,1,2025,1,11,Giral-Martinez,Maths
|
||||||
|
18,15,1,2025,1,8,LeLouarne,Anglais
|
||||||
|
18,15,1,2025,1,9,Pignard,Physique
|
||||||
|
18,15,1,2025,1,4,Montarou,Anglais
|
||||||
|
18,15,1,2025,1,2,Graff,Anglais
|
||||||
|
14,16,1,2025,1,11,Creuset,Physique
|
||||||
|
14,16,1,2025,2,0,none,none
|
||||||
|
15,16,1,2025,1,13,Creuset,Physique
|
||||||
|
16,17,1,2025,1,7,Thiébaud,Physique
|
||||||
|
18,20,1,2025,1,9,Bouverot,Maths
|
||||||
|
|
||||||
|
17,21,1,2025,1,10,Riveline,Maths
|
||||||
|
17,21,1,2025,1,1,Dailly,Maths
|
||||||
|
17,21,1,2025,1,4,Chevalier,Physique
|
||||||
|
17,21,1,2025,1,5,Pelletier,Maths
|
||||||
|
18,21,1,2025,1,13,Riveline,Maths
|
||||||
|
18,21,1,2025,1,4,Pelletier,Maths
|
||||||
|
18,21,1,2025,1,8,Dailly,Maths
|
||||||
|
8,22,1,2025,1,12,Bouverot,Maths
|
||||||
|
14,22,1,2025,1,6,Sabban,Maths
|
||||||
|
16,22,1,2025,1,11,Montarou,Anglais
|
||||||
|
16,22,1,2025,1,1,Graff,Anglais
|
||||||
|
17,22,1,2025,1,12,Pignard,Physique
|
||||||
|
17,22,1,2025,1,9,Graff,Anglais
|
||||||
|
17,22,1,2025,1,14,Robin,Physique
|
||||||
|
17,22,1,2025,1,0,none,none
|
||||||
|
17,22,1,2025,1,5,Montarou,Anglais
|
||||||
|
18,22,1,2025,1,13,Graff,Anglais
|
||||||
|
18,22,1,2025,1,3,LeLouarne,Anglais
|
||||||
|
18,22,1,2025,1,7,Montarou,Anglais
|
||||||
|
18,22,1,2025,1,8,Pignard,Physique
|
||||||
|
18,22,1,2025,1,2,Giral-Martinez,Maths
|
||||||
|
14,23,1,2025,1,10,Creuset,Physique
|
||||||
|
14,23,1,2025,2,0,none,none
|
||||||
|
15,23,1,2025,1,6,Creuset,Physique
|
||||||
|
16,24,1,2025,1,2,Thiébaud,Physique
|
||||||
|
18,27,1,2025,1,6,Bouverot,Maths
|
||||||
|
|
||||||
|
17,28,1,2025,1,9,Riveline,Maths
|
||||||
|
17,28,1,2025,1,13,Chevalier,Physique
|
||||||
|
17,28,1,2025,1,14,Pelletier,Maths
|
||||||
|
17,28,1,2025,1,3,Dailly,Maths
|
||||||
|
18,28,1,2025,1,7,Riveline,Maths
|
||||||
|
18,28,1,2025,1,1,Pelletier,Maths
|
||||||
|
18,28,1,2025,1,2,Dailly,Maths
|
||||||
|
8,29,1,2025,1,13,Bouverot,Maths
|
||||||
|
14,29,1,2025,1,11,Sabban,Maths
|
||||||
|
16,29,1,2025,1,12,Montarou,Anglais
|
||||||
|
16,29,1,2025,1,14,Graff,Anglais
|
||||||
|
17,29,1,2025,1,6,Graff,Anglais
|
||||||
|
17,29,1,2025,1,5,Giral-Martinez,Maths
|
||||||
|
17,29,1,2025,1,3,Robin,Physique
|
||||||
|
17,29,1,2025,1,8,Montarou,Anglais
|
||||||
|
17,29,1,2025,1,7,Pignard,Physique
|
||||||
|
18,29,1,2025,1,10,Giral-Martinez,Maths
|
||||||
|
18,29,1,2025,1,4,Montarou,Anglais
|
||||||
|
18,29,1,2025,1,1,Pignard,Physique
|
||||||
|
18,29,1,2025,1,10,Graff,Anglais
|
||||||
|
18,29,1,2025,1,2,LeLouarne,Anglais
|
||||||
|
14,30,1,2025,1,5,Creuset,Physique
|
||||||
|
14,30,1,2025,2,0,none,none
|
||||||
|
15,30,1,2025,1,11,Creuset,Physique
|
||||||
|
16,31,1,2025,1,9,Thiébaud,Physique
|
||||||
|
18,3,2,2025,1,7,Bouverot,Maths
|
||||||
|
|
||||||
|
17,4,2,2025,1,4,Riveline,Maths
|
||||||
|
17,4,2,2025,1,0,none,none
|
||||||
|
17,4,2,2025,1,11,Dailly,Maths
|
||||||
|
17,4,2,2025,1,8,Chevalier,Physique
|
||||||
|
18,4,2,2025,1,12,Pelletier,Maths
|
||||||
|
18,4,2,2025,1,3,Dailly,Maths
|
||||||
|
18,4,2,2025,1,10,Riveline,Maths
|
||||||
|
8,5,2,2025,1,14,Bouverot,Maths
|
||||||
|
14,5,2,2025,1,6,Sabban,Maths
|
||||||
|
16,5,2,2025,1,9,Graff,Anglais
|
||||||
|
16,5,2,2025,1,7,Montarou,Anglais
|
||||||
|
17,5,2,2025,1,12,Robin,Physique
|
||||||
|
17,5,2,2025,1,2,Pignard,Physique
|
||||||
|
17,5,2,2025,1,8,Giral-Martinez,Maths
|
||||||
|
17,5,2,2025,1,13,Graff,Anglais
|
||||||
|
17,5,2,2025,1,5,Montarou,Anglais
|
||||||
|
18,5,2,2025,1,3,Montarou,Anglais
|
||||||
|
18,5,2,2025,1,1,LeLouarne,Anglais
|
||||||
|
18,5,2,2025,1,4,Pignard,Physique
|
||||||
|
18,5,2,2025,1,11,Graff,Anglais
|
||||||
|
18,5,2,2025,1,2,Giral-Martinez,Maths
|
||||||
|
14,6,2,2025,1,10,Creuset,Physique
|
||||||
|
14,6,2,2025,2,0,none,none
|
||||||
|
15,6,2,2025,1,6,Creuset,Physique
|
||||||
|
16,7,2,2025,1,14,Thiébaud,Physique
|
|
|
@ -432,10 +432,11 @@ void add_colles_for_group_MP2I(int* weeks_len, creneau* edt, int len_edt, colleu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_to_file(char* filename, creneau* edt, int len_edt) {
|
void write_to_file(char* filename, creneau* edt, int len_edt, int n_weeks) {
|
||||||
FILE* ptr = fopen(filename, "w");
|
FILE* ptr = fopen(filename, "w");
|
||||||
fprintf(ptr, "hour,day,month,year,length,group,colleur,matiere\n");
|
fprintf(ptr, "hour,day,month,year,length,group,colleur,matiere\n");
|
||||||
for(int i = 0; i < len_edt; i++) {
|
for(int i = 0; i < len_edt; i++) {
|
||||||
|
//fprintf(ptr, "%d,%d,%d,%d,%d,%d,%s,", edt[i].date.hour, edt[i].date.day, edt[i].date.month, edt[i].date.year, edt[i].length, edt[i].group, edt[i].name);
|
||||||
fprintf(ptr, "%d,%d,%d,%d,%d,%d,%s,", edt[i].date.hour, edt[i].date.day, edt[i].date.month, edt[i].date.year, edt[i].length, edt[i].group, edt[i].name);
|
fprintf(ptr, "%d,%d,%d,%d,%d,%d,%s,", edt[i].date.hour, edt[i].date.day, edt[i].date.month, edt[i].date.year, edt[i].length, edt[i].group, edt[i].name);
|
||||||
if(edt[i].mat == NOTHING) {
|
if(edt[i].mat == NOTHING) {
|
||||||
fprintf(ptr, "none");
|
fprintf(ptr, "none");
|
||||||
|
@ -453,6 +454,9 @@ void write_to_file(char* filename, creneau* edt, int len_edt) {
|
||||||
fprintf(ptr, "Unknown");
|
fprintf(ptr, "Unknown");
|
||||||
}
|
}
|
||||||
fprintf(ptr, "\n");
|
fprintf(ptr, "\n");
|
||||||
|
if(i != 0 && i%(len_edt/n_weeks) == 0) {
|
||||||
|
fprintf(ptr, "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(ptr);
|
fclose(ptr);
|
||||||
}
|
}
|
||||||
|
@ -471,14 +475,14 @@ int max(int x, int y) {
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int penalty_poly(int occ, int n_weeks) {
|
int penalty_poly(int occ, int n_weeks, int* averages, int apt) {
|
||||||
if(occ == 0) {
|
if(occ == 0) {
|
||||||
return n_weeks*10;
|
return n_weeks*10;
|
||||||
}
|
}
|
||||||
return (occ-1)*(occ-1)*(occ-1);
|
return (averages[apt] - occ)*(averages[apt] - occ)*(averages[apt] - occ)*(averages[apt] - occ)*3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int score(creneau* edt, int len_edt, int grp, int n_weeks, int** occ, int wd, int ht) {
|
int score(creneau* edt, int len_edt, int grp, int n_weeks, int** occ, int wd, int ht, int* averages) {
|
||||||
int score = n_weeks*300;
|
int score = n_weeks*300;
|
||||||
|
|
||||||
int dist = 0;
|
int dist = 0;
|
||||||
|
@ -503,7 +507,7 @@ int score(creneau* edt, int len_edt, int grp, int n_weeks, int** occ, int wd, in
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int tch = 0; tch < ht; tch++) {
|
for(int tch = 0; tch < ht; tch++) {
|
||||||
score -= penalty_poly(occ[grp-1][tch], n_weeks);
|
score -= penalty_poly(occ[grp-1][tch], n_weeks, averages, tch);
|
||||||
}
|
}
|
||||||
//printf("((%d))\n", score);
|
//printf("((%d))\n", score);
|
||||||
return score;
|
return score;
|
||||||
|
@ -606,8 +610,7 @@ topic int_to_mat(colleur* colleur, int id) {
|
||||||
void fill_zeroes(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs, int n_groups, int n_weeks, int weeklen, int** occs, int* averages) {
|
void fill_zeroes(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs, int n_groups, int n_weeks, int weeklen, int** occs, int* averages) {
|
||||||
for(int gr1 = 0; gr1 < n_groups; gr1++) {
|
for(int gr1 = 0; gr1 < n_groups; gr1++) {
|
||||||
for(int col1 = 0; col1 < len_colleurs; col1++) {
|
for(int col1 = 0; col1 < len_colleurs; col1++) {
|
||||||
char* researched_colleur = colleurs[col1].name ;
|
if(occs[gr1][col1] <= 1) {
|
||||||
if(occs[gr1][col1] == 0) {
|
|
||||||
int halt = 0 ;
|
int halt = 0 ;
|
||||||
for(int week = 0; week < n_weeks*(1-halt); week++) {
|
for(int week = 0; week < n_weeks*(1-halt); week++) {
|
||||||
int r1 = rand()%weeklen;
|
int r1 = rand()%weeklen;
|
||||||
|
@ -627,7 +630,7 @@ void fill_zeroes(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs,
|
||||||
str_equal(edt[edtptr2].name, colleurs[col1].name) && // colleur with 0 G1 colles
|
str_equal(edt[edtptr2].name, colleurs[col1].name) && // colleur with 0 G1 colles
|
||||||
|
|
||||||
occs[edt[edtptr2].group-1][col1] > 1 && // G2 has some backup
|
occs[edt[edtptr2].group-1][col1] > 1 && // G2 has some backup
|
||||||
occs[edt[edtptr2].group-1][colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] <=
|
occs[edt[edtptr2].group-1][colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] <
|
||||||
averages[colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] // no overflow for G2
|
averages[colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] // no overflow for G2
|
||||||
) {
|
) {
|
||||||
halt = true ;
|
halt = true ;
|
||||||
|
@ -656,8 +659,7 @@ void fill_zeroes(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs,
|
||||||
void deplete_most(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs, int n_groups, int n_weeks, int weeklen, int** occs, int* averages) {
|
void deplete_most(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs, int n_groups, int n_weeks, int weeklen, int** occs, int* averages) {
|
||||||
for(int gr1 = 0; gr1 < n_groups; gr1++) {
|
for(int gr1 = 0; gr1 < n_groups; gr1++) {
|
||||||
for(int col1 = 0; col1 < len_colleurs; col1++) {
|
for(int col1 = 0; col1 < len_colleurs; col1++) {
|
||||||
char* researched_colleur = colleurs[col1].name ;
|
if(occs[gr1][col1] >= averages[col1]) {
|
||||||
if(occs[gr1][col1] > averages[col1]) {
|
|
||||||
int halt = 0 ;
|
int halt = 0 ;
|
||||||
for(int week = 0; week < n_weeks*(1-halt); week++) {
|
for(int week = 0; week < n_weeks*(1-halt); week++) {
|
||||||
int r1 = rand()%weeklen;
|
int r1 = rand()%weeklen;
|
||||||
|
@ -676,7 +678,7 @@ void deplete_most(creneau* edt, int len_edt, colleur* colleurs, int len_colleurs
|
||||||
edt[edtptr2].mat == int_to_mat(colleurs, col1) && // same topic
|
edt[edtptr2].mat == int_to_mat(colleurs, col1) && // same topic
|
||||||
str_equal(edt[edtptr2].name, colleurs[col1].name) && // colleur with too many G1 colles
|
str_equal(edt[edtptr2].name, colleurs[col1].name) && // colleur with too many G1 colles
|
||||||
|
|
||||||
occs[edt[edtptr2].group-1][col1] <= averages[colleur_to_id(colleurs, len_colleurs, edt[edtptr2].name)] && // G2 has some backup
|
occs[edt[edtptr2].group-1][col1] < averages[colleur_to_id(colleurs, len_colleurs, edt[edtptr2].name)] && // G2 has some backup
|
||||||
occs[edt[edtptr2].group-1][colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] > 1// no overflow for G2
|
occs[edt[edtptr2].group-1][colleur_to_id(colleurs, len_colleurs, edt[edtptr1].name)] > 1// no overflow for G2
|
||||||
) {
|
) {
|
||||||
halt = true ;
|
halt = true ;
|
||||||
|
@ -867,18 +869,19 @@ 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++) {
|
||||||
////warn("(%d) at (%d)", permut[i]+1, k);
|
////warn("(%d) at (%d)", permut[i]+1, k);
|
||||||
add_colles_for_group_MP2I(weeks_len, edt, len_edt, chads, len_chads, n_weeks, (permut[i])+1, (topic)(2+(permut[i])%2), (permut[i])%math_halt, (permut[i])%info_app, &skipped, math_halt, info_app, occs, averages);
|
add_colles_for_group_MP2I(weeks_len, edt, len_edt, chads, len_chads, n_weeks, (permut[i])+1, (topic)(2+(permut[i])%2), (permut[i])%math_halt+(permut[i]==n_groups-1), (permut[i])%info_app, &skipped, math_halt, info_app, occs, averages);
|
||||||
}
|
}
|
||||||
//int** temp_data = occurencies(edt, len_edt, chads, n_groups, len_chads, n_weeks, false);
|
//int** temp_data = occurencies(edt, len_edt, chads, n_groups, len_chads, n_weeks, false);
|
||||||
fill_zeroes(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
fill_zeroes(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
|
fill_zeroes(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
deplete_most(edt, len_edt, chads, len_chads, n_groups, n_weeks, len_edt/n_weeks, occs, averages);
|
||||||
int** temp_data = occs;
|
int** temp_data = occs;
|
||||||
//int** temp_data = adjust(edt, len_edt, chads, n_groups, len_chads, n_weeks);
|
//int** temp_data = adjust(edt, len_edt, chads, n_groups, len_chads, n_weeks);
|
||||||
for(int i = 0; i < n_groups; i++) {
|
for(int i = 0; i < n_groups; i++) {
|
||||||
temp = score(edt, len_edt, i+1, n_weeks, temp_data, n_groups, len_chads);
|
temp = score(edt, len_edt, i+1, n_weeks, temp_data, n_groups, len_chads, averages);
|
||||||
local_score += temp;
|
local_score += temp;
|
||||||
group_temp[i] = temp;
|
group_temp[i] = temp;
|
||||||
if(local_min > temp) {
|
if(local_min > temp) {
|
||||||
|
@ -896,7 +899,7 @@ void aux_2(creneau* edt, int len_edt, colleur* chads, int len_chads, int n_group
|
||||||
group_stats[p] = group_temp[p];
|
group_stats[p] = group_temp[p];
|
||||||
}
|
}
|
||||||
copy_matrix(temp_data, n_groups, len_chads, occ_data);
|
copy_matrix(temp_data, n_groups, len_chads, occ_data);
|
||||||
write_to_file(outname, edt, len_edt);
|
write_to_file(outname, edt, len_edt, n_weeks);
|
||||||
}
|
}
|
||||||
for(int r = 0; r < len_edt; r++) {
|
for(int r = 0; r < len_edt; r++) {
|
||||||
remove_colle(edt, r);
|
remove_colle(edt, r);
|
||||||
|
|
|
@ -56,9 +56,9 @@ int free_math_space(creneau *edt, int len_edt, int id);
|
||||||
|
|
||||||
void add_colles_for_group_MP2I(int *weeks_len, creneau *edt, int len_edt, colleur *chads, int len_chads, int n_weeks, int grp, topic start_rotation, int mth, int inf, int *skip_count, int math_halt, int info_app, int** occs, int* averages);
|
void add_colles_for_group_MP2I(int *weeks_len, creneau *edt, int len_edt, colleur *chads, int len_chads, int n_weeks, int grp, topic start_rotation, int mth, int inf, int *skip_count, int math_halt, int info_app, int** occs, int* averages);
|
||||||
|
|
||||||
void write_to_file(char *filename, creneau *edt, int len_edt);
|
void write_to_file(char *filename, creneau *edt, int len_edt, int n_weeks);
|
||||||
|
|
||||||
int score(creneau *edt, int len_edt, int grp, int n_weeks, int** occ, int wd, int ht);
|
int score(creneau *edt, int len_edt, int grp, int n_weeks, int** occ, int wd, int ht, int* averages);
|
||||||
|
|
||||||
int get_colleur_id(colleur* dudes, int n_dudes, char* target);
|
int get_colleur_id(colleur* dudes, int n_dudes, char* target);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue