Skip to content
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

Internal error "unexpected absent literal" with nurse.mzn #753

Closed
metaleap opened this issue Nov 21, 2023 · 1 comment
Closed

Internal error "unexpected absent literal" with nurse.mzn #753

metaleap opened this issue Nov 21, 2023 · 1 comment
Labels
bug duplicate resolved Issue is resolved and the feature or fix will be part of next release

Comments

@metaleap
Copy link

MiniZinc IDE 2.8.0, default solver config & settings, happens with all built-in solvers, on a Linux 4.19 machine.

Here's the full nurse.mzn, identical to here except with the .dzn values inlined right into the code:

% Simple nurse rostering
include "regular.mzn";
enum NURSE = Nurse(1..7);
enum DAY = D(1..10);
int: req_day = 3;
int: req_night = 2;
int: min_night = 2;

enum SHIFT = { d, n, o };

enum STATE = { S1, S2, S3, S4, S5, S6 };

array[STATE,SHIFT] of opt STATE: t =
     [|      d:  n:  o:
      | S1:  S2, S3, S1
      | S2:  S4, S4, S1
      | S3:  S4, S5, S1
      | S4:  S6, S6, S1
      | S5:  S6, <>, S1
      | S6:  <>, <>, S1|];

array[NURSE,DAY] of var SHIFT: roster;

constraint forall(j in DAY)(
             sum(i in NURSE)(roster[i,j] == d) == req_day /\
             sum(i in NURSE)(roster[i,j] == n) == req_night
           );
constraint forall(i in NURSE)(
             regular([roster[i,j] | j in DAY], t, S1, STATE) /\
             sum(j in DAY)(roster[i,j] == n) >= min_night
           );

solve satisfy;

Output:

Command: minizinc --json-stream --param-file-no-push /tmp/mzn_AJTOTM.mpc /home/_/c/mz/mztut/2.3.5-nurse-rostering-orig.mzn
Configuration:
{
    "intermediate-solutions": true,
    "output-objective": true,
    "solver": "org.gecode.gecode@6.3.0"
}
MiniZinc has encountered an internal error. This is a bug.
Please file a bug report using the MiniZinc bug tracker.
The internal error message was: 
"unexpected absent literal"
@cyderize
Copy link
Member

This is a duplicate of #752 and will be fixed in the next release. Thanks!

@cyderize cyderize added bug duplicate resolved Issue is resolved and the feature or fix will be part of next release labels Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug duplicate resolved Issue is resolved and the feature or fix will be part of next release
Projects
None yet
Development

No branches or pull requests

2 participants