I have been trying to explaing this behavior in my c# optimization routine.
The program creates and solves large LPs using the cplex 12.2 API in a subroutine. For the purpose of hunting this bug, I changed it so that it solves the same problem repeatedly. After solving, I call cplex.End() on the instance, and the cplex instance goes out of scope, so the memory will be deallocated.
The second time I create the model and call cplex.Solve(), it does not solve the model. It gives the error: "CPLEX error 1217: No Solution Exists", which is not so credible since it solved the same problem the first time. (memory requirements at the moment of the crash were just 1.3 GIG)
Now, if I force a garbage collect between the two solves, cplex solves the model the second time as it did the first time.
Can anyone explain this behavior to me? And the way to properly fix it?