Skip to content

Releases: zepben/ewb-sdk-python

v1.0.4

14 Nov 02:49

Choose a tag to compare

Breaking Changes

  • None.

New Features

  • None.

Enhancements

  • None.

Fixes

  • Fix an ImportError being raised when calling Conductor.is_underground()
  • TypeErrors occurring in StepActions will no longer silently pass

Notes

  • None.

v1.0.3

29 Aug 04:56

Choose a tag to compare

Fixes

  • Moved ZepbenTokenAuth to use python dataclasses instead of zepben.ewb.dataclassy, existing code should work as is.

v1.0.0

28 Aug 09:33

Choose a tag to compare

Breaking Changes

  • Removed support for Python 3.9. Upgrade your Python environment to at least 3.10.
  • Renamed the package to zepben.ewb. You will need to update all your imports zepben.evolve.* -> zepben.ewb.*. This also updates the pypi artifact to
    zepben.ewb.
  • Renamed length_from_t1_or_0 to length_from_t1_or_0.
  • Relocated the following classes into the Zepben extensions area, marking them as [ZBEX]:
    • DistanceRelay: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • EvChargingUnit: cim.iec61970.infiec61970.wires.generation.production -> cim.extensions.iec61970.base.generation.production.
    • Loop: cim.iec61970.infiec61970.feeder -> cim.extensions.iec61970.base.feeder.
    • LvFeeder: cim.iec61970.infiec61970.feeder -> cim.extensions.iec61970.base.feeder.
    • PowerDirectionKind: cim.iec61970.infiec61970.protection -> cim.extensions.iec61970.base.protection.
    • ProtectionKind: cim.iec61970.infiec61970.protection -> cim.extensions.iec61970.base.protection.
    • ProtectionRelayFunction: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • ProtectionRelayScheme: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • ProtectionRelaySystem: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • RelayInfo: cim.iec61968.infiec61968.infassetinfo -> cim.extensions.iec61968.assetinfo.
    • RelaySetting: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • Site: cim.iec61970.base.core -> cim.extensions.iec61970.base.core.
    • TransformerCoolingType: cim.iec61970.base.wires -> cim.extensions.iec61970.base.wires.
    • TransformerEndRatedS: cim.iec61970.base.wires -> cim.extensions.iec61970.base.wires.
    • VectorGroup: cim.iec61970.base.wires -> cim.extensions.iec61970.base.wires.
    • VoltageRelay: cim.iec61970.base.protection -> cim.extensions.iec61970.base.protection.
    • WindingConnection: cim.iec61970.base.wires.winding -> cim.iec61970.base.wires.
  • Relocated the following classes that were in the wrong packages:
    • Pole: cim.iec61968.assets -> cim.iec61968.infiec61968.infassets.
    • StreetlightLampKind: cim.iec61968.assets -> cim.iec61968.infiec61968.infassets.
    • All classes in the incorrectly located cim.iec61970.base.wires.generation.production -> cim.iec61970.base.generation.production.
  • The protobuf implementation has the following changes, which will only have an impact if you are using protobuf directly:
    • Updated the values of the following enums to conform to Protobuf standard naming:
      • BatteryControlMode
      • BatteryStateKind
      • CustomerKind
      • DiagramStyle
      • EndDeviceFunctionKind
      • FeederDirection
      • IncludedEnergizedContainers
      • IncludedEnergizingContainers
      • LogLevel
      • LogSource
      • NetworkState
      • OrientationKind
      • PhaseCode
      • PhaseShuntConnectionKind
      • PotentialTransformerKind
      • PowerDirectionKind
      • ProtectionKind
      • RegulatingControlModeKind
      • SinglePhaseKind
      • StreetlightLampKind
      • SVCControlMode
      • SwitchAction
      • SynchronousMachineKind
      • TransformerConstructionKind
      • TransformerCoolingType
      • TransformerFunctionKind
      • UnitSymbol
      • VectorGroup
      • WindingConnection
      • WireMaterialKind
    • Renumbered the protobuf fields for:
      • AcLineSegment
      • Control
      • Diagram
      • TransformerEnd
  • Renamed the following enum values:
    • PowerDirectionKind.UNKNOWN_DIRECTION -> PowerDirectionKind.UNKNOWN
    • RegulatingControlModeKind.UNKNOWN_CONTROL_MODE -> RegulatingControlModeKind.UNKNOWN
    • TransformerCoolingType.UNKNOWN_COOLING_TYPE -> TransformerCoolingType.UNKNOWN
    • WindingConnection.UNKNOWN_WINDING -> WindingConnection.UNKNOWN
  • Added TransformerFunctionKind.UNKNOWN to allow distinction between an unknown function, and a function that is not covered by the enum (i.e. other). This
    addition has changed the order of the enum values, with other now being the last entry, instead of the first.
  • NetworkConsumerClient and SyncNetworkConsumerClient no longer use the protobuf IncludedEnergizedContainers, IncludedEnergizingContainers and
    NetworkState enums directly, it now uses SDK versions of these enums. To use these enums you will need to update your imports, and use the simplified
    versions of the enum values:
    • IncludedEnergizedContainers from package zepben.ewb.streaming.get.
      • EXCLUDE_ENERGIZED_CONTAINERS -> NONE.
      • INCLUDE_ENERGIZED_FEEDERS -> FEEDERS.
      • INCLUDE_ENERGIZED_LV_FEEDERS -> LV_FEEDERS.
    • IncludedEnergizingContainers from package zepben.ewb.streaming.get.
      • EXCLUDE_ENERGIZING_CONTAINERS -> NONE.
      • INCLUDE_ENERGIZING_FEEDERS -> FEEDERS.
      • INCLUDE_ENERGIZING_SUBSTATIONS -> SUBSTATIONS.
    • NetworkState from package zepben.ewb.services.network.
      • ALL_NETWORK_STATE -> ALL.
      • NORMAL_NETWORK_STATE -> NORMAL.
      • CURRENT_NETWORK_STATE -> CURRENT.
  • The zepben.auth dependency has been incorporated into the SDK with the following package change:
    • zepben.auth -> zepben.ewb.auth. You can also import these directly from zepben.ewb.
  • SqliteTable now subclasses SqlTable.
  • The following CIM fields have been made nullable. Note if previously accessing these fields you will now have to handle them potentially being null.
    • Analog.positiveFlowIn
    • Document.*
    • EnergyConsumer.grounded
    • EnergySource.isExternalGrid
    • IdentifiedObject.name
    • IdentifiedObject.description
    • IdentifiedObject.numDiagramObjects
    • Meter.companyMeterId
    • NameType.description
    • Pole.classification
    • PowerSystemResource.numControls
    • RegulatingCondEq.controlEnabled
    • ShuntCompensator.grounded
    • StreetAddress.postalCode
    • StreetAddress.poBox
    • StreetDetail.*
    • SynchronousMachine.earthing
    • TapChanger.controlEnabled
    • TransformerEnd.grounded
    • UsagePoint.isVirtual

New Features

  • Created a new SqlTable that doesn't support creating schema creation statements by default.

Enhancements

  • EquipmentTreeBuilder will now calculate leaves when specified to do so.

Fixes

  • Marked some extensions properties and classes with [ZBEX] that were missing them (might still be more). In addition to the ones moved into the extensions
    package:
    • PhaseCode.Y
    • PhaseCode.YN
    • PowerElectronicsConnection.inverterStandard
    • PowerElectronicsConnection.sustainOpOvervoltLimit
    • PowerElectronicsConnection.stopAtOverFreq
    • PowerElectronicsConnection.stopAtUnderFreq
    • PowerElectronicsConnection.invVoltWattRespMode
    • PowerElectronicsConnection.invWattRespV1
    • PowerElectronicsConnection.invWattRespV2
    • PowerElectronicsConnection.invWattRespV3
    • PowerElectronicsConnection.invWattRespV4
    • PowerElectronicsConnection.invWattRespPAtV1
    • PowerElectronicsConnection.invWattRespPAtV2
    • PowerElectronicsConnection.invWattRespPAtV3
    • PowerElectronicsConnection.invWattRespPAtV4
    • PowerElectronicsConnection.invVoltVarRespMode
    • PowerElectronicsConnection.invVarRespV1
    • PowerElectronicsConnection.invVarRespV2
    • PowerElectronicsConnection.invVarRespV3
    • PowerElectronicsConnection.invVarRespV4
    • PowerElectronicsConnection.invVarRespQAtV1
    • PowerElectronicsConnection.invVarRespQAtV2
    • PowerElectronicsConnection.invVarRespQAtV3
    • PowerElectronicsConnection.invVarRespQAtV4
    • PowerElectronicsConnection.invReactivePowerMode
    • PowerElectronicsConnection.invFixReactivePower
    • PowerTransformerEnd.ratings
    • RegulatingControl.ratedCurrent
    • Sensor.relayFunctions
    • UsagePoint.approvedInverterCapacity
  • using EquipmentTreeBuilder more then once per interpreter will no longer cause the roots to contain more objects then it should due to _roots being a
    class var
  • Errors when initiating gRPC connections will now properly be propagated to users.

Notes

  • None.

v0.48.0

10 Jul 07:04

Choose a tag to compare

Breaking Changes

  • Updated to new Tracing API. All old traces will need to be re-written with the new API.
  • AcLineSegment supports adding a maximum of 2 terminals. Mid-span terminals are no longer supported and models should migrate to using Clamp.
  • Clamp supports only adding a single terminal.
  • FeederDirectionStateOperations have been reworked to take NetworkStateOperators as a parameter.
  • RemoveDirection has been removed. It did not work reliably with dual fed networks with loops. You now need to clear direction using the new ClearDirection
    and reapply directions where appropriate using SetDirection.
  • Cut supports adding a maximum of 2 terminals.
  • NetworkTraceTracker now uses a set to track visited objects, if you were using unhashable objects this will need to be addressed.
  • Added a new debug_logging and name parameters to the constructor of the following traces. The helper functions in Tracing also have these parameters,
    which defaults to None and network_trace, meaning anyone using these wrappers will be unaffected by the change:
    • AssignToFeeders
    • AssignToLvFeeders
    • ClearDirection
    • FindSwerEquipment
    • PhaseInferrer
    • RemovePhases
    • SetDirection
    • SetPhases
  • NetworkStateOperators has a new abstract description. If you are creating custom operators you will need to add it.
  • StepAction will now raise an exception if apply is overridden. override _apply instead, or pass the function to __init__

New Features

  • Added ClearDirection that clears feeder directions.
  • You can now pass a logger to all Tracing methods and TestNetworkBuilder.build to enable debug logging for the traces it runs. The debug logging will
    include the results of all queue and stop condition checks, and each item that is stepped on.

Enhancements

  • Tracing models with Cut and Clamp are now supported via the new tracing API.
  • Added support to TestNetworkBuilder for:
    • with_clamp - Adds a clamp to the previously added AcLineSegment
    • with_cut - Adds a cut to the previously added AcLineSegment
    • connect_to - Connects the previously added item, rather than having to specify it again in connect.
    • You can now add sites to the TestNetworkBuilder via addSite.
    • You can now add busbar sections natively with from_busbar_section and to_busbar_section
    • The prefix for generated mRIDs for "other" equipment can be specified with the default_mrid_prefix argument in from_other and to_other.
  • When processing feeder assignments, all LV feeders belonging to a dist substation site will now be considered energized when the site is energized by a
    feeder.
  • NetworkTrace now supports starting from a known NetworkTraceStep.Path. This allows you to force a trace to start in a particular direction, or to continue
    a follow-up trace from a detected stop point.
  • Traversal.is_stopping/Traversal.is_not_stopping now accept StepAction and any child classes, including those subclassing StepActionWithContextValue

Fixes

  • When finding LvFeeders in the Site we will now exclude LvFeeders that start with an open Switch
  • AssignToFeeder and AssignToLvFeeder will no longer trace from start terminals that belong to open switches
  • The follow fixes were added to Traversal and NetworkTrace:
    • can_stop_on_start_item now works for branching traversals.
    • Traversal start items are added to the queue before traversal starts, so that the start items honour the queue type order.
    • Stop conditions on the NetworkTrace now are checked based on a step type, like QueueCondition does, rather than by checking can_action_item.
    • Cut and Clamp are now correctly supported in SetDirection and DirectionCondition.
    • NetworkTrace now handles starting on Cut , Clamp, and AcLineSegment and their terminals in a explicit / sensible way.
    • NetworkTracePathProvider now correctly handles next paths when starting on a Clamp terminal.
  • NetworkTrace/Traversal now correctly respects can_stop_on_start_item when providing multiple start items.
  • AssignToFeeders/AssignToLvFeeders now finds back-fed equipment correctly
  • AssignToFeeders and AssignToLvFeeders will now associate PowerElectronicUnits with their powerElectronicsConnection Feeder/LvFeeder.
  • Phases are now correctly assigned to the LV side of an LV2 transformer that is in parallel with a previously energised LV1 transformer.
  • Added missing default network state operators (NORMAL) if you are calling SetDirection.run directly.

Notes

  • None.

v0.47.1

13 May 21:26

Choose a tag to compare

Fixes

  • Only resolve PowerSystemResource -> Asset relationship in one direction when calling get_equipment_container to stop deadlock.
  • MultiObjectResult now exposes result types inheriting from IdentifiedObject to allow better type completion

v0.47.0

08 May 07:46

Choose a tag to compare

Fixes

  • Downgrade protobuf and gRPC deps to fix SyncNetworkConsumerClient

v0.46.0

24 Apr 07:09

Choose a tag to compare

Breaking Changes

  • None.

New Features

  • Added relationships between Asset and PowerSystemResource which enables linking Equipment to Pole:
    • Asset.powerSystemResources
    • PowerSystemResource.assets

Enhancements

  • None.

Fixes

  • None.

Notes

  • None.

v0.45.0

26 Mar 23:04

Choose a tag to compare

Committing doc changes to docusaurus. [skip ci]

v0.44.1

07 Feb 03:25

Choose a tag to compare

Breaking Changes

  • None.

New Features

  • None.

Enhancements

  • None.

Fixes

  • Specify typing_extensions as a dependency to fix support for Python 3.9 and 3.10

Notes

  • None.

v0.44.0

24 Jan 00:58

Choose a tag to compare

Breaking Changes

  • None.

New Features

  • Added the following new CIM classes:
    • Clamp: A Clamp is a galvanic connection at a line segment where other equipment is connected. A Clamp does not cut the line segment. A Clamp is
      ConductingEquipment and has one Terminal with an associated ConnectivityNode. Any other ConductingEquipment can be connected to the Clamp ConnectivityNode.
      NOT CURRENTLY FULLY SUPPORTED BY TRACING
    • Cut: A cut separates a line segment into two parts. The cut appears as a switch inserted between these two parts and connects them together. As the cut is
      normally open there is no galvanic connection between the two line segment parts. But it is possible to close the cut to get galvanic connection. The cut
      terminals are oriented towards the line segment terminals with the same sequence number. Hence the cut terminal with sequence number equal to 1 is oriented
      to the line segment's terminal with sequence number equal to 1. The cut terminals also act as connection points for jumpers and other equipment, e.g. a
      mobile generator. To enable this, connectivity nodes are placed at the cut terminals. Once the connectivity nodes are in place any conducting equipment can
      be connected at them.
      NOT CURRENTLY FULLY SUPPORTED BY TRACING
  • Added FeederDirection.CONNECTOR, to be used by BusbarSections for their direction to differentiate from BOTH.

Enhancements

  • Updated NetworkConsumerClient's get_equipment_for_container/s, get_equipment_container, get_equipment_for_loop and get_all_loops
    to allow requesting normal, current or all equipments.

Fixes

  • None.

Notes

  • Cut and Clamp have been added to the model, but no processing for them has been added to the tracing, so results will not be what you expect.