Originally posted by: SystemAdmin
Thanks for the reply.
I do use IloCP cp as an object's argument, and
In the code, I had defined some constant to which no value had been assigned. I corrected this mistake, and now I returns no empty class error. However, it reports infeasible! Surprisingly, it says "0 Variables", while I do have some variables.
Please see what it returns in the console:
!
! Satisfiability problem - 0 variables, 20 constraints
! Problem found infeasible at the root node
!
! Search terminated normally, model has no solution.
! Number of branches : 0
! Number of fails : 3
! Total memory usage : 327.2 kB (316.4 kB CP Optimizer + 10.8 kB Concert)
! Time spent in solve : 0.00s (0.00s engine + 0.00s extraction)
! Search speed (br. / s) : 0
Please also see the propagate() as a public member function of the constraint class NoSubtour, where I use the empty handle IloCP cp:
void NoSubtourI::propagate(){
IloInt FirstNode;
IloInt EndNode;
IloCP cp;
for (IloInt i=0; i < successor.getSize()-2; i++){
if (successor[i].isFixed()){
FirstNode=first[i];
first[successor
http://i].getValue().setValue(cp, FirstNode);
EndNode=end[successor
http://i].getValue();
end[i].setValue(cp, EndNode);
successor
EndNode.removeValue(FirstNode);
}
}
}
Well, I had to use IloCP cp there because otherwise it could not identify getValue() and setValue().
Thanks.
#CPOptimizer#DecisionOptimization