Skip to content

DSS-Python v0.14.4

Compare
Choose a tag to compare
@PMeira PMeira released this 28 Jun 03:21
· 92 commits to master since this release

DSS-Python 0.14.4 upgrades the DSS engine to address a bug fixed in OpenDSS v9.6.1.3, plus a couple minor improvements in our implementation.

There were also incremental changes in the internals of the plotting system. The backend for equivalent to DSSEvents in the COM API has been implemented, but not exposed nicely in DSS-Python yet.

❓ What's this?

DSS-Python is a Python package that provides access to the DSS-Extensions engine, using DSS C-API and CFFI. This engine is a customized port of the Windows/Delphi code to Free Pascal, including several quality-of-life improvements for Python users. DSS-Python tries to provide a drop-in replacement from the official OpenDSS COM API, while adding some features/extensions. It is also the underlying package used by OpenDSSDirect.py since 2018. If you are new to DSS-Extensions, see our FAQ here, as well as https://dss-extensions.org/

Version 0.14.4 has been released on the official Python package repository (PyPI). Since version 0.14.0, the main DSS-Python package is pure Python, but relies on the new dss-python-backend to allow us easier iteration on Python features. The backend package is available for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM platforms, including Apple's M1 and later.

Please feel free to open issues on GitHub or post on https://github.com/orgs/dss-extensions/discussions

Note: Although the majority of features are ported frequently from the official OpenDSS and validated with a large suite of tests, this is not supported by EPRI.

The main differences in behavior compared to the official OpenDSS implementation are listed in https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md

Some of the tests can also serve as examples of some features. For example, see test_general.py/test_threading2 for an example of how to use DSSContexts and Python threads.

Installation

Using pip (Python versions: 3.7 to 3.11):

    pip install dss_python==0.14.4

The binary wheels are also available as attachments on this release announcement.

If you encounter issues installing on Linux, be sure to update your pip and wheel packages before reporting a problem (versions too old may fail).

For PyPy, we recommend the users to build the wheels. If you'd like to use PyPy but aren't able to easily build the packages, please report here on GitHub.


🐍 DSS-Python 0.14.4 changes

  • Upgrade the backend to DSS C-API 0.13.4. Includes a bugfix to CapControl, some more error handling, DSSEvents backend functions. This matches the changes in OpenDSS v9.6.1.3, plus our custom changes as usual.
  • Use better DSSContext pointer to IDSS mapping.
  • Plotting: handle empty monitors better, ignore invalid channels.
  • Documentation updated.

⚙️ DSS C-API 0.13.4 changes

check its repo for more info

Bugfix release for CapControl, couple with some incremental improvements.

This version should match OpenDSS v9.6.1.3 (SVN r3623).

  • Ported from the official OpenDSS SVN code:

    • CapControl, port SVN 3622: "Solves a bug introduced in version 9.6.1.2 when using CapControl in time or follow control modes." (by davismont).
  • Added DSSEvents: Implement an initial set of functions analog to the COM interface. This was added for historical compatibility since use of DSSEvents is rarely seen. This document from EPRI (2011) presents the equivalent in the COM interface. Examples will be added in our downstream projects when time allows (feel free to request one to signal interest in this feature).

  • Handle better how the internal SolutionAbort is used. Some invalid states were not being handled on absence of float-point exceptions, leading to potential useless results (NaN) and even crashes.

  • VSource: Abort the solution if Z1 is zero.

  • API/ArrayDimensions: fix CktElement_Get_NodeOrder; add to CktElement_Get_Powers.