Actxserver to load DLL multiple times

1 次查看(过去 30 天)
Hi all,
I am using Matlab to open and run another program (OpenDSS) and am doing with with the COM interface and a DLL since it allows me to control OpenDSS with handles from Matlab. This works fine, but I would like to open multiple instances of OpenDSS, but when Matlab encounters the actxserver() command after the first iteration, it sees that the DLL has already been loaded, so it doesn't open another instance, so parameters get overwritten and everything gets sad. It is possible to load multiple instances of the program via the DLL using Python using the subprocess() module, but it would be nice to avoid having to use Python (for simplicity's sake). I've tried for and parfor loops, hoping that the parfor Matlab workers would each want to load the DLL, but alas. I've also tried running a batch file from Matlab, but I have to call the EXE, which would force a significant rewrite of code.
Long story short, if anyone knows a way to mimic the Python subprocess() module, or any other way around this DLL stubbornness, that would be the cranberry sauce on my Thanksgiving meal.
Thanks!
-Paul
  2 个评论
Gayathri Krishnamoorthy
Hello Paul, I am also facing the same issue. I need to run multiple instances of OpenDSS from MATLAB using COM interface. Did you get to know how this works? Thanks Gayathri
Peter Lusis
Peter Lusis 2020-7-7
Hi all, I would like to know if someone has figured out how to open multiple OpenDSS instances when using Matlab parfor. I'm facing the same problem as described above.
Meanwhile, here on SourceForge are a few examples of how to run OpendSS in parallel via the COM interface. https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Examples/Parallel_Processing/MATLAB/

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by