-
Notifications
You must be signed in to change notification settings - Fork 86
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
Question about how to do something #538
Comments
This program should create 5 (rather large rules) rules. If you really need to choose from the 5x2000 atoms, then there is not much you can do in a system like clingo. It looks a bit like you have 5 variables and want to assign numbers between 0 and 2000 to them. There is the option to use a logarithmic encoding but those are not nice to write and also have scaling issues. You could also try a constraint solver or maybe an ILP solver. As for constraint solvers, we have the clingcon system, which accepts programs like this:
I cannot follow here. |
Thank you for answering.
I tried:
To generate dynamically on new element when something like But it seemed that using an aggregate like this generate too many rules. If i have numbers like this n(0;4;5;7) and m(a;c;e;g), they have the same cardinality so, can i with obtain only {q(0,a) q(4,c) q(5,e) q(7,g)} not using aggregate, using the natural order on the natural number and on the arguments names ? Thus i wouldn't need an aggregate. But it seems the problem is already solved with something like &dom { 0..2000 } = q(N) :- N=1..5 ! |
This approach works but it is very slow since i create so many rules !
Would it be possible to spawn things incrementally like the remaining node that should connect to node a ?:
q(2,node,y) q(3,node,z) q(4,node,p) q(5,node,q) and where the order of the derivations isn't important.
I am not sure it make sense to try to do this like this with clingo, however i thank you in advance.
The text was updated successfully, but these errors were encountered: