I am new to Cplex. I need to compute the overlap between several intervals at same time. For that, i compute the overlap_length between two intervals at a time, and i save the max and min of the start/end points. For example, let's consider three intervals vars I1, I2, I3. The objective is to maximize the overlap between the three. Then, the code is as follow:
over1=mdl.overlap_length(I1,I2)
start1=max(mdl.start_of(I1),mdl.start_of(I2))
end1=min(mdl.end_of(I1),mdl.end_of(I2))
over1=mdl.overlap_length(I3,(start1,end1)
And then i maximize the over1. With that, i get the following error:
AssertionError: To express a fixed interval, 'interval2' should be a tuple of two integers
In fact, the start1 and end1 are CP integer expressions. I didn't find a way to convert or to get the value! Is there anyone who have an idea how to do that?
Thanks,