jump-dev / MathOptInterface.jl

A data structure for mathematical optimization problems
http://jump.dev/MathOptInterface.jl/
Other
380 stars 86 forks source link

Add function to summarize model "size"? #2504

Closed ericphanson closed 2 months ago

ericphanson commented 2 months ago

This came up in https://github.com/jump-dev/Convex.jl/pull/643; it would be nice to have some kind of summary of model size (# scalar variables, constraints, coefficients) easily accessible, so Convex.jl users can get a summary of the final formulation. I think being able to print some stats is a convenient way to get a glimpse into this (and something we could potentially surface automatically via printing in Convex.jl, which would led users build intuition for the final model without having to necessarily seek it out). Something like a full summary of all the cones used, their sizes, etc, could be useful too (but possibly too verbose for some use-cases).

odow commented 2 months ago

Yeah I quite like a default show, like we do for JuMP.