pycpx
pycpx copied to clipboard
Huge mem leak
I noticed a memory leak that occurs when you solve many independent LPs in a row.
Reproduce:
Simply run (say) the first example from the web site 10.000 times (and kill it before your ram isexhausted and your system becomes unresponsive):
import numpy as np
from pycpx import CPlexModel
for i in range(10000):
A = np.array([[1,0,0], [1,1,0], [1,1,1]])
b = np.array([1,2,3])
m = CPlexModel()
x = m.new(3)
t = m.new()
m.constrain( abs((A*x - b)) <= t)
m.minimize(t)
I'm on pycpx 0.3 and cplex 12.6.1.
Found the same issue. Hopefully this can be solved.