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

Network validation: too many reported errors #3185

Open
zamarrenolm opened this issue Oct 21, 2024 · 0 comments
Open

Network validation: too many reported errors #3185

zamarrenolm opened this issue Oct 21, 2024 · 0 comments

Comments

@zamarrenolm
Copy link
Member

zamarrenolm commented Oct 21, 2024

Describe the current behavior

All validation checks are performed always, independent of the minimum validation level established in the network.
Even if we have set that we accept the network to be in EQUIPMENT validation level, any change will emit logs and report errors related to the verification of steady state attributes.

This can be easily reproduced with the following code:

Network network = Network.create("test", "iidm");
VoltageLevel vl = network.newSubstation().setId("s1").add()
        .newVoltageLevel().setId("vl1").setNominalV(100).setTopologyKind(TopologyKind.NODE_BREAKER).add();
network.setMinimumAcceptableValidationLevel(ValidationLevel.EQUIPMENT);
vl.newLoad().setId("l1").setNode(0).add();

The logger contents will show the following errors:

ERROR c.p.i.n.ValidationUtil | Load 'l1': p0 is invalid
ERROR c.p.i.n.ValidationUtil | Load 'l1': q0 is invalid

Describe the expected behavior

We expect to obtain errors based in the current minimum accepted validation level.

If we want to keep the validations for levels higher than the minimum accepted (to compute the actual validation level of the network no matter what is the minimum set), at least we should be able to configure that we do not want to emit logs/report errors for the "higher" level checks.

Currently validation checks can be called with a boolean flag that controls the behaviour of error processing: either raise an exception or simply log/report the error. This flag could be changed to an enum with a third option to run the checks silently (no exception, no log, no report), just to update the validation level of the network.

Describe the motivation

This suggestion is made in the context of CGMES import refactoring to split the conversion of networks in two stages:

  1. Building the network structure from equipment (EQ) files that contain only connectivity and electric characteristics of the devices.
  2. Apply information from a steady state hypothesis (SSH) file.

During the first stage we do not want errors to be emitted for missing SSH data.

Extra Information

When we request a validation report, we miss the identification of the related equipment. In the logger, we have messages like Load 'l1': p0 is invalid. In the output from reports we get only the attribute with error, but not the equipment identifier.

To check it, run the following code:

Network network = Network.create("test", "iidm");
VoltageLevel vl = network.newSubstation().setId("s1").add()
        .newVoltageLevel().setId("vl1").setNominalV(100).setTopologyKind(TopologyKind.NODE_BREAKER).add();
network.setMinimumAcceptableValidationLevel(ValidationLevel.EQUIPMENT);
vl.newLoad().setId("l1").setNode(0).add();

ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("root", "Report").build();
network.runValidationChecks(false, reportNode);

StringWriter sw = new StringWriter();
reportNode.print(sw);
System.out.println(sw.toString());

It will produce this output:

+ Report
   + Running validation checks on IIDM network test
      p0 is invalid
      p0 is invalid
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

No branches or pull requests

1 participant