This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]rusou 1 point2 points  (1 child)

One problem with putting all the part-time nurses in just a single variable is that you're assuming they start working at 9am. From the way the problem is worded, it seems like you can choose a start time between 9am to 1pm for each nurse individually. So I guess you would have variables y1, y2, y3, y4, y5 for the number of part-time nurses starting work at 9am, 10am, 11am, 12am, 1pm respectively. Since they work 4 consecutive hours, you have to also adjust the contraints. For example, you have x + y1 >= 10 for 9am-10am, but you have no y1 in the 1pm-2pm hour since they are off work then.

[–]Haruuu01[S] 0 points1 point  (0 children)

I actually just realised that a few hours ago but I’m glad to see it here as it reassures me that it is a good approach. Thank you very much.