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: use observed equations for guesses of observed variables #3137

Merged
merged 1 commit into from
Oct 24, 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.

@mtkbuild sys = ODESystem(
[D(x) ~ x + t, y ~ 2x + 1], t; initialization_eqs = [x^3 + y^3 ~ 1])
isys = ModelingToolkit.generate_initializesystem(sys)
@test isequal(defaults(isys)[y], 2x + 1)
Copy link
Member

Choose a reason for hiding this comment

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

but in this case x doesn't have a guess, so how would it work?

Copy link
Member Author

Choose a reason for hiding this comment

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

The system wasn't meant to be solved, just to ensure that y has a guess using the observed equation.

Copy link
Member

Choose a reason for hiding this comment

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

I see but it's still not solvable?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add a guess for x but I don't see how that helps the test 😅 the initializationsystem won't be solved during the test anyway

@ChrisRackauckas ChrisRackauckas merged commit 0d72940 into SciML:master Oct 24, 2024
32 of 39 checks passed
@AayushSabharwal AayushSabharwal deleted the as/observed-guesses branch October 24, 2024 05:21
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.

2 participants