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
Describe the bug
Consider the following MiniZinc model:
var -100.0..100.0: x;
var -100.0..100.0: y;
constraint 2 * x + 3 * y >= 10;
solve satisfy;
When I run Choco on this model in MiniZinc IDE, it crashes with the following stacktrace:
%% Choco 231102
line 1:44 mismatched input '.' expecting {',', ']'}
Exception in thread "main" java.lang.UnsupportedOperationException: Parameter#buildArray ARRAY: unexpected type for X_INTRODUCED_2_
at org.chocosolver.parser.flatzinc.ast.FParameter.buildArray(FParameter.java:162)
at org.chocosolver.parser.flatzinc.ast.FParameter.make_parameter(FParameter.java:49)
at org.chocosolver.parser.flatzinc.Flatzinc4Parser.param_decl(Flatzinc4Parser.java:1168)
at org.chocosolver.parser.flatzinc.Flatzinc4Parser.flatzinc_model(Flatzinc4Parser.java:212)
at org.chocosolver.parser.flatzinc.Flatzinc.parse(Flatzinc.java:199)
at org.chocosolver.parser.flatzinc.Flatzinc.buildModel(Flatzinc.java:152)
at org.chocosolver.parser.flatzinc.ChocoFZN.main(ChocoFZN.java:27)
It looks like the line array [1..2] of float: X_INTRODUCED_2_ = [-2.0,-3.0]; in generated flatzinc representation kills the parser. When I change the variables to ints it works. Environment (please complete the following information):
Choco-solver 4.10.14 (I found no related commits since the release, so the bug is probably still around)
MiniZinc IDE 2.8.4
JRE 22.0.1
Windows 10
The text was updated successfully, but these errors were encountered:
Sadly, no, it requires to update the parser in order to support float variables and float constraints declaration.
It is probably not too difficult, a copying-and-pasting strategy could be applied, but I already have two projects underway.
Describe the bug
Consider the following MiniZinc model:
When I run Choco on this model in MiniZinc IDE, it crashes with the following stacktrace:
It looks like the line
array [1..2] of float: X_INTRODUCED_2_ = [-2.0,-3.0];
in generated flatzinc representation kills the parser. When I change the variables to ints it works.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: