From 17731a1032c6f300b2a19bd6d7b125652adfdff2 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Sat, 6 Jan 2024 20:19:46 +0100 Subject: [PATCH] Add "each person has at least 1 task" constraint --- model.glpm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.glpm b/model.glpm index f03c034..5dbe113 100644 --- a/model.glpm +++ b/model.glpm @@ -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 */ 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 */ -#s.t. min_load_person{p in P}: sum{j in J, d in D} A[p,j,d] >= min_load[p]; +/* 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] >= 1; /* 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;