[gecode-users] constraints on solved spaces

stanio at cs.tu-berlin.de stanio at cs.tu-berlin.de
Mon Feb 4 21:26:51 CET 2008


Hello to all, 

A question:

When I post a constraint on a solved space, it seems to be not
always propagated ... And this _not_always_ is what I am
worrying about - I want to know what is the rule. What I
mean is prety much like this:
---- code -----
int
get_weight(){
	IntVar weight(this, 0, Limits::Int::int_max);
	linear(this, this->vars, IRT_EQ, weight);
	/* 
	   this->status();
	 */
	return weight.val();
}
---- code -----

I invoke this function like 
	solved_space->get_weight()
from within the constrain() function (for BAB search). 
Without the line 
	   this->status();
I experienced assertion fault due to weight.max() !=
weight.min() : max, min remained the same as at the time of
initialization of weight.

Then I added the commented line and it worked fine. 

But... I have another function I invoke on solved spaces,
which workes fine without the status() invocation.

What do I have to know about constraints on solved spaces?
Could you short explain, or give a hint for reading?

Thank you in advance for your support!

greetz
stanio_




More information about the gecode-users mailing list