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

Make substations optional #1796

Merged
merged 25 commits into from
Sep 7, 2021
Merged

Make substations optional #1796

merged 25 commits into from
Sep 7, 2021

Conversation

miovd
Copy link
Contributor

@miovd miovd commented Jul 20, 2021

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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 ? If so, link to this issue using '#XXX' and skip the rest
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
Substation are mandatory to create voltage levels and transformers.

What is the new behavior (if this is a feature change)?
Substations are optional. You can create voltage levels directly from the network. You can also create transformers directly from the network if and only if at least one end of the transformer is in a voltage level without substation.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Yes (must be discussed if the API should be really broken or no).

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

@miovd miovd force-pushed the opt_substations branch from 5f2be82 to 38eb509 Compare July 26, 2021 16:10
@miovd miovd changed the base branch from master to evolution_xiidm/1.6 July 26, 2021 16:11
Copy link
Contributor

@mathbagu mathbagu left a comment

Choose a reason for hiding this comment

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

It seems when you create an equipment from the network, a new fictitious substation is created. In which case the getOptionalSubstation method could return an empty optional?

@miovd miovd force-pushed the evolution_xiidm/1.6 branch from 726a40d to 72b5318 Compare July 27, 2021 08:54
@miovd miovd force-pushed the opt_substations branch from 38eb509 to 2ea586e Compare July 27, 2021 09:01
@miovd
Copy link
Contributor Author

miovd commented Jul 27, 2021

It seems when you create an equipment from the network, a new fictitious substation is created. In which case the getOptionalSubstation method could return an empty optional?

Do you mean returning an empty optional when substation is fictitious? It is a bit weird, isn't it? I only created fictitious substations in the default implementation in order not to break the API too much but maybe I should...

@miovd miovd force-pushed the opt_substations branch 2 times, most recently from aa9f5c2 to 22b5786 Compare August 23, 2021 14:36
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

76.6% 76.6% Coverage
0.0% 0.0% Duplication

@miovd miovd marked this pull request as ready for review August 24, 2021 12:05
@miovd miovd changed the title [WIP] Make substations optional Make substations optional Aug 24, 2021
@annetill annetill self-requested a review August 25, 2021 05:49
@miovd miovd requested review from colinepiloquet and removed request for colinepiloquet August 30, 2021 08:36
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
…er and merging (unchanged in importers)

Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
miovd added 17 commits September 7, 2021 11:28
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
…bstation and transformers without substations must have at least one end in a voltage level without substation

Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

80.1% 80.1% Coverage
0.0% 0.0% Duplication

@annetill annetill self-requested a review September 7, 2021 10:49
@annetill annetill merged commit b756b65 into evolution_xiidm/1.6 Sep 7, 2021
@annetill annetill deleted the opt_substations branch September 7, 2021 10:53
miovd added a commit that referenced this pull request Sep 7, 2021
* Make substation optional (voltage levels can be created from network)
* Allow to create transformers from network (substations are optional)
* Update the xsd
* Update serialization/deserialization of voltage levels in XIIDM
* Update serialization/deserialization of transformers in XIIDM
* Change: transformers in substation must have all their ends in the substation and transformers without substations must have at least one end in a voltage level without substation
* TwoWindingsTransformer.getSubstation() returns an optional
* ThreeWindingsTransformer.getSubstation() returns an optional

Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
miovd added a commit that referenced this pull request Sep 7, 2021
* Make substation optional (voltage levels can be created from network)
* Allow to create transformers from network (substations are optional)
* Update the xsd
* Update serialization/deserialization of voltage levels in XIIDM
* Update serialization/deserialization of transformers in XIIDM
* Change: transformers in substation must have all their ends in the substation and transformers without substations must have at least one end in a voltage level without substation
* TwoWindingsTransformer.getSubstation() returns an optional
* ThreeWindingsTransformer.getSubstation() returns an optional

Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants