Not sure this is something that can be fixed just because of the way ruby works. But I've noticed in situations where you might collect a set of vars and sum them to be part of an inequality, if the set is empty the lib fails to create the constraint.
vars = [] # this might not be empty some of the time
model.add(vars.sum <= 2)
This fails because the sum contains no variables which means that the sum totals to zero, and you end up with a model.add(true).
Not sure this is something that can be fixed just because of the way ruby works. But I've noticed in situations where you might collect a set of vars and sum them to be part of an inequality, if the set is empty the lib fails to create the constraint.
This fails because the sum contains no variables which means that the sum totals to zero, and you end up with a model.add(true).
It does how ever work in the python lib.