Skip to content

Commit b4b1502

Browse files
committed
add tests with lp amd milp capabilities
1 parent 90adbf4 commit b4b1502

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

pyomo/solvers/plugins/solvers/cuopt_direct.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def __init__(self, **kwds):
4848
kwds['type'] = 'cuoptdirect'
4949
super(CUOPTDirect, self).__init__(**kwds)
5050
self._python_api_exists = True
51+
# Note: Undefined capabilities default to None
52+
self._capabilities.linear = True
53+
self._capabilities.integer = True
5154

5255
def _apply_solver(self):
5356
StaleFlagManager.mark_all_as_stale()

pyomo/solvers/tests/solvers.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,23 @@ def test_solver_cases(*args):
426426

427427
logging.disable(logging.NOTSET)
428428

429+
#
430+
# CUOPT
431+
#
432+
_cuopt_capabilities = set(
433+
[
434+
'linear',
435+
'integer',
436+
]
437+
)
438+
439+
_test_solver_cases['cuopt', 'python'] = initialize(
440+
name='cuopt_direct',
441+
io='python',
442+
capabilities=_cuopt_capabilities,
443+
import_suffixes=['rc'],
444+
)
445+
429446
#
430447
# Error Checks
431448
#

0 commit comments

Comments
 (0)