Skip to content

Conversation

@SylvestreSakti
Copy link
Member

@SylvestreSakti SylvestreSakti commented Sep 29, 2025

What kind of change does this PR introduce?
Optimization propsoed to improve PR #1174 (these modifications aims at being merged on the corresponding branch)

3 main improvements proposed :

  • Do not compute again sin(ksi), cos(ksi), theta1 and theta2, and store them in double arrays (to compute them only once for both eval and der)
  • Do not search for Variable.getRow() while filling the matrix for der() but store the rows in arrays before
  • Do not check active status of EquationTerm and Equation while computing eval and der but just store active status of both in one array (named termToDer and termToEval)

-> Tested for some country networks : this improves 4 to 5 % time spent to compute an AC Security Analysis

Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
acVectorEngine.y[branchNum] = piModel.getY();
acVectorEngine.ksi[branchNum] = piModel.getKsi();
acVectorEngine.sinKsi[branchNum] = FastMath.sin(piModel.getKsi());
acVectorEngine.cosKsi[branchNum] = FastMath.cos(piModel.getKsi());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nothing wrong with your PR.
But I realise that those field may depend on the tap for transformers with tap changer capabilities.
The fields are final in the main branch.
But it seems their is a bug here. They should be updated when a tap changes. Maybe to handle in a separate PR...
That wille be easier once we have centralized them.

Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

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