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
2 changes: 1 addition & 1 deletion cpmpy/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ class GCSVerificationException(CPMpyException):

class TransformationNotImplementedError(CPMpyException):
'''Raised when a transformation is not implemented for a certain expression'''
pass
pass
10 changes: 10 additions & 0 deletions cpmpy/expressions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ def is_num(arg):
"""
return isinstance(arg, (bool, np.bool_, cp.BoolVal, int, np.integer, float, np.floating))

def is_np_int(arg):
""" is it an numpy int?
"""
return isinstance(arg, np.integer)

def is_np_bool(arg):
""" is it a numpy bool?
"""
return isinstance(arg, np.bool_)


def is_false_cst(arg):
""" is the argument the constant False (can be of type bool, np.bool and BoolVal)
Expand Down
3 changes: 3 additions & 0 deletions cpmpy/solvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
pumpkin
cplex
hexaly
optalcp
rc2
scip

Expand Down Expand Up @@ -78,6 +79,7 @@
from .pumpkin import CPM_pumpkin
from .cplex import CPM_cplex
from .hexaly import CPM_hexaly
from .optalcp import CPM_optalcp
from .rc2 import CPM_rc2
from .scip import CPM_scip

Expand All @@ -90,6 +92,7 @@
"CPM_gurobi",
"CPM_hexaly",
"CPM_minizinc",
"CPM_optalcp",
"CPM_ortools",
"CPM_pindakaas",
"CPM_pumpkin",
Expand Down
Loading
Loading