January 2020
Intermediate to advanced
346 pages
9h 8m
English
For solving the nurse scheduling problem, we decided to use a binary list (or array) to represent the schedule as it will be intuitive for us to interpret, and we've seen that genetic algorithms can naturally handle this representation.
For each nurse, we can have a binary string representing the 21 shifts of the week. A value of 1 represents a shift that the nurse is scheduled to work on. For example, take a look at the following binary list:
(0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0)
This can be broken into the following groups of three values, representing the shifts this nurse will be working each day of the week:
| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
| (0, 1, 0) |
Read now
Unlock full access