Skip to content

Add method to check building inconsistency of Sparse Matrix#3912

Open
SylvestreSakti wants to merge 9 commits into
mainfrom
sparse_matrix_check_inconsistency
Open

Add method to check building inconsistency of Sparse Matrix#3912
SylvestreSakti wants to merge 9 commits into
mainfrom
sparse_matrix_check_inconsistency

Conversation

@SylvestreSakti
Copy link
Copy Markdown
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Adding a new feature to check Sparse Matrix consistency.
An OLF bug (powsybl/powsybl-open-loadflow#1394) has been found and the cause was a wrong filling of the sparse matrices. Some rows were referenced multiple times in the same column without being detected. This check does not exist in the set() and add() method of the SparseMatrix class because it would cost too much performance (to check if row already exists at each update). Still this check seems necessary to detect earlier such failures.

Solution proposed is to check inconsistency at the end after having filled all the values of the matrix through a specific method.

What is the current behavior?
No checking method existing

What is the new behavior (if this is a feature change)?
A method is introduced to check

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
…h repeated clear() reallocation

Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

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