Originally posted by: Falcon_G
Thank you indeed Daniel.
Thank you also for your hint about the mem leak
This m_model.remove(obj); looks very costly.
It seems like when the model is extracted into the CPLEX instance, then every change needs to be propagated and this sounds to be very costly.
What I found efficient is the following
m_cplex.clearModel();
Therefore, the extracted model is cleared.
I set the obj expression: m_objective.setExpr(m_obj_expr);
and extract again.
This sounds more efficient.
Daniel, are there any ulities in the Concert to detect and iterate over the roaming objects or garbages that can be potentially deleted to manage the memory?
My problem is that the CPLEX instance becomes increasingly heavier over iterations. This I can see from the memory used by the executable process.
I have set env.setDeleter(IloSafeDeleterMode);
to avoid ending the environment (which is a solution to release the memory) but this does not eliminate the whole leak.
#CPLEXOptimizers#DecisionOptimization