linopy.solvers.Solver.close

Contents

linopy.solvers.Solver.close#

Solver.close()#

Dispose the native solver model and env, releasing any held license.

Only resources created by this instance are disposed; a user-supplied environment is left untouched.

Idempotent, and called automatically when a new solve() replaces this solver, when model.solver is reassigned (e.g. to None), and on garbage collection. After closing, post-solve introspection (solver_model, compute_infeasibilities()) and persistent re-solves are no longer available.