-
-
Notifications
You must be signed in to change notification settings - Fork 232
Enable symbolic remake for optimization problems #1972
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
Enable symbolic remake for optimization problems #1972
Conversation
src/variables.jl
Outdated
""" | ||
$(SIGNATURES) | ||
|
||
Intercept the call to `process_p_u0_symbolic` and process symbolic maps of `p` and/or `u0` if the | ||
user has `ModelingToolkit` loaded. | ||
""" | ||
function SciMLBase.process_p_u0_symbolic(prob::ODEProblem, p, u0) | ||
function SciMLBase.process_p_u0_symbolic(prob::Union{ODEProblem, OptimizationProblem}, p, |
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.
we still need to do a lot more problem types 😓
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.
Why does this function not also cover DEProblem
in full and NonlinearProblem
?
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.
Good question. I think it can. It only expects parameters
and states
to be defined for the underlying system in prob.f
.
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.
What's a DEProblem
?
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.
Do you mean an AbstractDEProblem
?
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.
yes
That's an odd failure I haven't seen before... ? |
Yeah, added a parameter and forgot to change the test. I will fix it. |
test/nonlinearsystem.jl
Outdated
@test prob_.p == [1.1, 1.2, 1.3] | ||
|
||
prob_ = remake(prob, u0 = Dict(sys.y => 2.0), p = Dict(sys.a => 2.0)) | ||
@test_broken prob_.u0 == [1.0, 2.0, 1.0] # TODO: needs a `remake(prob::NonlinearProblem, ...)` in SciMLBase |
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.
remember
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.
Thanks for seeing this through. It's absolutely fantastic to see this completed! |
thx |
Uh oh!
There was an error while loading. Please reload this page.