-
Notifications
You must be signed in to change notification settings - Fork 57
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
Refactor linear/quadratic model handling #320
Conversation
Codecov Report
@@ Coverage Diff @@
## master #320 +/- ##
==========================================
+ Coverage 87.80% 91.39% +3.58%
==========================================
Files 3 4 +1
Lines 697 732 +35
==========================================
+ Hits 612 669 +57
+ Misses 85 63 -22
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it's simpler in a separate file. Having it in MOI as an MOI layer would be a good move as well. It can be in the NLP MOI module that is subject to change.
Nice reduction in allocations: Current julia> @time bench_opf_acp(; case = "pglib_opf_case2000_goc.m")
# [ ... ]
FEASIBLE_POINT
13.729058980941772
15.410575 seconds (21.57 M allocations: 946.675 MiB, 5.64% gc time)
(nlp-jump-examples) pkg> st
Status `~/Documents/lanl-ansi/nlp-jump-examples/Project.toml`
[f6369f11] ForwardDiff v0.10.30
[b6b21f68] Ipopt v1.0.3
[4076af6c] JuMP v1.1.1
[6fe1bfb0] OffsetArrays v1.12.6
[c36e90e8] PowerModels v0.19.5
[47a9eef4] SparseDiffTools v1.24.0
[684fba80] SparsityDetection v0.3.4
[0c5d862f] Symbolics v4.7.0
[8bb1440f] DelimitedFiles
[37e2e46d] LinearAlgebra This PR julia> @time bench_opf_acp(; case = "pglib_opf_case2000_goc.m")
# [ ... ]
FEASIBLE_POINT
12.106645822525024
14.401220 seconds (15.76 M allocations: 915.635 MiB, 2.07% gc time, 9.35% compilation time)
(nlp-jump-examples) pkg> st
Status `~/Documents/lanl-ansi/nlp-jump-examples/Project.toml`
[f6369f11] ForwardDiff v0.10.30
[b6b21f68] Ipopt v1.0.3 `~/.julia/dev/Ipopt`
[4076af6c] JuMP v1.1.1
[6fe1bfb0] OffsetArrays v1.12.6
[c36e90e8] PowerModels v0.19.5
[47a9eef4] SparseDiffTools v1.24.0
[684fba80] SparsityDetection v0.3.4
[0c5d862f] Symbolics v4.7.0
[8bb1440f] DelimitedFiles
[37e2e46d] LinearAlgebra |
I started looking at how we can make in-place resolves of Ipopt fast, but it got tricky because the linear/quadratic components are messy.
At some point, we can refactor the
utils.jl
file into MOI to solve: jump-dev/MathOptInterface.jl#1397