I suspect there is an off-by-one error in check_resources while printing violated constraints:
if worload > upper_bound + tolerance:
print('ERROR: Resources constraint 4.2 upper bound: Worload on Resource ' + resource_name + ' at time ' + str(time) + ' exceeds upper bound.'
+ ' Value ' + str(worload) + ' is greater than bound ' + str(upper_bound) + ' plus tolerance ' + str(tolerance) + '.')
# Check min
if worload < lower_bound - tolerance:
print('ERROR: Resources constraint 4.2 lower bound: Worload on Resource ' + resource_name + ' at time ' + str(time) + ' does not match lower bound.'
+ ' Value ' + str(worload) + ' is lower than bound ' + str(lower_bound) + ' minus tolerance ' + str(tolerance) + '.')
Suggestion
Change str(time) → str(time + 1) because time takes values in [0, T-1] but should be displayed in [1, T] to be consistent with check_exclusions and the input format.
I suspect there is an off-by-one error in
check_resources
while printing violated constraints:Suggestion
Change
str(time)
→str(time + 1)
becausetime
takes values in[0, T-1]
but should be displayed in[1, T]
to be consistent withcheck_exclusions
and the input format.