Add "each person has at least 1 task" constraint

This commit is contained in:
Yorick van Pelt 2024-01-06 20:19:46 +01:00
parent d5b1309ef5
commit 17731a1032
No known key found for this signature in database
GPG Key ID: A36E70F9DC014A15

View File

@ -48,8 +48,8 @@ s.t. hardcode{p in P, j in J, d in D}: A[p,j,d] >= Q[p,j,d];
/* A person only has one task per day, at most */ /* A person only has one task per day, at most */
s.t. max_load_person{p in P, d in D}: sum{j in J} A[p,j,d] <= max_load[p,d]; 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 has at least D-1 tasks */ /* A person has at least 1 task */
#s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= min_load[p]; s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= 1;
/* A person does not perform the same job on all days */ /* 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. duplicate_jobs{p in P, j in J}: sum{d in D} A[p,j,d] <= D_count-1;