Closed LebedevRI closed 1 month ago
These are the offending methods: https://github.com/jump-dev/JuMP.jl/blob/fad385c5aad5b375566914f021e7afc96a204403/src/print.jl#L746-L786
I wonder if we should just drop some bytes, like the REPL does
Sure, that would certainly be an improvement!
I've said it before, and i'll repeat, i think such constraints should be printed as
[x[i] - y[i] for i in 1:100] ∈ MathOptInterface.Nonnegatives(100)
or perhaps
x[1:100] - y[1:100] ∈ MathOptInterface.Nonnegatives(100)
, or something to that effect, just like
x[1] binary
x[2] binary
...
spam really ought to be something like x[1:10] binary
, because that is the output that would be most readable.
(I understand that it is rather not easy to do, however)
I've said it before, and i'll repeat, i think such constraints
JuMP does not store constraints like this, so we cannot (without a lot of effort) print it like this.
I think the bigger issue is that you're trying to use print(model)
as a common debugging aid. It is not intended for that purpose. Print individual constraints perhaps. But rarely the entire model.
@odow thank you!
This issue is quite similar to the issue of printing a model with large number of constraints (#3651), it may produce too much output causing just the same issue described in #3651. Example:
There is no eliding, it will still print the entire constraint even if there's 1000 elements, and in fact it did successfully hand up browser tab with julia's jupyterlab for me.