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
All bin-packing predicates crash when no items are given. For example,
include "bin_packing.mzn";
constraint bin_packing(10, [], []);
results in
/tmp/bin_packing_test.mzn:3.12-34
in call 'bin_packing'
/home/informarte/Software/lib/MiniZincIDE-2.8.7-bundle-linux-x86_64/share/minizinc/std/bin_packing.mzn:18.5-24.7
in call 'assert'
/home/informarte/Software/lib/MiniZincIDE-2.8.7-bundle-linux-x86_64/share/minizinc/std/bin_packing.mzn:20.5-24.6
in call 'assert'
in binary '>=' operator expression
in call 'lb_array'
I would expect the predicates to behave as follows when there are no items:
bin_packing and bin_packing_capa reduce to true
bin_packing_load(load, bin, w) reduces to forall(l in load)(l = 0)
bin_packing_load_fn yields an empty array
Interestingly, cumulative does not suffer from this issue: When there are no tasks, it reduces to true.
The text was updated successfully, but these errors were encountered:
Thank you for bringing this to our attention. Not too long ago, I went over a decent chunk of the global constraints to make sure that they work with “empty” input, but I must have missed these.
All bin-packing predicates crash when no items are given. For example,
results in
I would expect the predicates to behave as follows when there are no items:
bin_packing
andbin_packing_capa
reduce to truebin_packing_load(load, bin, w)
reduces toforall(l in load)(l = 0)
bin_packing_load_fn
yields an empty arrayInterestingly,
cumulative
does not suffer from this issue: When there are no tasks, it reduces to true.The text was updated successfully, but these errors were encountered: