Originally posted by: eibanez
Hi,
This is my first post and I hope it is in the right place!
I am developing and application that involves solving a large number of LP instances that vary just slightly. The problem is that because I am doing this so many times, I end up running out of memory every time.
I am pretty sure that this increase in memory use comes from the fact that the model is being changed after it has been extracted.
The following is the basic structure of my program:
-
Declare cplex variables (env, model, cplex, ranges, var, obj)
-
Load mps file in memory
-
Extract model into cplex
-
Begin a loop and each time:
+ Create a IloRangeArray variable with necessary constraints
+ Add constraints to model
+ Solve current model and analyze results
+ Remove constraints from model
+ End constraint variable
What I had it mind is that by removing said constraints the model would return to its original definition and there would be no trace of that change in memory. Apparently this is not true.
Please let me know if you need more insight to help me with this problem.
Thanks very much,
Eduardo
#CPLEXOptimizers#DecisionOptimization