Skip to content

COM vs dss_matlab speed comparison for setting loads and getting currents; handle classes are slow #22

Open
@Hell3000

Description

@Hell3000

here is the speed comparison I promised in DSS Disussion Forum https://sourceforge.net/p/electricdss/discussion/861976/thread/a096cdeed4/?limit=100#a3e1/261b

Summary

setting loads and getting currents is currently (November 2024) much slower (about 7 times) using altDSS compared to COM-Interface.

The main reason is: Matlab handle classes still have huge overhead.

Workaround: calling libs directly. Then altDSS is only about 1.5 times slower than COM-Interface.

Also: 2021b and 2024 b are faster than old 2019b (maybe something like 20 %). But handle classes are still too slow!

Conclusion: handle classes are not a good option. There might be a better way to emulate COM-Interface.

speed comparision of altDSS and COM and 2019b vs 2024b

this is on windows 10 VM with newest DSS (100_2, temporary trick to install Regsvr32 "C:\Program Files\OpenDSS\x64\OpenDSSEngine.DLL")

image

Code used for comparison

I attached a grid file with lines and loads and a .m Matlab file. It should be executable.

To execute:

  1. rename .txt of Matlab file to .m
  2. install DSS (https://sourceforge.net/p/electricdss/discussion/861977/thread/d97878c8f4/?limit=25 workaround might be needed)
  3. Download dss_matlab
  4. modifiy Base.m of dss_matlab as described in the attached Matlab file
  5. add necessary to MATLAB path
  6. Check code for safety
  7. Run

speed_of_altDSS_vs_COM_m_file.txt
LV_grid.txt

Suggestion for getAllLineCurrents makro in the code as Matlab Code

of course this must be implemented in C++ to have a speed benefit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions