-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add multicontainer and regular pnnl dopf #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My general rereview is that the use case ran on my machine when tested, but the readability
/ structure of the code base could be improved significantly. Just glancing through the code, I saw many instances where the same logic is repeated multiple time throughout the function.
return self.value | ||
|
||
|
||
def init_branch() -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should pydantic models be used instead to be consistant ?
return A, b | ||
|
||
|
||
def optimal_power_flow( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is unreadable. should be broken down and tested for code complexity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of code repetition in the file. and probably should undergo a through refactoring if the intent is for folks to understand the OPF implementation
@AadilLatif I just copied all that code from https://github.com/pnnl/oedisi_dopf, so I'm not sure about fixing it up... |
To myself: add a CI test. |
) | ||
pcb, qcb = ( | ||
-(-z[1, 2][0] - math.sqrt(3) * z[1, 2][1]), | ||
-(-z[0, 2][1] + math.sqrt(3) * z[1, 2][0]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index is incorrect
337c872
to
9f9b700
Compare
Currently the multicontainer download failsFixed.