Hi David
Can you be more precise by I want to know?
I figure out you need a. boolean value claiming if or if not the interval variable it is starts in one of the segments (s_1, ..., s.n). It is. an temporal alternative. I suggest the following model:
Hi David
You describe a disjunction between two solution: the one for which the interval variable it must start in the segmented Boolean function f and the one that must notify.
That is the lighter and more efficient model is to add the alternative on it between two optional variables on for which f forbids to start the interval, one for which the. complementary on time axis of f forbids to start the interval. The presenceOf constraint on interval in the alternative gives the status in a solution. If you need some help to write the model (which I doubt of), please contacts us.
In a general manner, the efficient way to model interval variable preferences is to declare alternative on the condition. that is an alternative of optional variables subject to the constraint condition on one term and its opposite on the. other term.
Hope that helps and happy you still work with CPO.
------------------------------
Jerome Rogerie
------------------------------
Original Message:
Sent: Thu May 25, 2023 04:33 AM
From: David Gravot
Subject: CP existence of an interval starting in a range
Hi
Say I have a set S of optional interval decision variables and I want to know when any of them starts in given time ranges r1=[0 .. 60), r2=[60, 120), r3=[120, 180)
I could define for each range i something such as startIn(i) = or(a in S) startOf(a, M) in r(i), where M is for instance 1000 (forbidding to count any absent interval)
I wonder if this model is good enough or if someone would provide better one
David
------------------------------
David Gravot
------------------------------