Releases: dss-extensions/dss_matlab
DSS MATLAB 0.12.1 (major upgrade!)
This DSS MATLAB release includes fixes and major updates from our base OpenDSS engine library, DSS C-API. Highlights include Parallel/PM functions, ZIP file support, some JSON export functions, etc. Details below.
Please file an issue or contact the author for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API yet. You can, of course, use MATLAB's plotting capabilities.
We are currently evaluating reimplementing DSS_MATLAB using MEX. This would potentially allow us to integrate some plotting functions and also parfor
support with pool('threads')
.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.12.1_linux_x64.tar.gz
- macOS: dss_matlab_v0.12.1_macos_x64.tar.gz
- Windows: dss_matlab_v0.12.1_win_x64.zip
macOS ARM/M1 support will be added when there are stable MATLAB releases, probably in 2023.
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL. The licenses are included in the installation packages.
See the DSS C-API project for more details and source files.
DSS C-API 0.12 announcement
DSS C-API is a library that exposes a plain C API for an unofficial implementation of OpenDSS, the Distribution System Simulator from EPRI (the Electric Power Research Institute), aiming for full COM compatibility and beyond. It allows using OpenDSS on Windows, Linux and macOS with compatible behavior across multiple processor architectures. It is the lower level API used by the other projects in DSS Extensions: DSS Python, OpenDSSDirect.py, OpenDSSDirect.jl (Julia language), DSS# (.NET/C# bindings) and DSS MATLAB.
See the changelog for a complete list of changes since 0.10.0.
See also the updated "Known Differences" document, which lists the main differences between the DSS C-API codebase and the main/official OpenDSS.
The downstream projects will be updated following this release, and a new repository for general documentation and collaboration was created at https://github.com/dss-extensions/dss-extensions
This is a long-delayed upgrade that enhances several aspects of this implementation of the OpenDSS engine. Users can now expect more regular and prompt updates.
Changes since 0.10.7
Includes porting of most official OpenDSS features up to revision 3460. Check the OpenDSS SVN commits for details.
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 moved 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...
- Port memory-mapped files from the official OpenDSS, used when
DSS MATLAB 0.10.7-1
Upgrades DSS C-API to version 0.10.7-1. The only difference from version 0.10.7 is that this corrects an issue with energy meter reports. If you don't use the reports, you don't need to upgrade.
Slight modified release announcement from version 0.10.7 follows.
This DSS MATLAB release includes fixes and updates from the base OpenDSS engine, more unofficial extensions, as well as a reviewed error reporting system. This project uses the DSS C-API library version 0.10.7-1, based on OpenDSS revision 2963 (which is slightly newer than OpenDSS v9.1.3.3).
Please file an issue or contact the author for feedback (pmeira at ieee.org).
This release includes an important bug fix related to the CapRadius
DSS property. If your DSS scripts included the pattern GMRac=... rad=...
or GMRac=... diam=...
(in this order and without specifying CapRadius
), you should upgrade and re-evaluate the results.
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.7-1_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.7-1_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.7-1_win_x64.zip
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
Changes from DSS C-API 0.10.7
- Simple maintenance release, which includes most changes up to OpenDSS v9.1.3.4 (revision 2963).
- Includes an important bug fix related to the
CapRadius
DSS property. If your DSS scripts included the patternGMRac=... rad=...
orGMRac=... diam=...
(in this order and without specifyingCapRadius
), you should upgrade and re-evaluate the results. - This version should be fully API compatible with 0.10.3+.
- A reference document listing the DSS commands and properties for all DSS elements is now available at https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/dss_properties.md
- New functions API ported from the official OpenDSS include:
Bus_Get_AllPCEatBus
,Bus_Get_AllPDEatBus
,CktElement_Get_TotalPowers
,Meters_Get_ZonePCE
. - The changes ported from the official OpenDSS include the following (check the repository for more details):
- "Adds LineType property to LineCode and LineGeometry objects."
- "Correcting bug found in storage device when operating in idling mode. It was preventing the solution of other test feeders (IEEE 9500)"
- "Enabling fuel option for generator, fixing bug found in TotalPower command."
- "Adding kvar compensation calculation for normalizing reactive power at feeder head. v 9.1.2.4"
- "Adding: - Line type variable to line definition. - AllPCEatBus and AllPDEatBus commands to the executive command set. - AllPCEatBus and AllPDEatBus commands to bus interface in COM/DLL. (...)"
- "Adding capability to energy meter for getting the list of all PCE (shunt) within a zone. Interface "AllPCEatZone" for COM/DLL created."
- "Fixing bug found when calculating voltage bases with large amount of numbers (large array)."
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL. The licenses are included in the installation packages.
See the DSS C-API project for more details and source files.
DSS MATLAB 0.10.7
This DSS MATLAB release includes fixes and updates from the base OpenDSS engine, more unofficial extensions, as well as a reviewed error reporting system. This project uses the DSS C-API library version 0.10.7, based on OpenDSS revision 2963 (which is slightly newer than OpenDSS v9.1.3.3).
Please file an issue or contact the author for feedback (pmeira at ieee.org).
This release includes an important bug fix related to the CapRadius
DSS property. If your DSS scripts included the pattern GMRac=... rad=...
or GMRac=... diam=...
(in this order and without specifying CapRadius
), you should upgrade and re-evaluate the results.
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.7_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.7_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.7_win_x64.zip
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
Changes from DSS C-API 0.10.7
- Simple maintenance release, which includes most changes up to OpenDSS v9.1.3.4 (revision 2963).
- Includes an important bug fix related to the
CapRadius
DSS property. If your DSS scripts included the patternGMRac=... rad=...
orGMRac=... diam=...
(in this order and without specifyingCapRadius
), you should upgrade and re-evaluate the results. - This version should be fully API compatible with 0.10.3+.
- A reference document listing the DSS commands and properties for all DSS elements is now available at https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/dss_properties.md
- New functions API ported from the official OpenDSS include:
Bus_Get_AllPCEatBus
,Bus_Get_AllPDEatBus
,CktElement_Get_TotalPowers
,Meters_Get_ZonePCE
. - The changes ported from the official OpenDSS include the following (check the repository for more details):
- "Adds LineType property to LineCode and LineGeometry objects."
- "Correcting bug found in storage device when operating in idling mode. It was preventing the solution of other test feeders (IEEE 9500)"
- "Enabling fuel option for generator, fixing bug found in TotalPower command."
- "Adding kvar compensation calculation for normalizing reactive power at feeder head. v 9.1.2.4"
- "Adding: - Line type variable to line definition. - AllPCEatBus and AllPDEatBus commands to the executive command set. - AllPCEatBus and AllPDEatBus commands to bus interface in COM/DLL. (...)"
- "Adding capability to energy meter for getting the list of all PCE (shunt) within a zone. Interface "AllPCEatZone" for COM/DLL created."
- "Fixing bug found when calculating voltage bases with large amount of numbers (large array)."
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL. The licenses are included in the installation packages.
See the DSS C-API project for more details and source files.
DSS MATLAB 0.10.6: upgrades and fixes
This DSS MATLAB release includes fixes and updates from the base OpenDSS engine, more unofficial extensions, as well as a reviewed error reporting system. This project uses the DSS C-API library version 0.10.6, based on OpenDSS revision 2909 (which is slightly newer than OpenDSS v9.0.0.3).
With this set of releases from the DSS Extensions project, most API calls are checked, avoiding surprising/confusing messages when the errors are not handled immediately. In DSS MATLAB, the error messages provided in the OpenDSS Error interface are automatically mapped to MATLAB errors and should now provide a better context for the errors.
Please file an issue or contact the author for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.6_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.6_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.6_win_x64.zip
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
News at a glance
Two new important compatibility settings are introduced:
DSSobj.Error.ExtendedErrors
(defaults to enabled state): this new mechanism provides more error messages from the validation checks at the API level. You can disable the new messages, falling back to the previous behavior, usingDSSobj.Error.ExtendedErrors = 0
.DSSobj.LegacyModels
(defaults to disabled state): in OpenDSS v9.0, the old PVSystem, Storage, ... models were deprecated and removed from the official release. In ODD.py, you can toggle the old models usingDSSobj.LegacyModels = 1
. The current/new models, previously known as PVSystem2, Storage2, ... have been validated with the official tests and enabled by default.
About OpenDSS 9.0: https://sourceforge.net/p/electricdss/discussion/861976/thread/00ef2da276/
Changes from DSS C-API 0.10.6
DSS C-API is the low-level, extended OpenDSS library used in the DSS Extensions project. It provides a plain C interface, easily used by many programming languages.
- This version should be fully API compatible with 0.10.3+. The behavior of some functions changed with the new extensions. Especially, empty strings are explicitly return as nulls instead of "\0". This conforms to the behavior already seen in arrays of strings.
- The binary releases now use Free Pascal 3.2.0. We observed the solution process is around 6% faster, and results are even closer to the official OpenDSS.
- The releases now include both the optimized/default binary and a non-optimized/debug version. See the Debugging document for more.
- Extended API validation and Extended Errors mechanism:
- The whole API was reviewed to add basic checks for active circuit and element access.
- By default, invalid accesses now result in errors reported through the Error interface. This can be disabled to achieve the previous behavior, more compatible with the official COM implementation -- that is, ignore the error, just return a default/invalid value and assume the user has handled it.
- The mechanism can be toggled by API functions
DSS_Set_ExtendedErrors
andDSS_Get_ExtendedErrors
, or environment variableDSS_CAPI_EXTENDED_ERRORS=0
to disable (defaults to enabled state).
- New Legacy Models mechanism:
- OpenDSS 9.0+ dropped the old
PVsystem
,Storage
,InvControl
, andStorageController
models, replacing with the new versions previously known asPVsystem2
,Storage2
,InvControl2
andStorageController2
. - The behavior and parameters from the new models are different -- they are better, more complete and versatile models. Check the official OpenDSS docs and examples for further information.
- The implementation of the new models in DSS C-API was validated successfully with all test cases available. As such, we mirror the decision to make them the default models.
- As an extension, we implemented the Legacy Models option. By toggling it, a
clear
command will be issued and the alternative models will be loaded. This should allow users to migrate to the new version but, if something that used to work with the old models stopped working somehow, the user can toggle the old models. The idea is to keep reproducibility of results while we keep updating the engine and the API. - Since EPRI dropped/deprecated the old models, we might drop them too, in a future release. Please open an issue on GitHub or send a message if those old models are important to you.
- The mechanism can be controlled by API functions
DSS_Set_LegacyModels
andDSS_Get_LegacyModels
, or environment variableDSS_CAPI_LEGACY_MODELS=1
to enable (defaults to disabled state).
- OpenDSS 9.0+ dropped the old
- WireData API: expose the
CapRadius
property as a new pair of functions. - PDElements API: extended with many batch functions exposing equivalents to some CSV reports:
AllNames
,AllMaxCurrents
,AllPctNorm
,AllPctEmerg
,AllCurrents
,AllCurrentsMagAng
,AllCplxSeqCurrents
,AllSeqCurrents
,AllPowers
,AllSeqPowers
,AllNumPhases
,AllNumConductors
,AllNumTerminals
. CktElement_Get_SeqPowers
: fix issue for positive sequence circuits (wrong results could corrupt memory).- Many API functions were optimized to avoid unnecessary allocations and copies.
- Some bugs found in DSS C-API and also reported upstream (already fixed in SVN):
CapRadius
DSS property: if the radius was initialized usingGMRac
,CapRadius
was left uninitialized, resulting in invalid/NaN values.Sensors
API: some functions edited capacitors instead of sensors.
- Updated to the official OpenDSS revision 2903, corresponding to versions 9.0.0+. Changes include:
- ExportCIMXML: updated.
- Relay: Fix in
GetPropertyValue
. - Line: In
DumpProperties
andMakePosSequence
, the length is handled differently for lines withLineGeometry
orLineSpacing
. - Bus API: new
LineList
,LoadList
functions. - Lines API: SeasonRating now returns NormAmps if there's no SeasonSignal.
- New command DSS
Zsc012
: "Returns symmetrical component short circuit impedances Z0, Z1, and Z2 for the ACTIVE 3-PHASE BUS. Determined from Zsc matrix." PVsystem2
,Storage2
,InvControl2
,StorageController2
updated and renamed.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/known_differences.md
Most of th...
DSS MATLAB 0.10.5: updated engine
This DSS MATLAB release includes minor fixes from the base OpenDSS engine. This project uses the DSS C-API library version 0.10.5, based on OpenDSS revision 2836 (which is slightly newer than OpenDSS v8.6.7.1).
Please file an issue or contact me for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.5_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.5_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.5_win_x64.zip
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL.
See the DSS C-API project for more details and source files.
DSS MATLAB 0.10.4: updated DLLs
This DSS MATLAB release includes minor fixes from the base OpenDSS engine (upgrades DSS C-API to 0.10.4).
Please file an issue or contact me for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.4_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.4_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.4_win_x64.zip
If you want to try DSS_MATLAB with a sample circuit, a simple example for the IEEE13 system is also included in the download package, under the examples
folder. Continue reading for more.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL.
See the DSS C-API project for more details and source files.
DSS MATLAB 0.10.3-1: Minor fix
The DSS MATLAB release adds a minor fix to how errors/exceptions are handled. This complements the previous main release:
This is the first release of the complete version of DSS MATLAB! Compared to the preview version, it complements the API with dozens of methods and increases the performance of both the API and the OpenDSS-based solver.
Please file an issue or contact me for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a new member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.3-1_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.3-1_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.3-1_win_x64.zip
On 2019-07-02, a simple example for the IEEE13 system was added in 13Bus.zip if you want to try DSS_MATLAB with a sample circuit. Continue reading for more.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL.
See the DSS C-API project for more details and source files.
DSS MATLAB 0.10.3: First release
This is the first release of the complete version of DSS MATLAB! Compared to the preview version, it complements the API with dozens of methods and increases the performance of both the API and the OpenDSS-based solver.
Please file an issue or contact me for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a new member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp. See more alternatives at https://dss-extensions.org/
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
📦 Downloads
Download the file according to your platform, as each file contains platform-specific binaries:
- Linux: dss_matlab_v0.10.3_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.3_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.3_win_x64.zip
On 2019-07-02, a simple example for the IEEE13 system was added in 13Bus.zip if you want to try DSS_MATLAB with a sample circuit. Continue reading for more.
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want more code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.
Sandia's GridPV toolbox has been confirmed to work with very minor changes. Note that the toolbox seems to be out-of-date for some features, so don't expect everything to work even with COM (e.g. Google Maps integration seems broken).
As a general advice (valid for COM and DSS_MATLAB), avoid using the get
function without parameters on OpenDSS classes. Some properties like First
and Next
used for iteration of elements change the current active element and can lead to misleading data!
Known differences and more
We maintain a list of important differences between the official COM implementation and DSS C-API at:
https://github.com/dss-extensions/dss_capi/blob/master/docs/known_differences.md
Most of these apply indirectly to DSS_MATLAB.
The list of important changes through development is also useful.
Credits / Acknowlegement
This project is derived from EPRI's OpenDSS and the same style of license (BSD style) is used. As OpenDSS, the project also depends on KLUSolve and SuiteSparse, licensed under the LGPL.
See the DSS C-API project for more details and source files.
DSS MATLAB: First preview release
This is our first test release! Please file an issue or contact me for feedback (pmeira at ieee.org).
What's this?
DSS MATLAB is a new member of the family of multi-platform language bindings based on the DSS C-API project, which exposes EPRI's OpenDSS with a custom API intended to replace and extend the functionality of the official COM object API. For other languages: check DSS Python, OpenDSSDirect.py and DSS Sharp.
As with DSS Python and DSS Sharp, this package tries to mimic the COM object structure to facilitate the transition and keep most of the existing code valid. The package is usually faster than the COM object. Most of the missing features are related to the plotting methods from OpenDSS, which are not available in DSS C-API. You can, of course, use MATLAB's plotting capabilities.
Download
All files for 64-bit systems:
- Linux: dss_matlab_v0.10.0a1_linux_x64.tar.gz
- macOS: dss_matlab_v0.10.0a1_macos_x64.tar.gz
- Windows: dss_matlab_v0.10.0a1_win_x64.zip EDIT (2019-04-23): if you find any issues with the Windows version, try this version with updated DLLs: dss_matlab_with_capi_0.10.3a7.zip
Basic usage
- Download and extract the package appropriate for your system.
- Add the folder containing
+DSS_MATLAB
to your MATLAB path (e.g.path(path, 'c:\dss_matlab');
). - Instantiate
DSS_MATLAB.IDSS
. For example:
dss = DSS_MATLAB.IDSS;
If you code is based on DSSStartup.m
from the examples included in the official distribution, in general you only need to replace the Obj = actxserver('OpenDSSEngine.DSS');
line. That is, update DSSStartup.m
to:
%--------------------------------------------------------------------------
function [Start,Obj,Text] = DSSStartup
% Function for starting up the DSS
%instantiate the DSS Object
Obj = DSS_MATLAB.IDSS;
%
%Start the DSS. Only needs to be executed the first time w/in a
%Matlab session
Start = Obj.Start(0);
% Define the text interface
Text = Obj.Text;
If you want some code to play with, you can use the MATLAB examples from the official OpenDSS distribution, from a local installation (e.g. C:\OpenDSS\Examples\Matlab
) or from the official SVN repository.