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

integerize contractor and integer solutions #187

Open
dpsanders opened this issue Apr 24, 2021 · 1 comment
Open

integerize contractor and integer solutions #187

dpsanders opened this issue Apr 24, 2021 · 1 comment

Comments

@dpsanders
Copy link
Member

dpsanders commented Apr 24, 2021

Add an integerize contractor as in this code I wrote , discussed in this Discourse post

@cvanaret
Copy link

Great idea!

As I mentioned in an email, you can either:

  • add the integerize() constraint to the system of constraints (like in your example), in which case the integerize contractor is invoked from time to time ;
  • call integerize() in a systematic manner within the generated code of the forward-backward contractor, whenever the range of an integer variable is reduced. This would be the "optimal" way to go to maximize the filtering power. A possibility would be to attach an "integer" tag to a variable upon symbolic definition (e.g. @integer_variables x) and the appropriate code should be generated, for example

begin
(_c, _b, y) = minus_rev(_c, _b, y)
(_b, _a, x) = plus_rev(_b, _a, x)
x = integerize(x)
(_a, x) = exp_rev(_a, x)
x = integerize(x)
end

for the constraint "exp(x) + x - y = 0" with x integer.

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

No branches or pull requests

2 participants