Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gurobi does not support floordivision #398

Open
Wout4 opened this issue Aug 7, 2023 · 0 comments · May be fixed by #405
Open

gurobi does not support floordivision #398

Wout4 opened this issue Aug 7, 2023 · 0 comments · May be fixed by #405

Comments

@Wout4
Copy link
Collaborator

Wout4 commented Aug 7, 2023

the model below is unsat for gurobi, because it doesn't allow rounding of floordiv (only even numbers are valid for x1 because it gets divided by 2). This is not the expected behavior of floordivision

iv = intvar(-1,3)
x1 = intvar(1,4, name="x1")

cons = [x1 // 2 == iv, x1 == 1]
print(Model(cons).solve('gurobi'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant