Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimosts committed May 27, 2024
1 parent b8fc9d3 commit de5e4e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cpmpy/solvers/gurobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def __init__(self, cpm_model=None, subsolver=None):
Arguments:
- cpm_model: a CPMpy Model()
"""
# if not self.supported():
# raise Exception(
# "CPM_gurobi: Install the python package 'gurobipy' and make sure your licence is activated!")
if not self.supported():
raise Exception(
"CPM_gurobi: Install the python package 'gurobipy' and make sure your licence is activated!")
import gurobipy as gp

# TODO: subsolver could be a GRB_ENV if a user would want to hand one over
Expand Down
5 changes: 0 additions & 5 deletions tests/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,9 @@ def reify_imply_exprs(solver):
yield BOOL_VAR.implies(comp_expr)
yield comp_expr == BOOL_VAR

def verify(cons):
assert cons.value()


def verify(cons):
assert argval(cons)
assert cons.value()


@pytest.mark.parametrize(("solver","constraint"),list(_generate_inputs(bool_exprs)), ids=str)
def test_bool_constaints(solver, constraint):
Expand Down

0 comments on commit de5e4e5

Please sign in to comment.