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

CGMES: remove extension for Control Areas, use IIDM Area #3149

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9bc3e5c
CGMES: remove extension for Control Areas, use iidm Area
zamarrenolm Sep 20, 2024
f164ae5
add energy identification code EIC as alias
zamarrenolm Sep 20, 2024
8831363
do not delete existing cgmes extension
zamarrenolm Sep 20, 2024
38c02c9
copy the cgmes control area type to the iidm area type
zamarrenolm Sep 20, 2024
df99a96
use iidm area for cgmes export of control areas, adjust unit tests
zamarrenolm Sep 25, 2024
9387a35
always set pTolerance; adjust unit tests
zamarrenolm Sep 26, 2024
5019069
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Oct 2, 2024
c67ca0c
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Oct 23, 2024
69026ac
EIC code and target for default control area created for export
zamarrenolm Oct 24, 2024
e946c3f
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Oct 24, 2024
20cd5e5
p tolerance positive, by default 1% of net interchange
zamarrenolm Oct 24, 2024
ee15e39
refactor writing of tie flows in equipment export
zamarrenolm Oct 25, 2024
0af40d1
determine if a boundary should be ac or dc based on the reference data
zamarrenolm Nov 4, 2024
f51309f
move control area conversion to specific class
zamarrenolm Nov 14, 2024
53cb10d
int for size of list
zamarrenolm Nov 14, 2024
81b63e3
import tie flow sets the ac/dc type
zamarrenolm Nov 14, 2024
f2a31ac
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Dec 12, 2024
c081ba2
remove legacy extension, adapt unit tests
zamarrenolm Dec 13, 2024
cc60a53
remove local directory
zamarrenolm Dec 13, 2024
4f9d471
explicit creation of default control area of type interchange
zamarrenolm Dec 16, 2024
d264397
control area net interchange tolerance is optional, no default value …
zamarrenolm Dec 16, 2024
242f781
use orElseGet; pretty code
zamarrenolm Jan 14, 2025
8eafb69
control areas must be compared in test; fix query for optional contro…
zamarrenolm Jan 14, 2025
b6cadb1
do not consider any extension when comparing EQ data
zamarrenolm Jan 14, 2025
b2f9f9b
remove unused code
zamarrenolm Jan 14, 2025
e50db9f
remove unneeded code
zamarrenolm Jan 14, 2025
b33d120
use constants
zamarrenolm Jan 14, 2025
71d8941
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Jan 14, 2025
5761066
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Jan 21, 2025
7ef0741
adjust unit test
zamarrenolm Jan 21, 2025
05b53ad
keep optional at SSH block level
zamarrenolm Jan 21, 2025
94a7a15
Merge branch 'main' into remove_cgmes_control_areas_extension
zamarrenolm Jan 23, 2025
9ca9e0a
areas can be compared now
zamarrenolm Jan 23, 2025
fda0105
check that the default control area is created before exporting
zamarrenolm Jan 23, 2025
4451325
write only EQ and check exported file contains control area
zamarrenolm Jan 23, 2025
720b652
write just the SSH file and check it contains the tolerance
zamarrenolm Jan 23, 2025
16e8fdc
write individual files and check contents instead of whole export
zamarrenolm Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unneeded code
Signed-off-by: Luma <[email protected]>
zamarrenolm committed Jan 14, 2025
commit e50db9f7bd969d8d8f9fc9374d2fcc26cadd6610
Original file line number Diff line number Diff line change
@@ -586,7 +586,6 @@ private boolean test(ReadOnlyDataSource dataSource, boolean exportTp, boolean ex
// Import original
importParams.put("iidm.import.cgmes.create-cgmes-export-mapping", "true");
Network expected0 = new CgmesImport().importData(dataSource, NetworkFactory.findDefault(), importParams);
boolean originalNetworkHasAreas = expected0.getAreaCount() > 0;

// Ensure all information in IIDM mapping extensions is created
// Some mappings are not built until export is requested
@@ -640,14 +639,9 @@ private boolean test(ReadOnlyDataSource dataSource, boolean exportTp, boolean ex
.forEach(t -> t.setP(0.0).setQ(0.0));

// Export original and with new SV
// comparison without extensions, only Networks, to avoid differences in CgmesControlAreas
// comparison without extensions, only Networks
ExportOptions exportOptions = new ExportOptions().setSorted(true);
exportOptions.setExtensions(Collections.emptySet());
// Also, if a default area was created during export to CGMES, remove it from the expected network
// The actual network will not have it, it is the original network directly exported as IIDM
if (!originalNetworkHasAreas) {
expected.getAreaStream().map(Area::getId).toList().forEach(a -> expected.getArea(a).remove());
}
Path expectedPath = tmpDir.resolve("expected.xml");
Path actualPath = tmpDir.resolve("actual.xml");
NetworkSerDe.write(expected, exportOptions, expectedPath);