-
Notifications
You must be signed in to change notification settings - Fork 43
Migration guide v6.7.0
If you have a custom UCTE naming strategy (i.e. a class implementing com.powsybl.ucte.converter.NamingStrategy
), you should implement the following method:
void initializeNetwork(Network network);
By default, the "Default" naming strategy is used when exporting a network in UCTE. If you want to use the new naming strategy, you should define the following property in your configuration: - `ucte.export.naming-strategy`: `Counter`
Any access to the CGMES.switchType
property should be replaced with CGMES.originalClass
property. For instance:
String cgmesSwitchType = network.getSwitch("someSwitchUUID").getProperty("CGMES.switchType");
should be replaced by:
String cgmesSwitchType = network.getSwitch("someSwitchUUID").getProperty(Conversion.PROPERTY_CGMES_ORIGINAL_CLASS);
Similarly, any network saved to a serialized IIDM file should be updated by replacing all occurences of CGMES.switchType
with CGMES.originalClass
property, in case the network needs to be exported to CGMES and the original CGMES switch types are needed.
You could do this with following code:
for (Switch s : network.getSwitches()) {
String cgmesSwitchType = s.getProperty("CGMES.switchType");
if (cgmesSwitchType != null) {
s.setProperty("CGMES.originalClass", cgmesSwitchType);
}
}
Methods removed from CgmesModel
:
Map<String, PropertyBags> groupedTransformerEnds()
List<String> ratioTapChangerListForPowerTransformer(String powerTransformerId)
PropertyBags ratioTapChangerTable(String tableId)
List<String> phaseTapChangerListForPowerTransformer(String powerTransformerId)
PropertyBags phaseTapChangerTable(String tableId)
PropertyBags nonlinearShuntCompensatorPoints(String shuntId)
Have been replaced by these methodes in Context
:
public PropertyBags transformerEnds(String transformerId)
public PropertyBags ratioTapChangers(String transformerId)
public PropertyBags ratioTapChangerTablePoints(String tableId)
public PropertyBags phaseTapChangers(String transformerId)
public PropertyBags phaseTapChangerTablePoints(String tableId)
public PropertyBags nonlinearShuntCompensatorPoints(String shuntId)
Also, in CgmesModel
, the following methods have been renamed for more consistency:
-
ratioTapChangerTablesPoints()
intoratioTapChangerTablePoints()
-
phaseTapChangerTablesPoints()
intophaseTapChangerTablePoints()
The following methods of CgmesConformity1ModifiedCatalog
, were removed:
miniNodeBreakerLoadBreakSwitch()
miniNodeBreakerProtectedSwitch()
miniNodeBreakerInternalLineZ0()
miniNodeBreakerTerminalDisconnected()
microGridBaseCaseNLSwitchWithoutName()
microGridBaseCaseNLSwitchTypePreserved()
miniGridNodeBreakerSwitchTypePreserved()
microGridBaseCaseBEUndefinedPatl()
microGridBaseCaseBELimits()
microGridBaseCaseBEMissingLimitValue()
miniNodeBreakerLimitsforEquipment()
They were used for unit testing, but they relied on big CGMES files ; this slowed the tests execution. If you still need to use them, you can retrieve the methods at this URL and the corresponding CGMES files in this directory.
This breaking change affects only users which added their own implementation of TreeDataReader
(for instance for a custom serialization format). Those users need to rename the skipChildNodes
method into skipNode
. They also need to take care of skipping the whole node in this method, and not only skipping the children nodes.
The interface TimeSeriesIndex
has new methods that you have to implement, should you implement this interface:
void writeJson(JsonGenerator generator, TimeSeries.TimeFormat format)
String toJson(TimeSeries.TimeFormat format)
Following the change of underlying date-time variable format (from long
to Instant
), the TimeSeriesIndex.toJson
and TimeSeriesIndex.writeJson
exported formats have been changed to allow nano-second precision while keeping the backward compatibility, thanks to a new enum TimeSeriesIndex.ExportFormat
:
- Old format that will still be used when
timeFormat = TimeSeriesIndex.ExportFormat.MILLISECONDS
(default value) for backward compatibility:
{
"startTime" : 1420070400000,
"endTime" : 1420074000000,
"spacing" : 900000
}
- New format that will be used when
timeFormat = TimeSeriesIndex.ExportFormat.NANOSECONDS
:
{
"startInstant" : 1420070400000000000,
"endInstant" : 1420074000000000000,
"timeStep" : 900000000000
}
Custom IIDM implementation maintainers should add the following methods:
- in their
Network
implementations:-
LineAdder newLine(Line line)
.
-
- in their
Substation
implementations:-
TwoWindingsTransformerAdder newTwoWindingsTransformer(TwoWindingsTransformer twoWindingsTransformer)
.
-
Custom IIDM implementation maintainers should allow having inconsistent low/high voltages in the StandbyAutomaton
extension (which is an extension on StaticVarCompensator
) when "standBy" is false. In this case, setting "standBy" to true should then throw an exception.
Since time is now managed by using Instant
instead of long
variables, a few methods have been deprecated and will be removed in a future release:
Class | Deprecated method | New method |
---|---|---|
TimeSeriesIndex and all classes implementing this interface |
long getTimeAt(int point) |
Instant getInstantAt(int point) |
AbstractPoint and all classes extending this abstract class |
public long getTime() |
public Instant getInstant() |
IrregularTimeSeriesIndex |
public IrregularTimeSeriesIndex(long[] times) |
public IrregularTimeSeriesIndex(Instant[] instants) |
RegularTimeSeriesIndex |
public RegularTimeSeriesIndex(long startTime, long endTime, long spacing) |
public RegularTimeSeriesIndex(Instant startInstant, Instant endInstant, Duration timeStep) |
RegularTimeSeriesIndex |
public long getStartTime() |
public Instant getStartInstant() |
RegularTimeSeriesIndex |
public long getEndTime() |
public Instant getEndInstant() |
RegularTimeSeriesIndex |
public long getSpacing() |
public Instant getTimeStep() |
DoublePoint |
public DoublePoint(int index, long time, double value) |
public DoublePoint(int index, Instant instant, double value) |
StringPoint |
public StringPoint(int index, long time, String value) |
public StringPoint(int index, Instant instant, String value) |