'Docplex duedate constraint in single machine scheduling problem

I have a problem with the due date constraint by docplex.cp in python

This constraint is an error when the completion time (end of processing time) of the job is more than the due date

mdl.add(mdl.end_of(processing_itv_vars[j]) <= duedatelist[j])

if the completion time (end of processing time) of the job is more than the due date it should be showing only "job {} is Late"

for j in jobs:

if((msol.get_var_solution(processing_itv_vars[j]).get_end()) > duedatelist[j]):
>>>print("job {} is Late".format(j,1))

Could anyone help me? Thank you so much



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source