How can I implement nurse pairs in Schedule Nurse? Namely:
    1. Nurse-1 must not work with Nurse-2.
    2. If nurse-1 works, then nurse-2 must also work.

Must not work together

We use Pair_Inihbited in Constraint Type. Our experiences show you can put in many people pair prohibitions and still not have a problem.



If nurse-1 works, then nurse-2 must also work.

Use IF(A)_Then_B in Constraint Type. The operator includes the following options in case of using Sets. OR equals to At Least One(>=1).

To avoid no solutions, we strongly recommend using soft constraints. Because this constraint significantly reduces the solution space. If you wish to achieve the same shift for both staff, describe from both directions.



Solution





Load the Project File

File → Open Project File from GitHub