Originally posted by: SystemAdmin
[Sylvain said:]
I have another code that might help understanding the problem I am facing:
IloEnv env;
IloSolution sol;
IloIntVarArray X;
for(IloInt i = 0; i < 4; i++) {<br /> env.out() << env.getTotalMemoryUsage() << endl;<br /> X = IloIntVarArray(env, 100, 1, 100);
env.out() << env.getTotalMemoryUsage() << endl;<br /> sol = IloSolution(env);
env.out() << env.getTotalMemoryUsage() << endl;<br /> sol.add(X);
env.out() << env.getTotalMemoryUsage() << endl;<br /> sol.end();
env.out() << env.getTotalMemoryUsage() << endl;<br /> X.end();
}
This code returns:
16032
24048
28056
36072
36072
36072
40080
40080
40080
40080
40080
48096
48096
48096
48096
48096
52104
52104
52104
52104
The memory keeps increasing I guess because of the creation of new variables even though I am deleting them at the end of the loop.
I am using Ilog Concert 2.3.
#CPOptimizer#DecisionOptimization