-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] add design patterns tutorial #2812
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2812 +/- ##
=======================================
Coverage 94.26% 94.26%
=======================================
Files 43 43
Lines 5532 5532
=======================================
Hits 5215 5215
Misses 317 317 Continue to review full report at Codecov.
|
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This is great overall. I think it takes the documentation offering to the next level. |
Yeah I'm massively in favor of more involved tutorials like this. I think we can slim-down the number of existing ones in favor of fewer, more in-depth tutorials. |
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
Overall this is really fantastic, I'm very glad I asked this innocuous question and am completely blown away by the fact that within two days this should have generated a tutorial on the docs that I personally have already found super helpful. So thanks @odow, @jd-foster, @rschwarz. One additional section that I would probably try to add is how to use variable and constraint names (in terms of the base_name/String representation) to generate useful printouts of models. I guess those names aren't used a lot in practice and helping get a quick overview of which constraints are in action in a given model would seem like a place for them to shine. I'm happy to try and provide an example of what I have in mind when I have more time over the weekend. But since there is an example of custom printing for the data already, seeing how a model could be printed informatively would seem to be on-topic as well... |
docs/src/tutorials/getting_started/design_patterns_for_larger_models.jl
Outdated
Show resolved
Hide resolved
That's a great addition to the docs! It's not the only way to implement large-scale models, but it's a very good way to do it.
I wouldn't go into that direction, at least from the point of view of a user: I prefer to have specific tutorials instead of large ones that present many topics that are not necessarily that related and could be dealt with separately. |
Great! I've known that this has been a stumbling block for a while, so you finally motivated me to write it. If you have other suggestions or questions, please fire away. We're very receptive of constructive criticism.
This is covered in various parts:
For larger models, however, printing is almost uniformly a bad idea because the printouts become huge. (For various reasons, we don't print the concise algebraic form of the model.) You could potentially do something with the |
Just re-firing the CI. Looks like it got caught in the recent outage of GitHub. |
Thanks for the feedback. |
Motivated by this discussion on Discourse: https://discourse.julialang.org/t/integrating-mathoptinterface-into-an-industry-scale-project-e-g-constraint-management/71943
I think this should be pretty helpful for people wanting to create larger JuMP models. It was definitely a gap in our documentation.
Preview link: https://jump.dev/JuMP.jl/previews/PR2812/tutorials/getting_started/design_patterns_for_larger_models/
Part of #2348