Skip to content

Commit

Permalink
aligns to the latest powsybl-diagram APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Biasuzzi <[email protected]>
  • Loading branch information
CBiasuzzi committed Dec 19, 2024
1 parent e0e35a3 commit b611e29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<zstdjni.version>1.5.5-3</zstdjni.version>
<powsybl-open-rao.version>6.0.1</powsybl-open-rao.version>
<google.ortools.version>9.10.4067</google.ortools.version>
<powsybl-diagram-temp.version>4.7.0</powsybl-diagram-temp.version>
</properties>

<build>
Expand Down Expand Up @@ -294,10 +295,12 @@
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-single-line-diagram-core</artifactId>
<version>${powsybl-diagram-temp.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-network-area-diagram</artifactId>
<version>${powsybl-diagram-temp.version}</version>
</dependency>
<dependency>
<groupId>com.powsybl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import com.powsybl.iidm.reducer.*;
import com.powsybl.nad.NadParameters;
import com.powsybl.nad.layout.BasicForceLayoutFactory;
import com.powsybl.nad.layout.FixedLayoutFactoryUtils;
import com.powsybl.nad.layout.GeographicalLayoutFactory;
import com.powsybl.nad.layout.LayoutFactory;
import com.powsybl.nad.layout.LayoutFactoryUtils;
import com.powsybl.nad.svg.SvgParameters;
import com.powsybl.python.commons.CTypeUtil;
import com.powsybl.python.commons.Directives;
Expand Down Expand Up @@ -1018,7 +1018,7 @@ public static NadParameters convertNadParameters(NadParametersPointer nadParamet
NadParameters nadParameters = NetworkAreaDiagramUtil.createNadParameters();
LayoutFactory layoutFactory = switch (nadParametersPointer.getLayoutType()) {
case 1: yield new GeographicalLayoutFactory(network, nadParametersPointer.getScalingFactor(), nadParametersPointer.getRadiusFactor(), new BasicForceLayoutFactory());
case 2: yield FixedLayoutFactoryUtils.create(new StringReader(CTypeUtil.toString(nadParametersPointer.getMetadata())), new BasicForceLayoutFactory());
case 2: yield LayoutFactoryUtils.create(new StringReader(CTypeUtil.toString(nadParametersPointer.getMetadata())), new BasicForceLayoutFactory());
default: yield new BasicForceLayoutFactory();
};
SvgParameters.EdgeInfoEnum edgeInfo = switch (nadParametersPointer.getEdgeInfoDisplayed()) {
Expand Down

0 comments on commit b611e29

Please sign in to comment.