You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output variables aren't included in the FlatZinc generated by mzn2fzn (v2.0) if they can be reduced to an equivalent variable.
Example MiniZinc:
var 0..1: x;
var int: y = x;
solve maximize x;
output [show(x), show(y)];
Resulting FlatZinc using mzn2fzn v1.6:
var 0..1: x :: output_var;
var 0..1: y :: output_var = x;
solve maximize x;
Resulting FlatZinc using mzn2fzn v2.0:
var 0..1: x:: output_var;
solve maximize x;
This becomes more of an issue when y reduces to x through a more complex expression, or when the MiniZinc model is itself the result of a generation tool. I.e., when the relationship between equivalent variables is unclear, and one of them is not included in the FlatZinc, deciphering the output of the FlatZinc solver can become difficult.
The text was updated successfully, but these errors were encountered:
This is expected behaviour. You can run the FlatZinc output through the solns2out program to generate readable output. We will change this behaviour slightly in an upcoming update so that variables defined by functions are retained in the FlatZinc, but aliased variables (i.e. two variables that are equal) will be removed, because they can actually lead to performance problems in the solver.
Output variables aren't included in the FlatZinc generated by mzn2fzn (v2.0) if they can be reduced to an equivalent variable.
Example MiniZinc:
Resulting FlatZinc using mzn2fzn v1.6:
Resulting FlatZinc using mzn2fzn v2.0:
This becomes more of an issue when
y
reduces tox
through a more complex expression, or when the MiniZinc model is itself the result of a generation tool. I.e., when the relationship between equivalent variables is unclear, and one of them is not included in the FlatZinc, deciphering the output of the FlatZinc solver can become difficult.The text was updated successfully, but these errors were encountered: