-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSSObject.Field() = Value::Float64
should throw an error if the left hand side is only a getter function call
#105
Comments
@kdheepak Thank you for your excellent example to clear my misconceptions. I had no idea about this thing in julia (or maybe this is normal in other popular languages too?) Is it an acceptable thing to be able to attach more functions/fields for a module object from outside the module? (Sorry for my poorly phrased question) My apologies for blaming ODD.jl for this issue. |
@Realife-Brahmin, you can add
I did see some issues still open in the Julia repo related to that, but no recent updates. For example: JuliaLang/julia#15602 Like @kdheepak wrote, that's more a Julia feature (maybe missing some control) than an issue with ODD.jl. In Python/ODD.py, we had a similar issue in the past, and now it does generate errors: we added classes, keeping the modules for backwards compat -- we now have far fewer surprised users there. Maybe something similar could be done here -- keep the current modules, and add structures to allow more control. I'm not sure if it would fine well with the rest. For #82, maybe we could test some alternatives, like using structs and defining custom Regarding this:
We mirror what's done in the official OpenDSS API, so we made no decision there: https://opendss.epri.com/Pmpp.html Why not kW? If you want to manipulate the power directly, you probably shouldn't be using PVSystem, since it's main functionally is to couple some quantities (irradiance, efficiency, temperature) and related curves with some form of control to compute the powers (kW and kvar). Using a generator or even a negative load is a simpler alternative to model PV generation in some contexts; it all depends on the study and what input data you have available. If you want to change the size of the PVSystem, you should use |
Sorry for the late reply and thank you Paulo @PMeira for patiently answering all of my questions and even providing details on the design decisions and recommended practices. |
Earlier I was trying to set my PV real and reactive power values by using the first two sets of locs:
(assume I am iterating over PVs correctly, locs for the same not shown in this example)
ODD.jl should throw an error for the first kind of
getter call = value
locs.This way, a user:
kW()
is indeed a getter function.It is true that the doc lists
PVsystems.kW()
as a getter function, but a user like me usually works in this manner:PVsytems.
and pressing the Tab key)PS: I apologize for the long message which kinda looks like a rant.
The text was updated successfully, but these errors were encountered: