Skip to content

Commit

Permalink
fix UnboundLocalError: cannot access local variable 'mip' error
Browse files Browse the repository at this point in the history
  • Loading branch information
chopin57otu committed Jul 31, 2024
1 parent 0ccb811 commit 6ef67a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mip/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def __init__(

self.solver = mip.cbc.SolverCbc(self, name, sense)
self.solver_name = mip.CBC
else:
import mip

# list of constraints and variables
self.constrs = mip.ConstrList(self)
Expand Down

0 comments on commit 6ef67a6

Please sign in to comment.