Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/optlang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
except Exception:
log.error('GLPK is available but could not load with error:\n ' + str(traceback.format_exc()).strip().replace('\n','\n '))

if available_solvers['HIGHS']:
try:
from optlang import highs_interface
except Exception:
log.error('HiGHS is available but could not load with error:\n ' + str(traceback.format_exc()).strip().replace('\n','\n '))

if available_solvers['CPLEX']:
try:
from optlang import cplex_interface
Expand Down Expand Up @@ -69,7 +75,7 @@


# Go through and find the best solver that loaded. Load that one as the default
for engine_str in ['cplex_interface', 'gurobi_interface', 'glpk_interface',
for engine_str in ['cplex_interface', 'gurobi_interface', 'glpk_interface', 'highs_interface',
'hybrid_interface', 'scipy_interface', 'coinor_cbc_interface']:
# Must check globals since not all interface variables will be defined
if engine_str in globals():
Expand Down
Loading
Loading