I am solving a job scheduling problem with three shifts,
the duration of all shifts are assumed to be known (and might be equal):
- The tasks can start from any shift
- We know the duration of each task in minutes
- if it starts from minute $1\leq start \leq 480$ then it is in shift1
- if it starts from minute $481\leq start \leq 960$ then it is in shift2
- if it starts from minute $961\leq start \leq 1440$ then it is in shift3
Now the question is how to calculate the duration that falls into each shift depending on the starting minute (variable) and duration (parameter) ?
Input:
- Duration of each shift
- Duration of task
Output:
I am looking for the values of $h_1,h_2,h_3$ in each case