You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using python for CP solving.
I would like to know if there is constraint that does the opposite of no_overlap.
This will be like
overlap(interval, arr, n) interval - single interval variable arr - array of interval variables n - positive integer less than length of arr
this will mean that atleast n interval variables from arr overlap in the interval of interval
This is for a situation in job scheduling when a job is not possible to be scheduled on a machine because there are already n higher priority jobs.
The text was updated successfully, but these errors were encountered:
Hello, you can use the overlapLength expression to know how much overlap there are between two interval variables. This way you can count the number of non-zero overlaps between 'interval' and all the elements of 'arr'. Something like:
mdl.sum([mdl.overlap_length(interval, a) > 0 for a in arr]) >= n
Hello,
Thanks for the reply, but actually what I need is a bit more complex.
I need that whenever interval starts then n intervals from a set have already started or start parallelly with interval. that is something above the overlap constraint
Hi, I am using python for CP solving.
I would like to know if there is constraint that does the opposite of no_overlap.
This will be like
overlap(interval, arr, n)
interval - single interval variable
arr - array of interval variables
n - positive integer less than length of arr
this will mean that atleast n interval variables from arr overlap in the interval of interval
This is for a situation in job scheduling when a job is not possible to be scheduled on a machine because there are already n higher priority jobs.
The text was updated successfully, but these errors were encountered: