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 Import. Line and Substation containers. #2970

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

marqueslanauja
Copy link
Contributor

@marqueslanauja marqueslanauja commented Apr 8, 2024

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)

Does this PR already have an issue describing the problem?

What kind of change does this PR introduce?

Cgmes context:

  • LineContainers can only include ACLineSegments, SeriesCompensators, and connectivityNodes.
  • LineContainers can be connected to other containers using switches.
  • SubstationContainers can directly include connectivityNodes. They must be connected to other containers using switches.

IIDM context:

  • Switches must be included inside a voltageLevel.
  • VoltageLevels without substation are supported.

What is the current behavior?

  • For each connectivityNode inside a LineContainer a fictitious voltageLevel is created. (Class: Conversion, method: createFictitiousVoltageLevelsForLineContainers).
  • LineContainers connected to other containers using switches is not supported.
  • SubstationContainers including connectivityNodes are supported by selecting an associated voltageLevel. (Class: AbstracCgmesModel, method: container).

What is the new behavior (if this is a feature change)?

  • All the code is integrated into the class SubstationIdMapping.
  • LineContainers connected to other containers using switches is supported.
  • A more general method to find the reference voltageLevel (voltageLevel used as reference when a fictitious voltageLevel must be created) is coded.
  • Fictitious voltageLevels can be created by node or by container. Using the node option the importer creates unnecessary voltageLevels, but in some cases is interesting.
Configuration parameter: CREATE_FICTITIOUS_VOLTAGE_LEVEL_FOR_EVERY_NODE. (True by default) 
RTE uses LineContainers to model several T junctions. Graphical representation is improved by defining a voltageLevel by node.
NG uses LineContainers to model  areas of the network with detailed connectivity. In this case is better to define a fictitious voltageLevel by LineContainer.

SubstationIdMapping class.

Define the voltageLevels of the IIDM model:

  • Cgmes voltageLevels connected by switches are grouped in the same voltageLevel set.
  • Each set will define a voltageLevel in the IIDM model.
  • A representative of the set is selected to create the IIDM voltageLevel.
  • Representative is calculated as:
  • Min (alphabetic order) of the real voltageLevels included in the set OR
  • Min (alphabetic order) of the fictitious voltageLevels associated with a LineContainer included in the set OR
  • Min (alphabetic order) of the elements of the Set.

Each cgmes voltageLevel not connected to other containers by switches defines a voltageLevel in the IIDM model (one to one). There is not need of finding a representative for them.

Next step. Determine the fictitious voltageLevels that must be created:

  • Only the representative voltageLevels will be voltageLevels in the IIDM model.
  • We only need to create a new voltageLevel when representative is fictitious.
  • Only the fictitious representatives associated with LineContainers are considered.

It is not expected to create a voltageLevel for a substationContainer including connectivity nodes as it must always be connected by switches to other containers.

Last step. Find a reference voltageLevel.

  • To create a new voltageLevel, a reference voltageLevel is needed to obtain the nominal voltage and other attributes.
  • To obtain the reference voltageLevel:
  • ACLineSegments and SeriesCompensators with one or both ends inside LineContainers are used to group fictitious voltageLevels associated with LineContainers.
  • For each set, a real voltageLevel can be selected as reference.
  • A real voltageLeve is always expected inside each set.
  • If there is more than one, then the Min (alphabetic order) is selected.

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:

marqueslanauja and others added 11 commits April 3, 2024 11:58
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>

# Conflicts:
#	cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/Conversion.java
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Copy link

sonarcloud bot commented May 2, 2024

@rcourtier
Copy link
Contributor

Hi @marqueslanauja, could you please fill in the current behaviour and the new behaviour in the description? That will help me a lot with the review. Thanks!

@marqueslanauja
Copy link
Contributor Author

marqueslanauja commented Sep 18, 2024 via email

marqueslanauja and others added 5 commits September 18, 2024 14:52
Signed-off-by: marquesja1 <marquesja@aia.es>
Signed-off-by: marquesja1 <marquesja@aia.es>
Signed-off-by: marquesja1 <marquesja@aia.es>
Signed-off-by: marquesja1 <marquesja@aia.es>
@marqueslanauja marqueslanauja marked this pull request as ready for review September 23, 2024 13:55
Copy link

sonarcloud bot commented Sep 23, 2024

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.

2 participants