I have a scheduling problem. 20 hours of work load should be assigned to different days (max 4 days are available and the capacity of ech day is 8 hours max) $\sum_i h_i = 20$
$0 \leq h_i \leq 8$
The following picture shows the desirable and undesirable ways of assignment. How can I mathematically formulate it as MILP to use minimum number of days and fill them from left to right (using all capacity) ?