Originally posted by: Falcon_G
Hi everybody
Let say I get he memory usage of IloEnv using getMemoryUsage().
I have the following situation:
1. empty model. MemUsage::16896
2. variables added: MemUsage::915728 (number of vars 14140)
3. objectuve function expression (not obj itself) is created : MemUsage::1142024
4. some constraints are added to an IlorangeArray: MemUsage::1302856
5. some iloexpr are created and put in an array (32200 precisely): MemUsage::5092792
6. If I just decide to make a test, after following I can have :MemUsage::4982792
model.end();
model = IloModel(env);
model.add(m_rng_design);
7. adding IloObj and IloCplex does not occupy more memory and memory remains the same.
8. IloExpr tmp = cx + lag;
obj.setExpr(tmp);
tmp.end();
turns :MemUsage::5212352
NOW: if I invoke:
cplex.clearModel();
cplex.end();
model.remove(obj);
obj.getExpr().end();
it comes back to the more or less same MemUsage::4982792.
BUT if I inolve IloCPlex::Solve()
Then memory usage becomes :MemUsage::5556752
and with all:
cplex.clearModel();
cplex.end();
model.remove(obj);
obj.getExpr().end();
it becomes MemUsage::5209432
and never goes back to MemUsage::4982792.
I have no idea where this memory is occupied.
Moreover, I seek solution NOT proposing to use IloEnv::end().
I appreciate any constructive comment.
Thank you in avance
#CPLEXOptimizers#DecisionOptimization