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

Update the lib with @mtkmodel #29

Merged
merged 3 commits into from
Feb 23, 2024
Merged

Update the lib with @mtkmodel #29

merged 3 commits into from
Feb 23, 2024

Conversation

ven-k
Copy link
Contributor

@ven-k ven-k commented Feb 11, 2024

This PR updates the lib with @mtkmodel DSL.

  • The API remains same, except for ShiHeart; LV_V₀ is now LV.V₀ and all args follow the same pattern. As subcomponent args can be accessed with A.B syntax, this change is introduced.
  • In tests, "Shi Model - Complex" is updated with a mtkmodel based circulatory system.
  • Compliance, VariableCompliance, Elastance and ShiValve will be updated with a follow up PR. The first three need a way to set default values to conditional parameters and ShiValve needs a way to set continuous_events. PRs adding both are currently open upstream. Once they are merged I'll update them here.

@codecov-commenter
Copy link

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (69e70b7) 44.07% compared to head (98cc2b6) 43.75%.

Files Patch % Lines
src/CirculatorySystemModels.jl 10.63% 42 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   44.07%   43.75%   -0.33%     
==========================================
  Files           1        1              
  Lines         422      144     -278     
==========================================
- Hits          186       63     -123     
+ Misses        236       81     -155     

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

@ven-k
Copy link
Contributor Author

ven-k commented Feb 11, 2024

The earlier syntax of extending components was @extend = var1, var2 = Component(). In a later version of MTK, that was changed to @extend Component(). This later version must have Julia compat as 1.9. So the CI has failed with 1.8.

Shall I update CI to 1.9, 1.10 (current latest) and nightly?

Also, the error on nightly is unrelated to this PR.

@TS-CUBED
Copy link
Owner

Thanks a lot for this. I had this on my todo list before Christmas, but put it on the back burner, because I did not know how to handle the conditionals. I will merge this PR now and once the other elements are adapted and MTK 9 has been tested with this (I hope to get to that in March), will release a new version.

@TS-CUBED TS-CUBED merged commit 9f8cfff into TS-CUBED:main Feb 23, 2024
2 of 6 checks passed
@TS-CUBED
Copy link
Owner

Compliance, VariableCompliance, Elastance and ShiValve will be updated with a follow up PR. The first three need a way to set default values to conditional parameters and ShiValve needs a way to set continuous_events. PRs adding both are currently open upstream. Once they are merged I'll update them here.

I haven't followed upstream recently due to other commitments. Do we have these features (conditional parameters/branching, and continuous events) in the @mtkmodel framework?

@ven-k
Copy link
Contributor Author

ven-k commented Jul 7, 2024

Yes; those features are now part of MTK@v9+.

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