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 callable parameters #2995

Merged
merged 3 commits into from
Sep 21, 2024

Conversation

AayushSabharwal
Copy link
Member

@AayushSabharwal AayushSabharwal commented Aug 28, 2024

Close #2910

Requires JuliaSymbolics/Symbolics.jl#1270 and JuliaSymbolics/SymbolicUtils.jl#648

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.

@AayushSabharwal AayushSabharwal marked this pull request as draft August 28, 2024 11:52
@AayushSabharwal
Copy link
Member Author

Draft while the issues outlined in the root comment are being worked on

@AayushSabharwal AayushSabharwal force-pushed the as/callable-params branch 2 times, most recently from ab2788f to 38bb43c Compare September 19, 2024 05:07
@AayushSabharwal AayushSabharwal marked this pull request as ready for review September 19, 2024 05:07
@ChrisRackauckas ChrisRackauckas merged commit 90e6398 into SciML:master Sep 21, 2024
23 of 25 checks passed
@AayushSabharwal AayushSabharwal deleted the as/callable-params branch September 21, 2024 07:52
@cstjean
Copy link
Contributor

cstjean commented Oct 2, 2024

If I introduce

@parameters begin
     fn(::Real) = _f1   # taken from this PR's test
end

inside of my @mtkmodel, I get

AssertionError: Multiple independent variables are used in the model

Is that expected? Callable parameters are not yet supported inside @mtkmodel?

@AayushSabharwal
Copy link
Member Author

Yeah @mtkmodel uses its own variable parsing for some reason. Open an issue? I'll try and figure this out.

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.

Support for callable parameters in IndexCache
3 participants