Releases: dss-extensions/DSS-Python
DSS-Python 0.15.7
DSS-Python 0.15.7 is a minor bugfix release that integrates a fix in the DSS engine for the LineGeometries API:
- Address issue with the classic LineGeometries API. Instead of using the number of input conductors, the API was using the number of effective conductors if
reduce=yes
. Now it returns all the conductors.
An upcoming release is expected for the next week, including support for the official OpenDSSDirect.DLL on Windows, within its limitations (in terms of API, features and platforms, for the moment).
Since DSS-Python targets closer compatibility with code written using the official OpenDSS COM interface in Python, some extra features that initially were expected to land on OpenDSSDirect.py have now been published under this new package, AltDSS-Python. Check its site for the motivation, examples, and API reference.
❓ 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 general documentation in the main website.
Version 0.15.6 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.
ℹ️ Recent news
The DSS-Python documentation and examples have also been updated, and will be better integrated into the new DSS-Extensions site soon, which does contain shared documentation, including DSS language/data model reference and notes about the classic OpenDSS API (based on the original COM implementation).
Other highlights in the v0.15.x: there are new functions to save the circuit which customized flags, and the work-in-progress JSON implementation now allows both saving and loading whole circuits.
Installation
For a minimal install, use :
pip install dss-python==0.15.7
To install all recommended packages, including OpenDSSDirect.py, AltDSS, matplotlib (to allow enabling plotting from DSS scripts) and pandas:
pip install dss-python[all]==0.15.7
In a typical Python environment, users will most likely have both matplotlib and pandas already installed.
❓AltDSS-Python
Like OpenDSSDirect.py, AltDSS-Python can also be used together with DSS-Python. Since multiple DSS engines are supported, there are utility functions to map across the packages. AltDSS-Python, or just AltDSS in this context, uses a whole different paradigm from the older Python packages, moving away from the "Active..." paradigm. The new AltDSS includes integration to all OpenDSS object types (access, creation, manipulation, all directly in Python), exposed as Python objects, and also allows using batches of DSS objects to accelerate some operations that would be otherwise slow in Python, pushing many operations to the engine, ranging from collected results for multiple objects, to efficient use of DSS properties. For example, bulk updating (incrementing/decrementing/multiplying/etc.) an int or float property for thousands of elements doesn't require copying the data and is done directly in the engine, after the input data for the operation is prepared in Python.
Engine updates
As usual, there have been a lot of changes our OpenDSS engine, AltDSS/DSS C-API. See https://github.com/dss-extensions/dss_capi/blob/master/docs/changelog.md#versions-014x for the complete changes since the last announced release here on GitHub. There are a few specific bugfixes, ports from the official OpenDSS, besides the on-going refactoring of the whole codebase.
DSS-Python v0.15.6
In the past month, we've released several versions of the Python packages from DSS-Extensions.
Although v0.15.0 was released on 2024-02-12, we held this announcement until now to allow the new companion package to be tested more before recommending it. Since DSS-Python targets closer compatibility with code written using the official OpenDSS COM interface in Python, some extra features that initially were expected to land on OpenDSSDirect.py have now been published under this new package, AltDSS-Python. Check its site for the motivation, examples, and API reference.
❓ 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 general documentation in the main website.
Version 0.15.6 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.
ℹ️ Recent news
The DSS-Python documentation and examples have also been updated, and will be better integrated into the new DSS-Extensions site soon, which does contain shared documentation, including DSS language/data model reference and notes about the classic OpenDSS API (based on the original COM implementation).
Other highlights in the v0.15.x: there are new functions to save the circuit which customized flags, and the work-in-progress JSON implementation now allows both saving and loading whole circuits.
Installation
For a minimal install, use :
pip install dss-python==0.15.6
To install all recommended packages, including OpenDSSDirect.py, AltDSS, matplotlib (to allow enabling plotting from DSS scripts) and pandas:
pip install dss-python[all]==0.15.6
In a typical Python environment, users will most likely have both matplotlib and pandas already installed.
❓AltDSS-Python
Like OpenDSSDirect.py, AltDSS-Python can also be used together with DSS-Python. Since multiple DSS engines are supported, there are utility functions to map across the packages. AltDSS-Python, or just AltDSS in this context, uses a whole different paradigm from the older Python packages, moving away from the "Active..." paradigm. The new AltDSS includes integration to all OpenDSS object types (access, creation, manipulation, all directly in Python), exposed as Python objects, and also allows using batches of DSS objects to accelerate some operations that would be otherwise slow in Python, pushing many operations to the engine, ranging from collected results for multiple objects, to efficient use of DSS properties. For example, bulk updating (incrementing/decrementing/multiplying/etc.) an int or float property for thousands of elements doesn't require copying the data and is done directly in the engine, after the input data for the operation is prepared in Python.
Engine updates
As usual, there have been a lot of changes our OpenDSS engine, AltDSS/DSS C-API. See https://github.com/dss-extensions/dss_capi/blob/master/docs/changelog.md#versions-014x for the complete changes since the last announced release here on GitHub. There are a few specific bugfixes, ports from the official OpenDSS, besides the on-going refactoring of the whole codebase.
DSS-Python v0.14.4
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
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 ofDSSEvents
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 toCktElement_Get_Powers
.
DSS-Python v0.14.3
DSS-Python 0.14.3 upgrades the DSS engine mainly to address bugs fixed in OpenDSS v9.6.1.2 (some present for several years, read below), plus a couple minor fixes on our alternative implementation.
There was also incremental progress in the plotting system.
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.3 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.3
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.3 changes
- Upgrade the backend to DSS C-API 0.13.3. Includes important fixes to some OpenDSS components affected by bugs for several years. This matches the changes in OpenDSS v9.6.1.2, plus our custom changes as usual.
- Add
DSS.Error.UseExceptions
to allow disabling the automatic mapping of error numbers to Python exceptions. When disabling, users take full responsibility to actually check for errors through theDSS.Error
interface. - Add
DSSCompatFlags.SaveCalcVoltageBases
. - Transformers: add a warning in the docstrings of
WdgCurrents
,WdgVoltages
(these don't work well when the transformer has open terminals). - Plotting: handle GICLines in circuit plots.
⚙️ DSS C-API 0.13.3 changes
Bugfix release for some components. No other major changes.
Fixes ported from the official OpenDSS v9.6.1.2 (SVN r3619) released on 2023-06-06, plus our custom changes (including new tests). Test circuits cross-validated as usual.
-
LoadShape
: check if there's any allocated pointer before normalizing. Since we provide more ways to fill the LoadShape data besides the official alternatives, we needed to add a few more checks in case of misuse to avoid using invalid pointers. Includes a minor fix to how manual values (set by the user) formean
andstddev
are handled. -
show
command: adjust formatting forshow variables
,show isolated
,show loops
,show faults
. -
GICTransformer
: clean-up the code and add a minor fix forBusX
. -
Editor: tweak how the process is started; works better on Linux for terminal-based editors (GUI editors are recommended for a better experience though).
-
Obj/API and headers: new functions and add a few warnings in the docs.
-
New compatibility flag in
DSSCompatFlags
: addSaveCalcVoltageBases
. On recent versions, running asave circuit
doesn't include aCalcVoltageBases
anymore since that causes issues for some users. We added the new flagSaveCalcVoltageBases
to restore the old/original behavior. More options are planned for a future version in a dedicated function in the API. -
Ported (and complemented) from the official OpenDSS SVN code:
UPFC
, r3610: "Fixing losses in UPFC model, there was a bug introduced several years ago when trying to redefine losses based on residual currents (bad idea)." (by davismont)CapControl
, r3615: "Fixing property requirement (element) for capcontrol in Time and Follow control modes", by davismontCapacitor
/Reactor
: fixes related to 1- or 2-phase LL objects and Yprim; NormAmps/EmergAmps.- r3613: "Fixing bug in Yprim formation for 1-ph and 2-ph delta-connected capacitors. Fix to user-specified NormAmps and EmergAmps for capacitors, which were always being overridden with default values. Pending to check for same issues on Reactors." (by celsorocha)
- r3616: "Fixing bug in Yprim formation for 1-ph and 2-ph delta-connected reactors. Fix to user-specified NormAmps and EmergAmps for reactors, which were always being overridden with default values." (by celsorocha)
- Also includes an extra fix for a corner-case issue detected with our tests on DSS-Extensions.
PVSystem
/Storage
/InvControl
, r3597/r3598: "Adding current limiting capabilities to IBR in QSTS and dynamics modes. Examples also available." (by davismont). Also refactored more common code to InvBasedPCE on the DSS-Extensions version.
DSS-Python v0.14.2
DSS-Python 0.14.2 upgrades the DSS engine, complements the plotting backend, and updates the JSON exports and Obj/Batch APIs. The following notebooks can give an overview of some features:
Both can be run with Google Colab (links included in the notebooks), but some features may work better on a local installation. As always, feedback is welcome!
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.2 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.2
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 C-API 0.13.2 changes
- Integrate some of the code ports from the official OpenDSS. A few changes were left in the
next_svn_merge
branch to be integrated after there is a new OpenDSS release. - Fix and complement some header code and comments.
- Refactor more of the internal code (huge merge still pending).
- Plotting: callback messages now include bus marker information. This is used only in Python at the moment.
- Add more error-checking to avoid accidental crashes in case of unexpected calls by the user code.
Text_CommandBlock
: rewritten, now reuses the internalDoRedirect
function, which allows block comments and also complements the error backtrace, when necessary.Obj_GetClassIdx
: fixed both header and implementation.- Build scripts updated. The version in the header is automatically updated on release.
- JSON exports: new flags implemented, and whole behavior adjusted to better exporting all classes, including some problematic cases See DSS-Extensions — JSON exports for notes and examples.
DSS-Python v0.13.1
This is an incremental release over v0.13.0:
- Upgrade DSS C-API to v0.13.1 to address potential issues with a few of the PVSystem properties
DSS.AdvancedTypes
: fixLines.Yprim
andPDElements.AllCurrentsMagAng
whenAdvancedTypes
is enabled.
The original v0.13.0 announcement follows.
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.13.0 has been released on the official Python package repository (PyPI) for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM platforms, including Apple's M1 and later. Coming in the following days:
- Linux ARM32 packages will be uploaded later, since they have to be manually prepared at the moment.
- For Anaconda cloud (channel dss-extensions), packages will also be uploaded in the coming days.
- The documentation and other sites need to be updated.
- An upcoming minor release should target plotting, specifically. This releases already handles many types of plot commands, but some are still pending or need to be fixed.
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
As mentioned in the changelog (copied below), some of the new tests prepared for this version 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.13.1
The binary wheels are also available as attachments on this release announcement.
Since this release, there are two manylinux
wheels to address recent changes in the Python ecosystem. 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.13.0: changes since 0.12.1
- Engine updated to DSS C-API 0.13.0, which is very compatible with OpenDSS 9.6.1.1 (plus some official SVN commits up to rev 3595, plus our own changes.
- New test suite, which runs many more files and validates more of the API. We now use
pytest
for some more complex tests, while the numeric validation is done with the newcompare_outputs.py
. - New
DSS.AdvancedTypes
: toggle matrix shapes and complex numbers in many of the properties and functions of the API. This is disabled by default. - New
DSS.CompatFlags
: to address some concerns about compatibility, we added a few toggles to toggle behavior that matches the official OpenDSS more closely. This flags will be refined in later releases. - Drop deprecated IR classes and a few undocumented functions.
- Use more enums throughout the code, which helps both readability and documentation. Some enums were complemented.
DSS.AdvancedTypes
toggle: enablingAdvancedTypes
allows using array/matrix shapes and complex numbers as results from properties/functions in the API.- Plotting: Implement several plot types. Only a few issues need to be addressed to consider the plotting system complete!
- Notebook integration: Initial prototype available. It is enabled automatically when
DSS.Plotting.enable()
is run in a notebook, providing integration with some DSS messages and outputs.- It also registers the
%%dss
cell magic. Use it in a cell to run DSS-language code directly. We found it useful for exploration and learning.
- It also registers the
- Updated
patch_dss_com
to patch a few more classes. - Drop Python 3.6 support, include 3.11 officially in the tests.
- DSSContext disposal: use CFFI to track the disposal of the contexts instead of manually tracking. This could remove memory leaks if you application creates too many DSSContexts (which is not recommended).
- DSS.Obj: remove some redundant properties, fix several issues. While it's not complete yet (some known limitations), you can see the tests for a few examples of how to create circuits without .DSS scripts/files in tests/test_obj.py and tests/test_batch.py -- the first creates each object explicitly, while the second uses batch operations to fill properties from arrays and lists.
- Add
typing_extensions
as a dependency to address Python typing needs in the main API code and the new Obj API. - Docs: mark more properties as "(API Extension)".
- Internal code refactoring and clean-up.
Full Git Changelog: 0.12.1-2...0.13.1
DSS C-API 0.13.0 changes
- Clean-up several files to ease the transition from Pascal to C++; more enum usage, remove redundant internal properties, rename some class members, etc. Some final steps still remain (that work is done in private branches).
- Fixes a couple of minor memory leaks.
- Removed our old Legacy Models mechanism. Right now, the API functions still exist, but will have no effect when setting and will throw an error. For a future version, the functions will be removed. This toggle was introduced in 2020, some time after the removal of the legacy models in the official OpenDSS. We believe users had enough time to fully migrate and the extra maintenance burden is not justified anymore.
- Transition some deprecated and buggy properties to throw specific errors, instead of generic messages. Issue: dss-extensions/dss_capi#118
Export
command: When the user provides a filename, use it as-is, otherwise could be an invalid path in case-sensitive file systems (e.g. Linux, most likely).Dump
andSave
commands: in some cases, our internal "hybrid enums" were not being converted correctly for dumps. A few classes had incomplete dump implementations since v0.12.0; some strings needed to be escaped for correct output.- CtrlQueue: adjust string formatting of items; although this doesn't affect the numeric results, the strings from the queue had some truncated numbers.
- Property system: For compatibility with the official version, allow autoresizing some arrays when given conflicting number of elements through the text interface or scripts.
Like
property: Although not recommended and deprecated in the official OpenDSS, the sequence of properties filled in the original copy is also copied. If you useLike
, remember to check if the copy actually worked since some classes are known to not copy every property correctly.- Plotting and UI: The engine side plotting callback system is now complete. There are fixes for
DaisyPlot
andGeneralDataPlot
, especially multi-platform handling. Changed how some properties are exposed in the JSON interchange to the callbacks. Implement argument handling and callback dispatch forDI_Plot
,CompareCases
andYearlyCurves
. New
commands: Fix potential issue with null pointers and duplicate names whenDuplicatesAllowed=False
.- EnergyMeter: Fix error message when the metered element is not a PDElement.
- CIMXML export: Fix issues present since v0.12.0; reported in dss-extensions/OpenDSSDirect.py#121
- Parser: properly error out when given excessive number of elements for matrices; implemented due to the report in dss-extensions/OpenDSSDirect.py#122
- Port most changes from the official OpenDSS up to SVN revision 3595 (OpenDSS v9.6.1.1 + a couple of CIMXML updates); check OpenDSS v9.6.1.1 README.txt for some complementary info to the list below.
- Relay, UPFC, UPFCControl changes ported.
- CIMXML exports: Various updates.
- RegControl: More log and debug trace entries.
- LoadMult: Set
SystemYChanged
when changingLoadMult
through a DSS script or DSS command (doesn't affectSolution_Set_LoadMult
) - Port PVSystem, Storage, InvControl, and StorageController changes, including the new grid-forming mode (GFM). For DSS Extensions, we added a new class InvBasedPCE to avoid some redundancy and make things clearer.
- Port DynamicExp and related functionality. In our implementation, we also add a new class DynEqPCE to avoid some redundant code (could still be improved). the Generator and the new InvBasePCE derive from this new DynEqPCE. Note: the
DynamicEq
functionality from the upstream still seems incomplete and some...
DSS-Python v0.13.0
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.13.0 has been released on the official Python package repository (PyPI) for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM platforms, including Apple's M1 and later. Coming in the following days:
- Some Linux ARM packages will be uploaded later, since they have to be manually prepared at the moment.
- For Anaconda cloud (channel dss-extensions), packages will also be uploaded in the coming days.
- The documentation and other sites need to be updated.
- An upcoming minor release should target plotting, specifically. This releases already handles many types of plot commands, but some are still pending or need to be fixed.
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
As mentioned in the changelog (copied below), some of the new tests prepared for this version 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.13.0
The binary wheels are also available as attachments on this release announcement.
Since this release, there are two manylinux
wheels to address recent changes in the Python ecosystem. 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.13.0: changes since 0.12.1
- Engine updated to DSS C-API 0.13.0, which is very compatible with OpenDSS 9.6.1.1 (plus some official SVN commits up to rev 3595, plus our own changes.
- New test suite, which runs many more files and validates more of the API. We now use
pytest
for some more complex tests, while the numeric validation is done with the newcompare_outputs.py
. - New
DSS.AdvancedTypes
: toggle matrix shapes and complex numbers in many of the properties and functions of the API. This is disabled by default. - New
DSS.CompatFlags
: to address some concerns about compatibility, we added a few toggles to toggle behavior that matches the official OpenDSS more closely. This flags will be refined in later releases. - Drop deprecated IR classes and a few undocumented functions.
- Use more enums throughout the code, which helps both readability and documentation. Some enums were complemented.
DSS.AdvancedTypes
toggle: enablingAdvancedTypes
allows using array/matrix shapes and complex numbers as results from properties/functions in the API.- Plotting: Implement several plot types. Only a few issues need to be addressed to consider the plotting system complete!
- Notebook integration: Initial prototype available. It is enabled automatically when
DSS.Plotting.enable()
is run in a notebook, providing integration with some DSS messages and outputs.- It also registers the
%%dss
cell magic. Use it in a cell to run DSS-language code directly. We found it useful for exploration and learning.
- It also registers the
- Updated
patch_dss_com
to patch a few more classes. - Drop Python 3.6 support, include 3.11 officially in the tests.
- DSSContext disposal: use CFFI to track the disposal of the contexts instead of manually tracking. This could remove memory leaks if you application creates too many DSSContexts (which is not recommended).
- DSS.Obj: remove some redundant properties, fix several issues. While it's not complete yet (some known limitations), you can see the tests for a few examples of how to create circuits without .DSS scripts/files in tests/test_obj.py and tests/test_batch.py -- the first creates each object explicitly, while the second uses batch operations to fill properties from arrays and lists.
- Add
typing_extensions
as a dependency to address Python typing needs in the main API code and the new Obj API. - Docs: mark more properties as "(API Extension)".
- Internal code refactoring and clean-up.
Full Git Changelog: 0.12.1-2...0.13.0
DSS C-API 0.13.0 changes
- Clean-up several files to ease the transition from Pascal to C++; more enum usage, remove redundant internal properties, rename some class members, etc. Some final steps still remain (that work is done in private branches).
- Fixes a couple of minor memory leaks.
- Removed our old Legacy Models mechanism. Right now, the API functions still exist, but will have no effect when setting and will throw an error. For a future version, the functions will be removed. This toggle was introduced in 2020, some time after the removal of the legacy models in the official OpenDSS. We believe users had enough time to fully migrate and the extra maintenance burden is not justified anymore.
- Transition some deprecated and buggy properties to throw specific errors, instead of generic messages. Issue: dss-extensions/dss_capi#118
Export
command: When the user provides a filename, use it as-is, otherwise could be an invalid path in case-sensitive file systems (e.g. Linux, most likely).Dump
andSave
commands: in some cases, our internal "hybrid enums" were not being converted correctly for dumps. A few classes had incomplete dump implementations since v0.12.0; some strings needed to be escaped for correct output.- CtrlQueue: adjust string formatting of items; although this doesn't affect the numeric results, the strings from the queue had some truncated numbers.
- Property system: For compatibility with the official version, allow autoresizing some arrays when given conflicting number of elements through the text interface or scripts.
Like
property: Although not recommended and deprecated in the official OpenDSS, the sequence of properties filled in the original copy is also copied. If you useLike
, remember to check if the copy actually worked since some classes are known to not copy every property correctly.- Plotting and UI: The engine side plotting callback system is now complete. There are fixes for
DaisyPlot
andGeneralDataPlot
, especially multi-platform handling. Changed how some properties are exposed in the JSON interchange to the callbacks. Implement argument handling and callback dispatch forDI_Plot
,CompareCases
andYearlyCurves
. New
commands: Fix potential issue with null pointers and duplicate names whenDuplicatesAllowed=False
.- EnergyMeter: Fix error message when the metered element is not a PDElement.
- CIMXML export: Fix issues present since v0.12.0; reported in dss-extensions/OpenDSSDirect.py#121
- Parser: properly error out when given excessive number of elements for matrices; implemented due to the report in dss-extensions/OpenDSSDirect.py#122
- Port most changes from the official OpenDSS up to SVN revision 3595 (OpenDSS v9.6.1.1 + a couple of CIMXML updates); check OpenDSS v9.6.1.1 README.txt for some complementary info to the list below.
- Relay, UPFC, UPFCControl changes ported.
- CIMXML exports: Various updates.
- RegControl: More log and debug trace entries.
- LoadMult: Set
SystemYChanged
when changingLoadMult
through a DSS script or DSS command (doesn't affectSolution_Set_LoadMult
) - Port PVSystem, Storage, InvControl, and StorageController changes, including the new grid-forming mode (GFM). For DSS Extensions, we added a new class InvBasedPCE to avoid some redundancy and make things clearer.
- Port DynamicExp and related functionality. In our implementation, we also add a new class DynEqPCE to avoid some redundant code (could still be improved). the Generator and the new InvBasePCE derive from this new DynEqPCE. Note: the
DynamicEq
functionality from the upstream still seems incomplete and some things are not fully implemented or maybe buggy, so we only ported now to remove the burden of porting this down the line. If you find issues, feel free to report here on DSS Extensions, but we recommended checking first with the official OpenDSS -- if the issue is also found in the official version, pre...
DSS Python 0.12.1-2
This is an incremental release to fix an issue with Fuses.Reset
. We took the opportunity to also expose the following in Python:
- GICSources: new class
- Bus: ZSC012Matrix
- Circuit: ElementLosses
- DSS: AllowDOScmd, COMErrorResults,
__call__
- Fuses: State, NormalState
- LineGeometries: Nconds
- Loads: Sensor
- LoadShapes: UseFloat32, UseFloat64
- PVSystems: Sensor
- Reclosers: State, NormalState
- Relays: State, NormalState
- Sensors: AllocationFactor
- Text: Commands
- WireData: CapRadius
- YMatrix: SetGeneratordQdV, Iteration
All the methods above were already implemented in the low-level API via CFFI (dss.lib).
See the release notes for the main v0.12.1 at https://github.com/dss-extensions/dss_python/releases/tag/0.12.1
As usual, available on PyPI.
DSS Python 0.12.1
Incremental release to address a bug found right after v0.12.0 was released.
- Fix handling of
Voltexceptionreport
option - Add the missing property descriptions
- Update docstrings for the experimental
DSS.Obj
API.
Slight modified original announcement for v0.12.0 follows.
Version 0.12.0 has been released on the official Python package repository (PyPI) for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM32 and ARM64 platforms, including Apple's M1 and later.
For Anaconda cloud (channel dss-extensions), packages will be uploaded in the coming days.
Note: Although the majority of features are ported frequently from the official OpenDSS and validated with a large suite of tests, this is not an official EPRI project.
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
This is a major release merging parallel features, multiple DSS engine instances, ZIP file support, incremental Y matrix updates, new API functions, partial plotting support, better performance, and so on. General usage examples for the new features will be incrementally added to https://github.com/dss-extensions/dss-extensions, a new location to reduce duplication of documentation efforts across all DSS Extensions.
The help messages for the help
command and a few functions are missing in this release. Users can expect more frequent updates to address this.
Installation
Using pip (Python versions: 3.6 to 3.10):
pip install dss_python==0.12.1
Conda packages are available for Linux (including a couple of PyPy versions) and macOS:
conda install -c dss-extensions dss_python=0.12.1
The binary wheels are also available as attachments on this release announcement.
Recent changes
(Not a complete list)
- Removed CmathLib: not useful in Python or most programming languages targetted by DSS Extensions.
- Allow creating multiple DSS engine instances via
DSS.NewContext()
. - Reenabled Parallel interface and PM functions (actors and so on), based on a new implementation.
- Enable incremental Y matrix options -- controlled by
DSS.YMatrix.SolverOptions
, options listed inSparseSolverOptions
. - New
ToJSON
functions to dump object properties (power flow state is not included at the moment) - Initial implementation of the new
DSS.Obj
API for direct DSS object and uniform batch manipulation, covering all DSS classes implemented in DSS C-API. The shape of this API may change for the next releases. At the moment it is intended for advanced users. For example, if you get an object handle from the engine and load a new circuit, the handle is invalid and you should not access it anymore (otherwise, crashes are expected). - Initial (work-in-progress) implementation of plotting functions. This will also be finished and polished in following releases.
- Due to some changes ported from the official OpenDSS since 0.10.7, some results may change, especially for circuits that used miles as length units. The same is observed across the official OpenDSS releases.
DSS C-API 0.12.0 changes:
Includes porting of most official OpenDSS features up to revision 3460. Check the OpenDSS SVN commits for details.
Since version 0.11 accumulated too many changes for too long (nearly 2 years), making it hard to keep two parallel but increasingly distinct codebases, version 0.12 is a stepping stone to the next big version (planned as 0.13) that will contain all of the 0.11 changes. As such, only some of the 0.11 features are included. The previous 0.10.8 changes are also included here.
This version still maintains basic compatibility with the 0.10.x series of releases, but there are many important changes. Version 0.13 will break API and ABI compatibility since function signatures and datatypes will be extensively adjusted. Still, if you use DSS C-API through one of the projects from DSS Extensions, we expect that your code will require few or no changes.
-
The binary releases now use Free Pascal 3.2.2.
-
The library name was changed from
dss_capi_v7
todss_capi
. The codebase was cleaned up and reorganized. -
The code was finally unified, merging remaining features from OpenDSS v8+ (with few exceptions). Most of the DSS PM commands and functions were enabled. To achieve this, most of the global variables from the OpenDSS engine were encapsulated in a new class, a DSS Context class. Multi-threaded features are based on DSSContexts, both the original OpenDSS PM features and new extensions.
-
Using DSS Contexts, user threads are now possible.
-
Initial ARM64/AARCH64 support added. ARM32 building scripts were also added. Support includes Apple M1 support, including parallel/multi-threading features.
-
Finally use KLUSolveX (our KLUSolve fork, rewritten and extended), enabling incremental Y updates for transformers and capacitor banks. Documentation including usage notes and limitations still not written. This was planned for version v0.13, but momved back to v0.12 to enable ARM32 (armv7l) support and better results in ARM64 (aarch64).
-
Experimental callbacks for plotting and message output. Expect initial support in Python soon after DSS C-API v0.12 is released.
-
Introduce
AllowChangeDir
mechanism: defaults to enabled state for backwards compatibility. When disabled, the engine will not change the current working directory in any situation. This is exposed through a new pair of functions
DSS_Set_AllowChangeDir
andDSS_Get_AllowChangeDir
, besides the environment variableDSS_CAPI_ALLOW_CHANGE_DIR
. -
New setting to toggle
DOScmd
command. Can be controlled through the environment variableDSS_CAPI_ALLOW_DOSCMD
or functionsDSS_Get_AllowDOScmd
/DSS_Set_AllowDOScmd
. -
Use
OutputDirectory
more.OutputDirectory
is set to the currentDataPath
ifDataPath
is writable. If not, it's set to a general location (%LOCALAPPDATA%/dss-extensions
and/tmp/dss-extensions
since this release). This should make life easier for a user running files from a read-only location. Note that this is only an issue when running acompile
command. If the user only usesredirect
commands, theDataPath
andOutputDirectory
are left empty, meaning the files are written to the current working directory (CWD), which the user can control through the programming language driving DSS C-API. Note that the official OpenDSS COM behavior is different, since it loads theDataPath
saved in the registry and modifies the CWD accordingly when OpenDSS is initialized. -
File IO rewritten to drop deprecated Pascal functions and features. This removes some limitations related to long paths due to the legacy implementation being limited to 255 chars.
-
Reworked
TPowerTerminal
to achieve better memory layout. This makes simulations runningLoadsTerminalCheck=false
andLoadsTerminalCheck=true
closer in performance, yet disabling the check is still faster. -
Use
TFPHashList
where possible (replacing the custom, original THashList implementation from OpenDSS). -
New LoadShape functions and internals:
- Port memory-mapped files from the official OpenDSS, used when
MemoryMapping=Yes
from a DSS script while creating a LoadShape object. - Release the
LoadShape_Set_Points
function, which can be used for faster LoadShape input, memory-mapping externally, shared memory, chunked input, etc.
- Port memory-mapped files from the official OpenDSS, used when
-
Some new functions:
Circuit_Get_ElementLosses
CktElement_Get_NodeRef
-
DSS_Get_COMErrorResults
/DSS_Set_COMErrorResults
: New compatibility setting for error/empty result. If enabled, in case of errors or empty arrays, the API returns arrays with values compatible with the official OpenDSS COM interface.For example, consider the function Loads_Get_ZIPV. If there is no active circuit or active load element:
- In the disabled state (COMErrorResults=False), the function will return "[]", an array with 0 elements.
- In the enabled state (COMErrorResults=True), the function will return "[0.0]" instead. This should
be compatible with the return value of the official COM interface.
Defaults to True/1 (enabled state) in the v0.12.x series. This will change to false in future series.
This can also be set through the environment variable DSS_CAPI_COM_DEFAULTS. Setting it to 0 disables
the legacy/COM behavior. The value can be toggled through the API at any time. -
Drop function aliases: previously deprecated function aliases (
LoadShapes_Set_Sinterval
andLoadShapes_Get_sInterval
) were removed to simplify the build process. UseLoadShapes_Set_SInterval
andLoadShapes_Get_SInterval
instead. -
Monitor headers: From the official OpenDSS, since May 2021, the monitor binary stream doesn't include the header anymore. When porting the change to DSS Extensions, we took the opportunity to rewrite the related code, simplifying it. As such, the implementation in DSS Extensions deviates from the official one. Extra blank chars are not included, and fields should be more consistent. As a recommendation, if your code needs to be compatible with both implementations, trimming the fields should be enough.
-
Error messages: most messages are now more specific and, if running a DSS script from files, include the file names and line numbers.
-
Spectrum: To reduce overhead during object edits, now required to exist before the object that uses it. This is consistent with most of the other types in OpenDSS.
-
New object and batch APIs for direct manipulation of DSS objects and batches of objects
-
New experimental API for loading scripts/data from ZIP files
-
New convenience functions to bulk load commands from the API
-
User-models: headers updated, and removed support for user-models in
LegacyModels
mode.LegacyModels
will be removed in v0.13...
DSS Python 0.12.0 (major updates)
Version 0.12.0 has been released on the official Python package repository (PyPI) for Windows, macOS and Linux. This release includes support for Intel x86 and x86-64, ARM32 and ARM64 platforms, including Apple's M1 and later.
For Anaconda cloud (channel dss-extensions), packages will be uploaded in the coming days.
Note: Although the majority of features are ported frequently from the official OpenDSS and validated with a large suite of tests, this is not an official EPRI project.
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
This is a major release merging parallel features, multiple DSS engine instances, ZIP file support, incremental Y matrix updates, new API functions, partial plotting support, better performance, and so on. General usage examples for the new features will be incrementally added to https://github.com/dss-extensions/dss-extensions, a new location to reduce duplication of documentation efforts across all DSS Extensions.
The help messages for the help
command and a few functions are missing in this release. Users can expect more frequent updates to address this.
Installation
Using pip (Python versions: 3.6 to 3.10):
pip install dss_python==0.12.0
When the conda packages become available, you will also be able to install with:
conda install -c dss-extensions dss_python=0.12.0
The binary wheels are also available as attachments on this release announcement.
Recent changes
(Not a complete list)
- Removed CmathLib: not useful in Python or most programming languages targetted by DSS Extensions.
- Allow creating multiple DSS engine instances via
DSS.NewContext()
. - Reenabled Parallel interface and PM functions (actors and so on), based on a new implementation.
- Enable incremental Y matrix options -- controlled by
DSS.YMatrix.SolverOptions
, options listed inSparseSolverOptions
. - New
ToJSON
functions to dump object properties (power flow state is not included at the moment) - Initial implementation of the new
DSS.Obj
API for direct DSS object and uniform batch manipulation, covering all DSS classes implemented in DSS C-API. The shape of this API may change for the next releases. At the moment it is intended for advanced users. For example, if you get an object handle from the engine and load a new circuit, the handle is invalid and you should not access it anymore (otherwise, crashes are expected). - Initial (work-in-progress) implementation of plotting functions. This will also be finished and polished in following releases.
- Due to some changes ported from the official OpenDSS since 0.10.7, some results may change, especially for circuits that used miles as length units. The same is observed across the official OpenDSS releases.
DSS C-API 0.12.0 changes:
Includes porting of most official OpenDSS features up to revision 3460. Check the OpenDSS SVN commits for details.
Since version 0.11 accumulated too many changes for too long (nearly 2 years), making it hard to keep two parallel but increasingly distinct codebases, version 0.12 is a stepping stone to the next big version (planned as 0.13) that will contain all of the 0.11 changes. As such, only some of the 0.11 features are included. The previous 0.10.8 changes are also included here.
This version still maintains basic compatibility with the 0.10.x series of releases, but there are many important changes. Version 0.13 will break API and ABI compatibility since function signatures and datatypes will be extensively adjusted. Still, if you use DSS C-API through one of the projects from DSS Extensions, we expect that your code will require few or no changes.
-
The binary releases now use Free Pascal 3.2.2.
-
The library name was changed from
dss_capi_v7
todss_capi
. The codebase was cleaned up and reorganized. -
The code was finally unified, merging remaining features from OpenDSS v8+ (with few exceptions). Most of the DSS PM commands and functions were enabled. To achieve this, most of the global variables from the OpenDSS engine were encapsulated in a new class, a DSS Context class. Multi-threaded features are based on DSSContexts, both the original OpenDSS PM features and new extensions.
-
Using DSS Contexts, user threads are now possible.
-
Initial ARM64/AARCH64 support added. ARM32 building scripts were also added. Support includes Apple M1 support, including parallel/multi-threading features.
-
Finally use KLUSolveX (our KLUSolve fork, rewritten and extended), enabling incremental Y updates for transformers and capacitor banks. Documentation including usage notes and limitations still not written. This was planned for version v0.13, but momved back to v0.12 to enable ARM32 (armv7l) support and better results in ARM64 (aarch64).
-
Experimental callbacks for plotting and message output. Expect initial support in Python soon after DSS C-API v0.12 is released.
-
Introduce
AllowChangeDir
mechanism: defaults to enabled state for backwards compatibility. When disabled, the engine will not change the current working directory in any situation. This is exposed through a new pair of functions
DSS_Set_AllowChangeDir
andDSS_Get_AllowChangeDir
, besides the environment variableDSS_CAPI_ALLOW_CHANGE_DIR
. -
New setting to toggle
DOScmd
command. Can be controlled through the environment variableDSS_CAPI_ALLOW_DOSCMD
or functionsDSS_Get_AllowDOScmd
/DSS_Set_AllowDOScmd
. -
Use
OutputDirectory
more.OutputDirectory
is set to the currentDataPath
ifDataPath
is writable. If not, it's set to a general location (%LOCALAPPDATA%/dss-extensions
and/tmp/dss-extensions
since this release). This should make life easier for a user running files from a read-only location. Note that this is only an issue when running acompile
command. If the user only usesredirect
commands, theDataPath
andOutputDirectory
are left empty, meaning the files are written to the current working directory (CWD), which the user can control through the programming language driving DSS C-API. Note that the official OpenDSS COM behavior is different, since it loads theDataPath
saved in the registry and modifies the CWD accordingly when OpenDSS is initialized. -
File IO rewritten to drop deprecated Pascal functions and features. This removes some limitations related to long paths due to the legacy implementation being limited to 255 chars.
-
Reworked
TPowerTerminal
to achieve better memory layout. This makes simulations runningLoadsTerminalCheck=false
andLoadsTerminalCheck=true
closer in performance, yet disabling the check is still faster. -
Use
TFPHashList
where possible (replacing the custom, original THashList implementation from OpenDSS). -
New LoadShape functions and internals:
- Port memory-mapped files from the official OpenDSS, used when
MemoryMapping=Yes
from a DSS script while creating a LoadShape object. - Release the
LoadShape_Set_Points
function, which can be used for faster LoadShape input, memory-mapping externally, shared memory, chunked input, etc.
- Port memory-mapped files from the official OpenDSS, used when
-
Some new functions:
Circuit_Get_ElementLosses
CktElement_Get_NodeRef
-
DSS_Get_COMErrorResults
/DSS_Set_COMErrorResults
: New compatibility setting for error/empty result. If enabled, in case of errors or empty arrays, the API returns arrays with values compatible with the official OpenDSS COM interface.For example, consider the function Loads_Get_ZIPV. If there is no active circuit or active load element:
- In the disabled state (COMErrorResults=False), the function will return "[]", an array with 0 elements.
- In the enabled state (COMErrorResults=True), the function will return "[0.0]" instead. This should
be compatible with the return value of the official COM interface.
Defaults to True/1 (enabled state) in the v0.12.x series. This will change to false in future series.
This can also be set through the environment variable DSS_CAPI_COM_DEFAULTS. Setting it to 0 disables
the legacy/COM behavior. The value can be toggled through the API at any time. -
Drop function aliases: previously deprecated function aliases (
LoadShapes_Set_Sinterval
andLoadShapes_Get_sInterval
) were removed to simplify the build process. UseLoadShapes_Set_SInterval
andLoadShapes_Get_SInterval
instead. -
Monitor headers: From the official OpenDSS, since May 2021, the monitor binary stream doesn't include the header anymore. When porting the change to DSS Extensions, we took the opportunity to rewrite the related code, simplifying it. As such, the implementation in DSS Extensions deviates from the official one. Extra blank chars are not included, and fields should be more consistent. As a recommendation, if your code needs to be compatible with both implementations, trimming the fields should be enough.
-
Error messages: most messages are now more specific and, if running a DSS script from files, include the file names and line numbers.
-
Spectrum: To reduce overhead during object edits, now required to exist before the object that uses it. This is consistent with most of the other types in OpenDSS.
-
New object and batch APIs for direct manipulation of DSS objects and batches of objects
-
New experimental API for loading scripts/data from ZIP files
-
New convenience functions to bulk load commands from the API
-
User-models: headers updated, and removed support for user-models in
LegacyModels
mode.LegacyModels
will be removed in v0.13. -
New functions to export the DSS properties of objects as JSON-encoded strings
-
The C headers for our library were updated to include the
const
modifier for various of the parameters. A few function declarations were fixed. -
Initial batch of i18n changes.
Due to the high number of IO changes, we re...