Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hell3000 opened this issue Nov 5, 2024 · 0 comments

Comments

@Hell3000
Copy link

Hell3000 commented Nov 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant