Comments (5)
We don't recommend print(model)
for large models. But perhaps we should figure out a way to truncate the output.
We don't have any plans to improve the output, like detecting sets and printing stylized models. At one point (many years ago) JuMP used to do that, but it proved too complicated and fragile to maintain.
from jump.jl.
We'd have to decide if truncating printing by default is breaking though.
I'm imagining something like:
function _print_model(io::IO, model::AbstractModel; force::Bool)
N = num_variables(model)
if N > 100 && !force
@warn(
"There a $N variables in the model. Printing may produce an " *
"undesirably large amount of output. To force printing, use " *
"`print(model; force = true)`"
)
return
end
from jump.jl.
Right, lossily truncating the output is of course not always wanted.
I understand that this issue is rather a nitpick.
I'm imagining something like:
This should also count number of constraints perhaps.
from jump.jl.
Here are some related issues where we have discussed this previously #3574, #2171, #795
I think the issue is that there is no one-size-fits-all approach to what people want from print(model)
.
What did you want or expect to happen in the original case?
from jump.jl.
I suppose i knew it would be printed the way it did,
but i suppose i would've expected it to be printed in more succinct, non-unrolled, form.
I suppose i should look more into https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/
from jump.jl.
Related Issues (20)
- jump.dev is down HOT 1
- Diagnostics request: using variable in variable container bounds HOT 4
- && and || do not short-circuit in macros HOT 3
- Add support for MOI.ScalarQuadraticCoefficientChange
- Tools to test JuMP models
- NumFOCUS: GSoC 2024 Update HOT 1
- Error vcat(::NonlinearExpr, ::VariableRef, ::Float64) HOT 5
- Increase performance of SOC constraints HOT 4
- Iterating SparseAxisArray does not preserve order HOT 4
- How to improve the speed to build a complex model? HOT 2
- Coefficients of complex variables created with a GenericModel are always Float64
- LinearAlgebra.hermitian is incorrect
- *(::Real, ::Hermitian) is not hermitian HOT 5
- Cannot `convert` an object of type Float64 to an object of type JuMP.NonlinearExpr HOT 3
- Documentation Request: List whether a solver supports Indicator Constraints HOT 4
- Bullet point alignment in bibliography HOT 9
- Multiplication of matrix expression and variables leads to stack overflow and matmul error HOT 4
- Multiple Ranges for variables HOT 3
- Y' when Y is of type ::Matrix{NonlinearExpr} HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jump.jl.