Mark Law

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Clingo 4 Tips and Tricks #127
    Mark Law
    Participant

    If you have a lot of constraints of the form

    :- #sum{ set(X…) = W } = SX, #sum{ set(Y…) = W2 } = SY, SX < SY.

    they can horribly with all the different values that SX and SY could take.

    A better way is to it like this:

    :- #sum{ set(X…)=W, set(Y…)= – W2} < 0.

    This doesn’t ground anywhere near as badly and caused a speed up of 40s -> under a second for me in one case.

Viewing 1 post (of 1 total)