I have a very large model with 10-15M of variables and 10-15M of constraints and I need to run few iterations with some minimal changes in the model. I cache old variables and constraints so I can use in the next iteration. After each iteration finish I used to clear model by Cplex.ClearModel() function, but Cplex.ClearModel() has performance penalty in term of time taken So I want to use Cplex.EndModel(). But in some instances, in the next iteration Cplex throwing below errors when i use Cplex.EndModel() and application is terminated immediately.
"System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' "
"Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException"
I use Cplex 12.6 .NET Conert technology.
Is there any way i can use Cplex.EndModel() to clear my model objects instead of Cplex.ClearModel() as it is taking few minutes which i can't afford.
I found below document in IBM site:
------------------------------
ORE2021
------------------------------
#DecisionOptimization