diff --git a/config.yaml b/config.yaml index 2c26feb..a36383e 100644 --- a/config.yaml +++ b/config.yaml @@ -33,7 +33,7 @@ tasks: workload: 1 lookup: [drankmanagen] koken: - req: [4, 2, 2, 2] + req: [3, 2, 2, 2] workload: 3 personen: liefhebbers lookup: [koken, kookhulp, hulpkoken] @@ -58,7 +58,7 @@ tasks: personen: iedereen lookup: [afwassen] snijpieten: - req: [5, 4, 4, 4] + req: [3, 4, 4, 4] workload: 2 personen: iedereen lookup: [snijden] diff --git a/magisch_corvee_script.py b/magisch_corvee_script.py index dc84d7a..1c62417 100755 --- a/magisch_corvee_script.py +++ b/magisch_corvee_script.py @@ -139,6 +139,7 @@ def write_data(people, tasks, file=sys.stdout): print(glpm.param("D_count", config['days']), file=file) print(glpm.param("P_count", len(people)), file=file) print(glpm.param("J_count", len(tasks)), file=file) + print(glpm.param("ML", 6), file=file) # CHANGE THIS print(glpm.param("WL", config['weights']['likes']), file=file) print(glpm.param("WH", config['weights']['hates']), file=file) def write_tasks(people, tasks, file=sys.stdout): diff --git a/model.glpm b/model.glpm index 11b5a33..b0dbe6f 100644 --- a/model.glpm +++ b/model.glpm @@ -9,6 +9,7 @@ param D_count, integer, > 0; param WL, integer, > 0; param WH, integer, > 0; +param ML, integer, > 0; set P := 1..P_count; set J := 1..J_count; @@ -54,6 +55,8 @@ s.t. max_load_person{p in P, d in D}: sum{j in J} A[p,j,d] <= max_load[p,d]; /* A person does not perform the same job on all days */ /*s.t. duplicate_jobs{p in P, j in J}: sum{d in D} A[p,j,d] <= D_count-1;*/ +s.t. max_load_person_total{p in P}: (sum{d in D, j in J} A[p,j,d] * Wl[j]) <= ML; + /* Each task is allocated */ s.t. all_allocated{j in J, d in D}: sum{p in P} A[p,j,d] == R[d, j]; diff --git a/prefs_table b/prefs_table index 78178c0..d3e721b 100644 --- a/prefs_table +++ b/prefs_table @@ -1,6 +1,6 @@ Lucus koken schoonmaken, fotograferen Wassasin koken fotograferen -linda superkok, snackdealen koken, snijden, afwassen, schoonmaken, fotograferen +linda superkok koken, snijden, afwassen, schoonmaken, fotograferen Nova koken, afwassen fotograferen, snackdealen Obfusk koken, afwassen fotograferen, snackdealen, schoonmaken Daan fotograferen, koken schoonmaken