Skip to content
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

feat: support indexing in mixed discrete-continuous systems #53

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.


Return an indexable collection containing the value of all parameters in `p` at time index
`t`. This is useful when parameter values change during the simulation
(such as through callbacks) and their values are saved. `t` is the time index in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t is the time index

This sounds ambiguous, is t time or index?

If it's an index, perhaps we could clarify by calling it ti and say that it's an integer?

Copy link
Member Author

@AayushSabharwal AayushSabharwal Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll refactor it to be i, since that's what we use for time index elsewhere. The only difference is it's the time index in the parameter timeseries

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cc5da90

parameter_values_at_state_time(p, t)

Return an indexable collection containing the value of all parameters in `p` at time
index `t`. This is useful when parameter values change during the simulation (such as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cc5da90

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 38.83%. Comparing base (fdf7ba8) to head (258355e).

Files Patch % Lines
src/parameter_indexing.jl 46.42% 30 Missing ⚠️
src/state_indexing.jl 25.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #53       +/-   ##
===========================================
+ Coverage    0.00%   38.83%   +38.83%     
===========================================
  Files           6        7        +1     
  Lines         236      291       +55     
===========================================
+ Hits            0      113      +113     
+ Misses        236      178       -58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AayushSabharwal AayushSabharwal marked this pull request as ready for review March 7, 2024 11:33
@ChrisRackauckas
Copy link
Member

@ChrisRackauckas ChrisRackauckas merged commit bb5f578 into master Mar 7, 2024
11 checks passed
@ChrisRackauckas ChrisRackauckas deleted the as/discrete-indexing branch March 7, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants