max wl constraint, less cooks on thursday

This commit is contained in:
Yorick van Pelt 2019-02-18 12:27:48 +01:00
parent 6b72a56fc6
commit fae35f1ebf
No known key found for this signature in database
GPG Key ID: D8D3CC6D951384DE
4 changed files with 7 additions and 3 deletions

View File

@ -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]

View File

@ -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):

View File

@ -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];

View File

@ -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