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)
- 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
- Poor performance in complementarity models HOT 23
- Add a method for Complex(a,b) HOT 8
- MethodError with empty summations HOT 1
- Nonlinear subexpressions HOT 4
- Should error when trying to mix `NonlinearExpression` and `GenericNonlinearExpr` HOT 1
- Support normalized_coefficient for vector-valued constraints
- Precompilation in CI fails on v1.22 HOT 7
- Fuzzy search on unrecognized keyword arguments to give suggestions HOT 2
- Track failures on nightly HOT 3
- Possibly missing diagnostics for vector of vector of variables HOT 3
- Printing of large vectorized constraints should probably cause output eliding? HOT 5
- Deleting part of containerized constraints makes whole constraint unprintable HOT 2
- function_string of Symmetric matrix includes the entire matrix HOT 7
- Inequality constraints over symmetric matrices are cumbersome HOT 9
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.