-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disjoint on fixed start times #39
Comments
If I remember correctly, I restricted this to variables to make my life a little easier. I did not implement a translational approach for terms because this is tricky to do correctly (or at all) due to the implicit max/minint constraints. Feel free to implement support for a wider class of constraints but note that it will make reason generation more complicated. For your specific case, you should just introduce a variable and assign it to a fixed value. If there is no crazy amount of fixed values, then there should be almost no performance impact. The propagation will be the same in any case. PS: I don't think this is a bug (but a wider class of supported constraints is always nice). I am going to remove myself as an assignee because I won't touch this. |
@rkaminsk Thanks a lot, I just added you s.t. you get the notification 😄 |
It's a bit messy. But there are some ways to test if something is an integer.
PS @MaxOstrowski: The @-syntax is better in this case. An assignee is probably the one to implement this. 😉 I am also watching clingcon now. So I will see all new issues. |
Neither using
|
So
|
You cannot use var_or_int(1).
var_or_int("a").
is_int_arith(V+X) :- var_or_int(V), X=0.
is_var_arith(V) :- var_or_int(V), not is_int_arith(V).
is_int_comp(V) :- var_or_int(V), -2147483648<=V, V<=2147483647.
is_var_comp(V) :- var_or_int(V), V>2147483647.
is_var_comp(V) :- var_or_int(V), V<-2147483648. |
See potassco/clingo#218. |
Would it be possible to allow for integers directly in the start times of the disjoint constraints ?
I my general encoding I sometimes get instances where one of the start times is already set to a specific value, resulting in the grounding:
&disjoint{(0@1),c19988,0; ("X_INTRODUCED_623_"@17),c19988,1; ("X_INTRODUCED_626_"@1),c19988,2; ("X_INTRODUCED_677_"@1),c19988,3; ("X_INTRODUCED_683_"@1),c19988,4}.
which results in the ambigious error:
*** ERROR: (clingcon): Invalid Syntax: invalid disjoint statement
The text was updated successfully, but these errors were encountered: