[gecode-users] thanks very much

Christian Schulte cschulte at kth.se
Fri Feb 3 16:09:26 CET 2012


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: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Matthew Kitching
Sent: Friday, February 03, 2012 4:04 PM
To: users at gecode.org
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20120203/c2ee7ce2/attachment.htm>


More information about the users mailing list