-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Indexing fixes #408
Indexing fixes #408
Conversation
Co-authored-by: Aayush Sabharwal <[email protected]>
@AayushSabharwal can you check I've got the correct dispatches now for mutating parameters within JumpProblems ensuring |
If this looks ok I'll add some more symbolic tests for integrators and for remake. |
Pull Request Test Coverage Report for Build 8363146682Details
💛 - Coveralls |
function SII.set_parameter!(prob::JumpProblem, val, idx) | ||
ans = SII.set_parameter!(SII.parameter_values(prob), val, idx) | ||
|
||
if using_params(prob.massaction_jump) | ||
update_parameters!(prob.massaction_jump, prob.prob.p) | ||
end | ||
|
||
ans |
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.
While this is technically correct, set_parameter!
will be called once for each parameter which would make this very expensive. I'll PR to SII to add a callback that runs at the end of setp
(finalize_parameters_hook!(prob, ps)
?)
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.
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.
Sounds good. I guess we could also use that for calling reset_aggregated_jumps!
when integrators get updated in callbacks, which means one less thing for users to have to handle.
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.
@AayushSabharwal please ping me when a SII release with that callback is available so I can get this finished -- we need this for making updates to Catalyst for MTK9. Thanks!
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.
It's been released now @isaacsas
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.
Oops, I thought it was merged and would be available. Sorry 😅
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.
Now it's out in 0.3.13
@ChrisRackauckas this hadn't yet been updated for SciML/SymbolicIndexingInterface.jl#58, which is the interface we are supposed to use (and was only merged/released today). I'll open another PR to update this to the correct interface, hopefully later today or tomorrow. |
No description provided.