Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minizinc: variable order

A constraint model may have restrictions or provide hints to the constraint solver to solve the problem more efficiently by defining the order in which variables are solved for. Is there a mechanism to specify the order in which variables need to solved in MiniZinc or FlatZinc ?

like image 297
user3483760 Avatar asked Dec 02 '25 01:12

user3483760


1 Answers

int_search/4 is used for search annotation, i.e. for stating the involved variables and the variable/value strategies.

Example:

solve :: int_search(q, first_fail, indomain_min, complete) satisfy;

See more about this in the MiniZinc tutorial (section 5.2): http://www.minizinc.org/downloads/doc-latest/minizinc-tute.pdf The FlatZinc specification has a detailed list of the different strategies: http://www.minizinc.org/downloads/doc-1.6/flatzinc-spec.pdf (section 5.6.1).

like image 197
hakank Avatar answered Dec 06 '25 10:12

hakank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!