Implementation
Scheduling Horizon
We need 6 days for previous month.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_253.png)
Days Sets
We define the 1st week including six previous month days.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_254.png)
Then, the days set above should include one Monday.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_255.png)
We can create 1stMondayWeek,2ndMondayWeek..
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_256.png)
Using the days set above, we constraint work hours.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_257.png)
Macro
Calculate work hours for the 5th and 6th weeks using a macro because of the possibility of fractions of days.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_258.png)
Formula I calculates the day of the week. Note that it is calculated only for periods of 5 days or more. This is because if the period is too narrow, the required staff may be inadequate.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_259.png)
Formula H is linear calculatiion.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_260.png)
Expression G performs the rounding up process. Solvers can only process in increments of 15 minutes, so we will use 0.25 hour increments.
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_261.png)
Load the Example Project File
File → Open Project File from GitHub
![](https://www.nurse-scheduling-software.com/images/constraint_faqs/user_264.png)