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

One variable with long long int domain. One constraint. Very very long compile time. #210

Open
DannyGeist opened this issue Jan 15, 2025 · 3 comments

Comments

@DannyGeist
Copy link

var -536870912..536870912: helloworld_str2_cpu_id;
constraint helloworld_str2_cpu_id != 0;
solve satisfy;

@zayenz
Copy link

zayenz commented Jan 15, 2025

Are you compiling with -O5? That mode is dependent on the size of the domains.

@DannyGeist
Copy link
Author

No. -O5 is slow on big mzn models

@guidotack
Copy link
Member

This is due to a limitation in the current FlatZinc text format, which cannot represent domains with holes very well. For this example, it will have to create a text file that lists all the possible domain values, rather than something like this:

var range_list([-536870912..-1,1..536870912]): helloworld_str2_cpu_id;

We don't have a workaround for this bug at the moment. Solvers that are directly interfacing to MiniZinc don't run into this issue (e.g. the MIP solvers). We are planning to introduce range list syntax for FlatZinc in a future release.

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

3 participants