[gecode-users] Assign or Branch

Mikael Zayenz Lagerkvist lagerkvist at gecode.org
Mon Jan 18 19:13:06 CET 2010


On Mon, Jan 18, 2010 at 6:16 PM, Vincent Barichard
<Vincent.Barichard at univ-angers.fr> wrote:
> I wondered what are the differences between "branch(home, x, INT_VAR_NONE, INT_VAL_MIN)" and "assign(home,x,INT_ASSIGN_MIN)"?
> In the documentation, it is said that after an assignment has been done, the next assignment will be done only after the effect of the previous assignment has been propagated. Is it only meaningful during recomputation? Until now I used branch, should I use assign instead ?

The assign function adds a unary branching, that is, it will not
reconsider other values for a variable on backtrack.

Unary branchings are typically used to assign values to variables when
another branching has finished an one knows that the problem is
feasible, but not what some exact values will be. For example,
scheduling applications often use a branching that orders all tasks.
When the tasks are ordered, they can be assigned to their first
possible starting time.


> Just one more little thing, in section 9.2.2, I think it should be "branch(home, x, INT_VAR_NONE, INT_VAL_MIN)" instead of "branch(home, x, INT_VAR_NONE, INT_VAR_MIN)"?

Thanks for spotting it. I've fixed that now.

Cheers,
Mikael

-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/



More information about the users mailing list