Originally posted by: WJvanHoeve
Hi,
I am porting older ILOG Solver 6.4 code to CPO, version 12.3.
The code uses set variables and a custom global constraint on a set variable. I have been able to adapt the code using the information in cpext.h, but during compilation I get the following error:
sumfree.o: In function `IlcSumFreeCstI::propagate()':
sumfree.cpp:(.text+0x49): undefined reference to `IlcCPOIntSetVar::_isInProcess() const'
The code that is referred to is the following (here var is of type IlcIntSetVar):
void IlcSumFreeCstI::propagate() {
if (!var.isInProcess()) // this is not accepted apparently
return;
for (IlcIntSetVarDeltaIterator iter1(var, IlcRequiredIteration); iter1.ok(); ++iter1) {
IlcInt val1 = *iter1;
for (IlcIntSetVarIterator iter2(var, IlcRequiredIteration); iter2.ok(); ++iter2) {
IlcInt val2 = *iter2;
var.removePossible(val1 + val2);
var.removePossible((IlcInt)abs(val1 - val2));
}
}
}
Could you please suggest how isInProcess() should be ported to CPO for IlcIntSetVar?
Thank you,
Willem
#CPOptimizer#DecisionOptimization