Implementation

Scheduling Horizon

We need 6 days for previous month.



Days Sets

We define the 1st week including six previous month days.



Then, the days set above should include one Monday.



We can create 1stMondayWeek,2ndMondayWeek..



Using the days set above, we constraint work hours.



Macro

Calculate work hours for the 5th and 6th weeks using a macro because of the possibility of fractions of days.



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.



Formula H is linear calculatiion.



Expression G performs the rounding up process. Solvers can only process in increments of 15 minutes, so we will use 0.25 hour increments.



Load the Example Project File

File → Open Project File from GitHub