dss-extensions / dss_sharp

C#/.NET bindings for DSS C-API, an unofficial implementation of OpenDSS with a custom API in plain C, new features and API extensions.
https://dss-extensions.org/dss_sharp/
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

get_CktElements method #2

Closed Zecao closed 5 years ago

Zecao commented 5 years ago

Hello Paulo, I'm using the dss_sharp on my daily works in Cemig. It's faster than OpenDSSEngine.dll (but right now I cannot tell you how much fast). Thank you! Also with dss_sharp I can run multiple instances of my openDSS customization in the same machine, since at some point of 2018 OpenDSSEngine.dll started to crash when I try to do that. But the issue itself is: is the method get_CktElements from DSSCircuit ported to dss_sharp? Its is the only line that I have to comment in my code to everything works.

PMeira commented 5 years ago

@Zecao Sorry, I missed your message in December!

It's faster than OpenDSSEngine.dll (but right now I cannot tell you how much fast). Thank you!

Nice! I'm preparing a new release as soon as I have some time to finish a new feature. More recent versions of DSS C-API are faster and we're testing some further modifications internally at Unicamp to achieve better performance overall.

since at some point of 2018 OpenDSSEngine.dll started to crash when I try to do that.

Yeah, version 8 had(has?) some issues but should be more stable now. I noticed that they started providing updated DLLs for version 7 too (which only omits the diakoptics/circuit-tearing and parallel-machine code).

But the issue itself is: is the method get_CktElements from DSSCircuit ported to dss_sharp? Its is the only line that I have to comment in my code to everything works.

I'll take a look at it soon -- indeed it is missing (from all versions, C#, Python and MATLAB) but seems easy to implement with the methods already present in the lower level API.

PMeira commented 5 years ago

@Zecao: I just added get_CktElements and get_Buses.

I'm working on releasing DSS C-API 0.10.1, so I made a pre-release for DSS# while it's not done:

https://github.com/PMeira/dss_sharp/releases/tag/0.10.1a1

If you find any issues, you can replace the dss_capi.dll with version 0.10.0 and it should work fine.

There are probably a few methods still missing in the .NET version, so please feel free to report them if find any.

I also created some more issue tickets to keep track of what is currently planned. I'll probably give priority to #5, since in .NET exceptions are more natural than manually checking the error number.

I'll take a look at it soon -- indeed it is missing (from all versions, C#, Python and MATLAB) but seems easy to implement with the methods already present in the lower level API.

It was actually implemented in Python, it's just exposed a bit differently. I took the opportunity to extend the error checking in DSS C-API for the related functions.

Zecao commented 5 years ago

@Zecao: I just added get_CktElements and get_Buses.

I'm working on releasing DSS C-API 0.10.1, so I made a pre-release for DSS# while it's not done:

https://github.com/PMeira/dss_sharp/releases/tag/0.10.1a1

If you find any issues, you can replace the dss_capi.dll with version 0.10.0 and it should work fine.

I´ve just tested and its working fine. Thank you!

I also created some more issue tickets to keep track of what is currently planned. I'll probably give priority to #5, since in .NET exceptions are more natural than manually checking the error number.

I will download the whole project and try to figure out what have you planned. If I could help in anything...