Originally posted by: SystemAdmin
Hello,
I think the first think to do is to check that the memory is indeed consumed by CP Optimizer. If you have not done it, you should try printing the CP Optimizer memory usage in the loop and have a look at the memory consumed by CP Optimizer before the exception is thrown:
IloModel model(env); IloCP cp(model); ....... cp.startNewSearch();
while(cp.next())
{ cp.out() <<
"Memory usage: " << cp.getInfo(IloCP::MemoryUsage) << endl; ......
} cp.end();
If the memory used by CP Optimizer really is the reason for the memory exception, then the answer may depend on what exactly you are doing with the solutions (example: only count them or store them somewhere for some future use). In this case, one thing you could consider doing is to partition the solution space by solving several models that consist of the original model plus some partitioning constraints like (x<=k / x>k).
Philippe
#CPOptimizer#DecisionOptimization