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

abs should become a global constraint #258

Closed
JoD opened this issue Mar 22, 2023 · 1 comment · Fixed by #357
Closed

abs should become a global constraint #258

JoD opened this issue Mar 22, 2023 · 1 comment · Fixed by #357

Comments

@JoD
Copy link
Collaborator

JoD commented Mar 22, 2023

abs is now considered an operator, so there is no decomposition for it. Contrary to +, '-', 'not', '&', '=', etc., abs is not a fundamental operator used by solver input languages such as CNF or MPS or LP.

So let's make abs a global constraint?

@tias
Copy link
Collaborator

tias commented Jun 13, 2023

From the docs I'm writing, python has operators: +,-,*,//,%
and functions: abs(),sum(),min(),max()
(and I'm ignoring ^, xor here)

Of those, min/max/xor are already globals. You are proposing abs is too, which I do not really object.

But where is the limit? because we also have *,//,%, do you believe they should be globals too?

I'm not sure. For now we've approached it from a very practical perspective: if it has a meaningful 'decompose', then make it a global and implement the decompose.

@Wout4 Wout4 linked a pull request Jun 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants