Hi Matthew,
Cloning is just fine and, in fact, even when using branchers, choices, etc the necessary search would still use cloning. This issue is that you always want to start from the same node (or state). Hence you will have to clone, no matter what. Best Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ From: [email protected] [mailto:[email protected]] On Behalf Of Matthew Kitching Sent: Friday, February 03, 2012 4:04 PM To: [email protected] Subject: [gecode-users] thanks very much Thanks very much for your previous answers. They were very helpful. I just wanted to have someone double check that I am using gecode correctly. The goal is to assign every value-variable combination as a preprocessing step, and collect data on the domain reduction on FlatZinc instances. Basically, I for every value, I am doing the following code for variableIndex and valueIndex: FlatZinc::FlatZincSpace* newProblem =(FlatZinc::FlatZincSpace*)( problem->clone()); rel(*newProblem ,newProblem ->iv[variableIndex ],IRT_EQ,valueIndex,ICL_DEF); newProblem->status(); My question is whether cloning the problem each time is the best course of action? I am avoiding branching and choices, although I am not sure whether cloning the problem is more expensive than creating branchers and choices, and using them instead? Thanks again, Matthew
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
