Questions tagged [flatzinc]
10 questions
3
votes
1 answer
reified and half-reified predicates
It has been recently brought to my attention that some recent version of FlatZinc supports half-reified predicates:
Half-reified predicates essentially represent constraints that are implied by a Boolean variable rather than being equivalent to…

Patrick Trentin
- 7,126
- 3
- 23
- 40
2
votes
1 answer
Are half-reified predicates considered part of the standard?
The FlatZinc documentation says that only non-standard predicates must be declared at the top of a FlatZinc model:
Predicates used in the model that are not standard FlatZinc must be declared at the top of a FlatZinc model, before any other lexical…

Patrick Trentin
- 7,126
- 3
- 23
- 40
1
vote
0 answers
MiniZinc-Gurobi different results on the same problem but with different domains variable
I'm a CS student and I'm using Gurobi for a project.
I am here because I have encountered a little problem with the Gurobi solver used along with the MiniZinc driver. In particular I have noticed that Gurobi returns two different solutions on the…

Francesco Contaldo
- 35
- 2
1
vote
1 answer
Do Gecode and G12 (MIP) use infinite precision arithmetic?
I just want to know if both these two MiniZinc solver use infinite precision arithmetic by default.

Francesco Contaldo
- 35
- 2
1
vote
1 answer
What are these `float_div` and `float_times` constraints in the FlatZinc file?
I just tried to run mzn2fzn over the following MiniZinc file:
var float: x1;
var float: y1;
var float: x2;
var float: y2;
constraint (x1 / y1) = 6.0;
constraint x2 * y2 <= 5.0;
solve satisfy;
This is the resulting FlatZinc file:
var…

Patrick Trentin
- 7,126
- 3
- 23
- 40
1
vote
1 answer
How to obtain an exact infinite-precision representation of rational numbers via a non-standard FlatZinc extension?
By default mzn2fzn automatically computes the result of a floating point division within a MiniZinc model, and stores it as a constant float value in the resulting FlatZinc model.
Example:
The file test.mzn
var float: x;
constraint 1.0 /…

Patrick Trentin
- 7,126
- 3
- 23
- 40
1
vote
2 answers
How to propagate set of int domains during mzn2fzn conversion?
I have the following MiniZinc code sample:
include "globals.mzn";
var int: i;
array[-3..3] of var set of 1..10: x;
var set of 1..100: y;
constraint element(i, x, y);
solve satisfy;
output [
show(i), "\n",
show(x), "\n",
show(y),…

Patrick Trentin
- 7,126
- 3
- 23
- 40
1
vote
1 answer
fzn2smt solver answers with `unknown` on tested formulas
The fzn2smt tool allows one to solve flatzinc formulas via Yices.
When I try to run it, the solver answers with UNKNOWN to every formula I test. e.g.:
~$ java -Xmx4096M fzn2smt -ce "./yices-2.5.2/bin/yices -f" -i 2DPacking.fzn…

Patrick Trentin
- 7,126
- 3
- 23
- 40
0
votes
1 answer
How to produce a reified `array_int_maximum` in Flatzinc output?
Given the following minizinc program:
var 0..4: a;
var 0..5: b;
var -5..2: c;
var -8..-3: d;
var 0..8: m;
var bool: r;
constraint r <-> m = max([a,b,c,d]);
solve satisfy;
and the redefinitions-2.0.mzn file
predicate array_int_maximum(var int: m,…

Max Ostrowski
- 575
- 1
- 3
- 15
0
votes
1 answer
What is an instance of Option Type at parsing time?
About option types, the specification of Minizinc (sec. 6.6.3) says:
Overview. Option types defined using the opt type constructor, define types that may or may not be there. They are similar to Maybe types of Haskell implicity adding a new value…

Patrick Trentin
- 7,126
- 3
- 23
- 40