[gecode-users] Question about gecode2
Mohamad Rabbath
rabbath at informatik.uni-freiburg.de
Thu Jan 10 15:38:12 CET 2008
Hey,
i have recently imigrated to gecode 2.0 and i foud the following problem:
There is no refied version for the function :
void Gecode::linear ( Space * home,
const IntArgs & a,
const BoolVarArgs & x,
IntRelType r,
int y,
IntConLevel icl = ICL_DEF,
PropKind pk = PK_DEF
)
or:
void Gecode::linear ( Space * home,
const IntArgs & a,
const BoolVarArgs & x,
IntRelType r,
IntVar y,
IntConLevel icl = ICL_DEF,
PropKind pk = PK_DEF
)
While thie problem is not exited for the version of this function that
deals with IntVar because the function :
void Gecode::linear ( Space * home,
const IntArgs & a,
const IntVarArgs & x,
IntRelType r,
int y,
BoolVar b,
IntConLevel icl = ICL_DEF,
PropKind pk = PK_DEF
)
is already exited.
So if my variables are BoolVarArgs the only way to deal with this is to
convert to IntVar (and the assignment"=" is not available) so the only way
to do it is to use the following trick:
//
BoolVarArgs convertToIntVar(1);
convertToIntVar[0]=BoolVarToConvert;
linear(this, convertToIntVar, IRT_EQ,IntVarToBeConverted);
//
So is it possible to add refied version of the
void Gecode::linear(Space *,const IntArgs & ,const BoolVarArgs &
,IntRelType,int ,IntConLevel icl = ICL_DEF,PropKind pk = PK_DEF)
Best regards.
Mohamad Rabbath
More information about the gecode-users
mailing list