dss-extensions / OpenDSSDirect.py

OpenDSSDirect.py: a cross-platform Python package that implements a native/direct library interface to the alternative OpenDSS engine from DSS-Extensions.org

Home Page:https://dss-extensions.org/OpenDSSDirect.py/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce Shortlines and Laterals

keithmoffat opened this issue · comments

Versions

  • Python version: 3.7.11
  • Python architecture: x64
  • Operating system and version: OSX 11
  • OpenDSSDirect.py version number: 0.6.1

Support Question

I just sent this question in to the dss SourceForge forum, but I am not clear where opendssdirect.py questions below so I am putting it here as well. Please feel free to delete.

I have been trying to use the "Reduce" tools that were introduced to dss in 2019 (https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Doc/Circuit%20Reduction%20for%20Version8.pdf) in opendssdirect, but I'm not having any luck. I have tried the following code:

dss.run_command(f'Set ReduceOption = Shortlines [Zmag={min_impedance}]')
dss.run_command('Reduce')

but the code is not removing the small impedance lines in my test network.

I am wondering if the reduce tools that were introduced in 2019 have been incorporated into opendssdirect.py yet. If so, perhaps the commands I am using are wrong.

For things specific to ODD.py, it's better to ask here. For questions about general OpenDSS things, I'd expect the forum would be better. I already replied there earlier, things are working as expected here.

Have you tested the commands as suggested in the PDF you linked? With the example (ckt5), it seems fine.

As the PDF also mentions, you need an energy meter and a valid/initialized system for running the "Reduce" command. A bunch of things do require energy meters in OpenDSS.

On our side (DSS Extensions), we could do to trigger an error message and warn the user to add an energy meter before running the command and so on. Note that if you call from the functions from opendssdirect.ReduceCkt, our version already has more checks than the official one.

I'm not sure if the code of the implementation is of any use, but it's here:
https://github.com/dss-extensions/dss_capi/blob/361090d1b0f8f5a6ad3a91ba764ee1c5ecf1b993/src/Meters/ReduceAlgs.pas#L124-L303

(Lots of duplicated code there, I'll try to clean this up a bit someday)

Thank you Paulo, apologies for the duplicate question. I will link this conversation from the SourceForge conversation for folks who might come across it in the future.

I did not know about the energy meter, thank you for the heads up. Do you just need one energy meter, e.g. on the substation, or do you need multiple energy meters?

Do you just need one energy meter, e.g. on the substation, or do you need multiple energy meters?

One should be enough.

Got it, thanks Paulo.