Uuups, the ES_FAILED is a different beast all together! This is what a propagator will return to the kernel to signal failure but finding out which propagator returned it will require hacking the kernel. Frankly, that will require some stamina ;-)
Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Milt Sent: Monday, November 21, 2011 4:11 PM To: [email protected] Subject: Re: [gecode-users] Indexing into arrays Thanks Christian, > ...failing a space does not > stop execution of a space's method (or with other words, does not > throw a > C++ exception or something like that). The reason for that is that it > C++ does > not matter! The code defining the variables, constraints, and > propagators is executed just once initially in order to create the > space for the root node of the search tree. This is cheap. What takes > time is doing constraint propagation (triggered by status()) and this > is terminated immediately when failure occurs. Good...so Gecode is right to keep going after failing the root node because it has to finish setting up the model infrastructure once (to post all of the constraints), but it's very efficient beyond the root node. I'll read further in the branch and search sections of MPG to better understand how and in what order everything executes...that seems to be where I'm fuzziest right now. > I am not sure I understand your second point. After running status() > you should always check whether a space is failed (status() returns > that information). So, when testing why not run status() everytime to > make sure that things are not yet failed? Ok, so I can check for the result from status() e.g., SS_FAILED, rather than just running status() to force propagation. I just read some more of MPG chapter 20 and see there's also ES_FAILED which can be used to determine which propagator failed. I'll give that a shot. Thanks for your help! -Milt _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
