Mauricio Toro wrote:

Hello,

I looked at 
http://www.gecode.org/gecode-doc-latest/group__TaskModelIntRelBool.html
and it was very helpful, but I could not find how to port the function bool_not

void bool_not_boolvar_boolvar_intconlevel(Space *home, BoolVar *b0, BoolVar *b1, IntConLevel icl)
{
Gecode::bool_not(home, *b0, *b1, icl); --> it was used this way on gecode 1.3.1
}

BOT_NOT is not declared, as BOT_AND, BOT_OR, etc.

You can use IRT_NQ.

In the other hand, this works fine:

//Gecode::bool_and(home, *b0, *b1, *b2, icl); --> it was used this way on gecode 1.3.1
  Gecode::rel(home,*b0, BOT_AND, *b1, *b2, icl,pk);

But, I can not find an equivalent function for this one: (notice that b2 type is bool)


void bool_and_boolvar_boolvar_bool_intconlevel(Space *home, BoolVar *b0, BoolVar *b1, bool b2, IntConLevel icl,PropKind pk=PK_DEF)
{
Gecode::bool_and(home, *b0, *b1, b2, icl); --> it was used this way on gecode 1.3.1
  // ???
}

There is
Gecode::rel (Space *home, BoolVar x0, BoolOpType o, BoolVar x1, int n, IntConLevel icl=ICL_DEF,PropKind pk=PK_DEF) Just use 0 for false and 1 for true as usual (implicit casts should do it automatically).

Thank you very much

You're welcome!

Guido

_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to