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
2017년 9월 25일
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
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 Center 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!