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
Right now the code will check whether a variable is rejected on every step of a propagator. This is somewhat of an optimization because it means propagation can stil there immediately.
What if we stop doing that during propagation and only afterwards, once none of the propagator make any changes? Then we could eliminate some of this overhead at the cost of propagating longer than absolutely needed. However, since the changes per space are often rather limited after the first few, this may not be a bad thing considering the overhead of checking for it explicitly right now.
Currently space_propagate will propagate all propagators (low level representation of constraints) until they either reject (when any domain becomes empty the current path to a solution can not lead to a solution and is aborted immediately) or no more changes apply. This does not mean the propagator is solved (like [0,1] == [0,1] but simply that the propagator can't infer any furthe reductions on its own.
All propagators actively check whether vars have become empty. They return a constant to reflect the result of propagating; REJECTED, SOME_CHANGES, NOCHANGES. We could omit this check and simply return whether or not something changed.
It could be that not stopping a failed branch prematurely leads to doing more steps which in turn could outweigh the potential gains of not checking in the first place. This may also simply differ case by case.
Can't outright eliminate rejected checks in propagate because some propagators may need to reject explicitly even though their vars are not EMPTY...
The text was updated successfully, but these errors were encountered:
While investigating this ticket I noticed that there was a redundant layer of isSolved checks. I've eliminated those in #102 and it saves a lot in large data sets.
That PR is not completely doing the things outlined in this ticket so I'm leaving it open for the time being.
Right now the code will check whether a variable is rejected on every step of a propagator. This is somewhat of an optimization because it means propagation can stil there immediately.
What if we stop doing that during propagation and only afterwards, once none of the propagator make any changes? Then we could eliminate some of this overhead at the cost of propagating longer than absolutely needed. However, since the changes per space are often rather limited after the first few, this may not be a bad thing considering the overhead of checking for it explicitly right now.
space_propagate
will propagate all propagators (low level representation of constraints) until they either reject (when any domain becomes empty the current path to a solution can not lead to a solution and is aborted immediately) or no more changes apply. This does not mean the propagator is solved (like[0,1] == [0,1]
but simply that the propagator can't infer any furthe reductions on its own.REJECTED
,SOME_CHANGES
,NOCHANGES
. We could omit this check and simply return whether or not something changed.EMPTY
...The text was updated successfully, but these errors were encountered: