Closed annetill closed 10 months ago
I think we are missing a type in
private static ContingencyElement createContingencyElement(Network network, String elementId) { Identifiable<?> identifiable = network.getIdentifiable(elementId); if (identifiable == null) { throw new PowsyblException("Element '" + elementId + "' not found"); } if (identifiable instanceof Line) { return new LineContingency(elementId); } else if (identifiable instanceof TwoWindingsTransformer) { return new TwoWindingsTransformerContingency(elementId); } else if (identifiable instanceof HvdcLine) { return new HvdcLineContingency(elementId); } else if (identifiable instanceof BusbarSection) { return new BusbarSectionContingency(elementId); } else if (identifiable instanceof Generator) { return new GeneratorContingency(elementId); } else if (identifiable instanceof DanglingLine) { return new DanglingLineContingency(elementId); } else if (identifiable instanceof StaticVarCompensator) { return new StaticVarCompensatorContingency(elementId); } else if (identifiable instanceof ShuntCompensator) { return new ShuntCompensatorContingency(elementId); } else if (identifiable instanceof ThreeWindingsTransformer) { return new ThreeWindingsTransformerContingency(elementId); } else if (identifiable instanceof Load) { return new LoadContingency(elementId); } else if (identifiable instanceof Battery) { return new BatteryContingency(elementId); } else if (identifiable instanceof Switch) { return new SwitchContingency(elementId); } else { throw new PowsyblException("Element type not supported: " + identifiable.getClass().getSimpleName()); } }
No response
done in #678
Describe the current behavior
Describe the expected behavior
I think we are missing a type in
Describe the steps
No response
Environment
No response
Relevant Log Output
No response
Extra Information
No response