solver_checker.py 227 B

1234567891011
  1. import shutil
  2. from common.exceptions import SolverNotFoundError
  3. def check_solver():
  4. # Check if solver 'ipopt' is on path
  5. solver_path = shutil.which('ipopt')
  6. if not solver_path:
  7. raise SolverNotFoundError