Closed felipemarkson closed 1 year ago
Pretty sure it's not a bug. I can confirm another day.
SetActiveElement
doesn't activate the element in the component-specific lists. Use Transformers.Name("T5337697B")
instead and it should work. For large-scale analysis, prefer Transformer.Idx
to avoid any strings.
If you inspect Transformers.Name()
in your sample, you'll probably see that your target transformer is not active there.
Thanks very much, @PMeira!
You are right, SetActiveElement
was not activating the element!
Transformers.Name
works fine, thanks!
Is this also apply to PDElements.Name
?
If yes, what is the point of SetActiveElement
?
I also think that this could be on the documentation to avoid misunderstandings.
Is this also apply to PDElements.Name?
I think so. For most elements, each interface uses a dedicated list. The only oddity is Lines, which reuses the current active circuit element.
If yes, what is the point of SetActiveElement?
Not every component has a dedicated interface, so that's useful in those situations, for example. Internally, OpenDSS also uses some similar functions when a general circuit element is required.
This behavior is inherited from the official implementation so we cannot change it. Our future alternative API should remove this limitation and others, but we will leave the current API intact both for backwards compatibility with our previous versions and on-going compatibility with the official OpenDSS concepts.
Closing this one in favor of https://github.com/dss-extensions/dss-extensions/issues/12
EDIT: An exploration of this topic is now available at https://dss-extensions.org/classic_api#the-active-paradigm
Hi guys!
I'm facing a weird issue once I run a large distribution system. The
Transformers.kVA
is give me wrong values, but theProperties.Value("kVA")
is right, comparing with OpenDSS.Here is an example with the IEEE 8500 Node in the
OpenDSS\IEEETestCases\8500-Node
folder.But If I try a small distribution system, the
Transformers.kVA()
works here on my tests.Is this a bug?
cc @Ibrahim-a-Ibrahim