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

Refactor: presolving based on structural matrix #620

Open
wants to merge 15 commits into
base: v0.8
Choose a base branch
from

Conversation

fwitte
Copy link
Member

@fwitte fwitte commented Mar 2, 2025

The changes in this PR will be API breaking, therefore it points to the v0.8 branch.

This is becoming a major refactoring, not all things are finally decided

  • All equations can now return a structure_matrix entry, which allows to identify linear dependencies in variables in the presolving.
  • Linear dependent variables (i.e. a couple of pressure values) will automatically be represented by a singe variable, to which all the linear dependents point.
  • The presolver will be able to identify, if users specified
    • more than one value in a set of linear dependent variables
    • have a circular specification in a set of linear dependent variables
    • potentially more things to follow
  • The equations collected from connections, components and buses will be indexed. By this the user
    • can investigate, if an equation returns all zero entries for the jacobian
    • can see, which are the equations applied in the model
    • potentially more things to follow
  • Placing derivatives in the Jacobian is simplified through wrapper functions

The changes will serve as basis for future changes

  • The user can implement custom variables into their problem
  • A structural analysis of the problem through a dependency matrix will be possible (are there any separated parts in the matrix, also see Solve of isolated parallel networks #612)
  • Power connections (a new connection class, serving for non-material energy flow), with that explicit motor and generator components
  • The starting value identification could be refactored to leverage a very similar idea as in the linear dependents finder of the presolving

@fwitte fwitte changed the base branch from dev to v0.8 March 2, 2025 17:20
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.

1 participant