Skip to content

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

Description

@DannyGeist

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

Activity

  1. zayenz commented on Jan 15, 2025

    @zayenz

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

  2. DannyGeist commented on Jan 15, 2025

    @DannyGeist
    Author

    No. -O5 is slow on big mzn models

  3. guidotack commented on Mar 5, 2025

    @guidotack
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions