blubin / JOpt

A simple wrapper for linear and mixed integer program solvers
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Checkin of CPLEX instances missing #26

Closed beyeler closed 4 years ago

beyeler commented 4 years ago

In the method

https://github.com/blubin/JOpt/blob/ebe63dea765f4e344abd45b09359bcac3c654d6e/src/main/java/edu/harvard/econcs/jopt/solver/server/cplex/CPlexMIPSolver.java#L584

a CPLEX instance is checked out but never checked in again. When the max number of CPLEX instances is reached the program waits for an instances returned to the CPLEXInstanceManager which will never happen.

blubin commented 4 years ago

Yes, looks like a bug. The instance should be released at the end of the call in a "finally" block... A PR would be welcomed.

islerfab commented 4 years ago

I pushed a fix, thanks @beyeler for pointing it out. The easiest is always a PR on the "develop" branch, but that way it was quick as way.

Release v1.4.2 is initiated, and will be online in the next few minutes/hours.