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

Renaming discrete variables during structural simplification (plus refactoring tearing_reassemble) #3379

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

vyudu
Copy link
Member

@vyudu vyudu commented Feb 10, 2025

This PR does two things:

  1. Previously the difference equations for discrete systems were things like Shift(t, 1)(Shift(t, -1)(x(t)). This PR changes it to follow the ODE convention of creating a dummy variable x_{t-1}, such that the equation is Shift(t, 1)(x_{t-1}(t))
  2. tearing_reassemble has been chunked a bit. Have added some comments to SystemStructure and TearingState as well

@vyudu
Copy link
Member Author

vyudu commented Feb 10, 2025

@AayushSabharwal

@vyudu vyudu marked this pull request as draft February 11, 2025 00:23
@vyudu vyudu marked this pull request as ready for review February 13, 2025 20:48
@vyudu
Copy link
Member Author

vyudu commented Feb 14, 2025

@AayushSabharwal @ChrisRackauckas this one is ready to review

@ChrisRackauckas
Copy link
Member

I think this looks fine, but I'm not entirely sure what makes this required?

Copy link
Member

@AayushSabharwal AayushSabharwal left a comment

Choose a reason for hiding this comment

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

Overall the refactor is great for code quality. However, since it's aimed at code quality I've been picky about wanting docstrings for everything. In addition, some parts are not clear or seem to have bugs which need to be fixed. It would also be great to get tests to make sure symbolic indexing works properly for both Shift(t, -1)(x) and x_{k-1} form of variables.

@vyudu vyudu closed this Feb 20, 2025
@vyudu vyudu reopened this Feb 20, 2025
@vyudu
Copy link
Member Author

vyudu commented Feb 21, 2025

This should be good to merge.

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