-
Notifications
You must be signed in to change notification settings - Fork 43
Migration guide v6.0.0
network.merge(other);
has been deleted.
Instead, new static Network functions have been implemented:
Network.merge("id", network1, network2);
Or more simply:
Network.merge(network1, network2);
Networks can be merged one with another and on the opposite, subnetworks can be detached from a parent network:
Creating a merged network merge
from two networks n1
and n2
:
Network merge = Network.merge("merge", n1, n2);
Detaching n2
from the parent network:
Network subnetwork1 = merge.getSubnetwork(n1.getId());
Network detachedN1 = subnetwork1.detach();
Detaching a subnetwork is a destructive procedure: the detached network is not accessible from the parent network anymore. Before launching this operation, checks are performed:
- Detaching from multi-variants network is not supported;
- Un-splittable boundary elements (like lines or HVDC lines) prevent the subnetwork to be detached;
- VoltageAngleLimits defined at the boundaries of a subnetwork prevent that subnetwork to be detached.
MergingView mergingView = MergingView.create("merged", "validation");
mergingView.merge(network1, network2);
does not exist anymore. You should rely on subnetworks now if you were using the merging view for CGMES profiles export.
Network merged = Network.merge("Merged", network1, network2);
Properties exportParams = new Properties();
exportParams.put(CgmesExport.PROFILES, "SSH");
network1.write("CGMES", exportParams, path_to_file);
Properties exportParams = new Properties();
exportParams.put(CgmesExport.PROFILES, "SV");
merged.write("CGMES", exportParams, path_to_file);
- When using
UndirectedGraph.traverse(...)
methods, you now have to specify theTraversalType
describing the way the graph will be traversed (by depth or by breadth). The previous default wasTraversalType.DEPTH_FIRST
; -
Terminal
implementations should have avoid traverse(TopologyTraverser traverser, TraversalType traversalType)
method. If you don't need breadth first travel, you could use the following implementation:
@Override
public void traverse(TopologyTraverser traverser, TraversalType traversalType) {
if (traversalType == TraversalType.DEPTH_FIRST) {
traverse(traverser);
}
throw new UnsupportedOperationException("Unsupported traversal type");
}
Floats were changed to doubles in the different scaling methods and constructors, check the values you are using.
For example variation = proportional([50.0f,20.0f,30.0f], gens)
doesn't work anymore, use variation = proportional([50.0d,20.0d,30.0d], gens)
instead.
The Scaling parameter iterative
has been deprecated and is being replaced by the enum priority
(ScalingParameter.Priority).
public enum Priority {
RESPECT_OF_VOLUME_ASKED,
RESPECT_OF_DISTRIBUTION,
ONESHOT
}
The values can be either RESPECT_OF_VOLUME_ASKED
(the scaling will distribute the power asked as much as possible by iterating if elements get saturated, even if it means not respecting potential percentages), RESPECT_OF_DISTRIBUTION
(the scaling will respect the percentages even if it means not scaling all what is asked), or ONESHOT
(the scaling will distribute the power asked as is, in one iteration even if elements get saturated and even if it means not respecting potential percentages).
All the methods using the former iterative
parameter have been deprecated and will be deleted in a future release, replace them with their equivalent using the priority
parameter.
For instance:
ScalingParameters parameters = new ScalingParameters()
.setScalingConvention(Scalable.ScalingConvention.LOAD)
.setConstantPowerFactor(true)
.setIterative(true)
.setReconnect(true)
.setAllowsGeneratorOutOfActivePowerLimits(true);
should be replaced by:
ScalingParameters parameters = new ScalingParameters()
.setScalingConvention(Scalable.ScalingConvention.LOAD)
.setConstantPowerFactor(true)
.setPriority(RESPECT_OF_VOLUME_ASKED)
.setReconnect(true)
.setAllowsGeneratorOutOfActivePowerLimits(true);
PowSyBl-Core now only supports Java 17 and higher. Please check that your installed SDK is still compatible. If you are using Ubuntu 20.04 LTS and the preinstalled Maven version, you will need to upgrade your Maven version too at least up to a version 3.8.x.
Groovy dependencies have been upgraded from version 3.0.15
to 4.0.14
. Since the version 4
, the groupId
of their maven artifacts was changed from org.codehaus.groovy
to org.apache.groovy
. If you use Groovy dependencies in your project, you should update your pom.xml
.
For instance:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
should be replaced by:
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
Note that the packages were not changed. Thus, you don't have to update your Java imports.
The following deprecated methods have been deleted:
AbstractScalable.listGenerators()
BranchTripping.getBranchId()
Bus.getTwoWindingTransformers()
Bus.getTwoWindingTransformerStream()
Bus.getThreeWindingTransformers()
Bus.getThreeWindingTransformerStream()
CgmesBoundary.addEquipmentAtNode()
CgmesBoundary.equipmentAtNode()
CgmesModel.terminalForEquipment()
CgmesModel.ratioTapChangerForPowerTransformer()
CgmesModel.phaseTapChangerForPowerTransformer()
Identifiable.getName()
Identifiable.getProperties()
InMemoryCgmesModel.ratioTapChangerForPowerTransformer()
InMemoryCgmesModel.phaseTapChangerForPowerTransformer()
LimitViolationUtils.Branch.Overload checkTemporaryLimits()
LimitViolationUtils.checkPermanentLimit()
LoadFlowParameters.isSpecificCompatibility()
LoadFlowParameters.isT2wtSplitShuntAdmittance()
LoadFlowParameters.setSpecificCompatibility()
LoadFlowParameters.setT2wtSplitShuntAdmittance()
Networks.printBalanceSummary()
NodBreakerVoltageLevel.getNodeCount()
Scalable.listGenerators()
Scalable.gen()
StaticVarCompensator.getVoltageSetPoint()
StaticVarCompensator.setVoltageSetPoint()
StaticVarCompensator.getReactivePowerSetpoint()
StaticVarCompensator.setReactivePowerSetPoint()
StaticVarCompensatorAdder.setVoltageSetPoint()
StaticVarCompensatorAdder.setReactivePowerSetPoint()
ValidationUtil.checkActivePowerLimits()
VoltageLevel.getNodeCount()
The following deprecated enum types have been deleted:
SensitivityFunctionType.BRANCH_ACTIVE_POWER
SensitivityFunctionType.BRANCH_CURRENT