New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option variables cause undefined translated variables or other errors #133

Closed
edbarton1 opened this Issue Jan 25, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@edbarton1

edbarton1 commented Jan 25, 2017

The attached file fjs1.mzn is a variation on a flexible jobshop example from somewhere, with specific data added and a data flag to say whether to use disjunctive or cumulative.

fjs1.zip

When I try to run it under MiniZinc 2.1.2 with the or-tools solver, which has a var opt implementation for disjunctive, the generated flatzinc contains references to undefined variables:

$ mzn-ortools fjs1.mzn -Duse_disjunctive=true
Error: syntax error, unexpected IDENTIFIER in line no. 1
Unknown symbol X_INTRODUCED_6
Check failed: v.defined
Aborted (core dumped)
$ mzn-ortools fjs1.mzn -Duse_disjunctive=false
S = array1d(Task,[2, 0, 2]);
D = array1d(Task,[3, 2, 3]);
O = array2d(Task,Machine,[2, <>, 0, <>, <>, 2]);

With a different solver, I can run either variant (presumably there is no var opt implementation there).
$ mzn-chuffed fjs1.mzn -Duse_disjunctive=false
S = array1d(Task,[0, 3, 2]);
D = array1d(Task,[3, 2, 3]);
O = array2d(Task,Machine,[0, <>, 3, <>, <>, 2]);

$ mzn-chuffed fjs1.mzn -Duse_disjunctive=true
S = array1d(Task,[2, 0, 2]);
D = array1d(Task,[3, 2, 3]);
O = array2d(Task,Machine,[2, <>, 0, <>, <>, 2]);

If I change it to use "let" variables, I get a different error:
$ mzn-ortools fjs2.mzn -Duse_disjunctive=true
MiniZinc: internal error: no matching declaration found for var_dom
$ mzn-ortools fjs2.mzn -Duse_disjunctive=false
MiniZinc: internal error: no matching declaration found for var_dom
(doesn't seem to matter which solver I use in that case).

fjs2.zip

@guidotack guidotack closed this in 496fb55 Feb 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment