Description
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")
Code used for comparison
I attached a grid file with lines and loads and a .m Matlab file. It should be executable.
To execute:
- rename .txt of Matlab file to .m
- install DSS (https://sourceforge.net/p/electricdss/discussion/861977/thread/d97878c8f4/?limit=25 workaround might be needed)
- Download dss_matlab
- modifiy Base.m of dss_matlab as described in the attached Matlab file
- add necessary to MATLAB path
- Check code for safety
- 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.