I’ve implemented a new example in drools-solver: patient admission scheduling. In this problem, we have to assign each patient (that will come to the hospital) a bed for each night that the patient will stay in the hospital. The problem is defined on this webpage by the Kaho Sint-Lieven IT research group and the test data comes from real world hospitals.
Each bed belongs to a room and each room belongs to a department. The arrival and departure dates of the patients is fixed: only a bed needs to be assigned for each night.
There are a couple of hard constraints:
- 2 patients shouldn’t be assigned to the same bed in the same night (not even if they are married :).
- A room can have a gender limitation: only females, only males, the same gender in the same night or no gender limitation at all.
- A departement can have a minimum or maximum age.
- A patient can require a room with specific equipment(s).
And of course, there are also some soft constraints:
- A patient can prefer a maximum room size, for example if he/she want a single room.
- A patient is best assigned to a department that specializes in his/her problem.
- A patient is best assigned to a room that specializes in his/her problem.
- A patient can prefer a room with specific equipment(s).
Drools-solver solves this planning problem. Here’s a screenshot of a result: