Skip to content

Conversation

@rolnico
Copy link
Member

@rolnico rolnico commented Oct 23, 2025

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?
Change of dependency

What is the current behavior?
PowSyBl uses univocity-parsers for handling CSV files (parsing and writing), but this lib is abandoned since 2021.

What is the new behavior (if this is a feature change)?
PowSyBl now uses FastCSV for handling CSV files.

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@rolnico rolnico self-assigned this Oct 23, 2025
@rolnico rolnico added dependencies Pull requests that update a dependency file Release 12/2025 labels Oct 23, 2025
@rolnico rolnico moved this from TODO to In Progress in Release 12/2025 Oct 30, 2025
…ansformer impedances and windings, and update CSV processing logic accordingly

Signed-off-by: Nicolas Rol <[email protected]>
…, update parsing utilities, and enhance CSV compatibility with new fields and corrections

Signed-off-by: Nicolas Rol <[email protected]>
…V processing logic, and refine default field value handling

Signed-off-by: Nicolas Rol <[email protected]>
…tests for improved parsing accuracy

Signed-off-by: Nicolas Rol <[email protected]>
… logic and handle default values more consistently

Signed-off-by: Nicolas Rol <[email protected]>
…andling, and fix inconsistent field mappings

Signed-off-by: Nicolas Rol <[email protected]>
…c and remove unused cases

Signed-off-by: Nicolas Rol <[email protected]>
… JSON and CSV processing, and fix rate field mappings

Signed-off-by: Nicolas Rol <[email protected]>
…prove CSV handling, and enhance impedance correction processing

Signed-off-by: Nicolas Rol <[email protected]>
…ve CSV parsing logic, and enhance delimiter and quote management in `Context`

Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
@rolnico rolnico force-pushed the nro/replace_univocity-parsers_psse branch from 05e7a0d to 9f0ca76 Compare November 4, 2025 07:48
@rolnico rolnico changed the base branch from nro/replace_univocity-parsers to main November 4, 2025 07:48
@rolnico
Copy link
Member Author

rolnico commented Nov 4, 2025

I did some tests to compare the performances of this version vs main. Each test consisted of exporting a network and then importing the network from the generated file. Each operation was performed 50 times consecutively, and the results are based on the last 30 draws.

Operation File main (ms) fastCSV (ms) Difference (ms) Difference (%)
Export raw Small XIIDM 195,742 106,556 -89,186 -45,56 %
Import raw Small XIIDM 1506,259 500,980 -1005,279 -66,76 %
Export rawx Small XIIDM 155,368 106,944 -48,424 -31,17 %
Import rawx Small XIIDM 1530,821 498,977 -1031,844 -67,43 %
Export raw Medium XIIDM 606,107 410,914 -195,193 -32,20 %
Import raw Medium XIIDM Import failed Import failed N/A N/A
Export rawx Medium XIIDM 481,962 413,829 -68,133 -14,13 %
Import rawx Medium XIIDM Import failed Import failed N/A N/A
Export raw Large XIIDM 1775,348 1008,594 -766,754 -43,18 %
Import raw Large XIIDM 14669,229 4355,008 -10314,221 -70,34 %
Export rawx Large XIIDM 1407,518 994,860 -412,658 -29,32 %
Import rawx Large XIIDM 14663,221 4337,164 -10326,057 -70,45 %
Export raw Micro CGMES 3,944 1,142 -2,802 -71,04 %
Import raw Micro CGMES 11,786 2,475 -9,311 -79,03 %
Export rawx Micro CGMES 4,849 1,212 -3,637 -75,00 %
Import rawx Micro CGMES 12,641 1,946 -10,695 -84,63 %
Export raw Large CGMES 689,397 524,541 -164,856 -23,91 %
Import raw Large CGMES Import failed Import failed N/A N/A
Export rawx Large CGMES 624,877 542,597 -82,280 -13,16 %
Import rawx Large CGMES Import failed Import failed N/A N/A
Export raw Test network 6,245 2,916 -3,329 -53,29 %
Import raw Test network Import failed Import failed N/A N/A
Export rawx Test network 6,461 2,299 -4,162 -64,39 %
Import rawx Test network Import failed Import failed N/A N/A

We can see here that the performances are way better when using FastCSV.

Note: The exported files were checked and the only differences detected are due to an existing bug in the current PSS/E export

Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
@rolnico rolnico marked this pull request as ready for review November 20, 2025 16:00
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file PSS/E Release 12/2025

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants