Original Message:
Sent: Wed April 30, 2025 09:24 AM
From: Olivier Lhomme
Subject: Docplex CP Sequence_var issue
Hello,
You can simply add a dummy interval of size 0, say DI, between two phases to synchronize. Then constrain the last tasks (possibly dummy too as Thierry suggested to you) of each sequenceVars of phase 1 to be before DI, and constrain the first tasks of the sequenceVars of phase 2 to be after DI.
That way you will have a linear number of additional constraints instead of quadratic.
------------------------------
Olivier Lhomme
------------------------------
Original Message:
Sent: Tue April 22, 2025 08:39 PM
From: Ross Dye
Subject: Docplex CP Sequence_var issue
Hi Thierry
Thanks for the response. It looks like your solution is trying to create some "connection" between the upstream & downstream sequences to avoid 'ambiguity'?. If so can you help me understand the issue please?
My problem is quite a bit more complicated than mentioned previously - as mentioned I simplified the model to isolate the problem.
In reality the model is similar to:
In addition there may be multiple stages - the above shows only two stages, ie there may be T3,T4,T5 etc feeding to C1,C2...
So how would I apply your solution to this model. I think it will be problematic if I make the start of ALL intervals at B start_after ALL intervals at A.
Greatly appreciate your advice. I am at an impasse right now
Thanks
Ross
------------------------------
Ross Dye
Original Message:
Sent: Wed April 16, 2025 04:33 AM
From: Thierry Sola
Subject: Docplex CP Sequence_var issue
Hello Ross,
You can define three "dummy" interval variables of null size lastA, firstB and firstB1.
You constraint lastA to be the last in sequence A and firstB (respectively firstB1) to be the first in sequence B (respectively B1).
See docplex.cp.modeler.last(sequence, interval) and docplex.cp.modeler.first(sequence, interval).
You must force lastA to finish before firstB and firstB1 start. See docplex.cp.modeler.end_before_start(a, b, delay=None).
Regards,
Thierry.
------------------------------
Thierry Sola