Skip to content
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

adding LODF and GLODF code #449

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

RyanVaughan
Copy link

Initial request to merge generalized line outage distribution factor (GLODF) code. Let me know of any feedback.

@jinningwang
Copy link
Member

Dear RyanVaughan,

Thanks a lot for your contribution. Before we finally merge it, I have two comments:

  1. It might be better to have a PR towards develop branch.
  2. It might be better to have a short description to introduce this new routine, such as its function.

A[l,self.system.Line.bus2.v[l]-1] = 1

# delete all slack rows as required
Ar = np.delete(A, np.asarray(self.system.Slack.bus.v)-1, axis=1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will fail if self.system.Slack.bus.v contains non-numerical values. Slack.bus.v contains references to bus idxes, which are not guaranteed numerals.

You can call self.system.Bus.idx2uid(self.system.Slack.bus.v) to retrieve 0-based index of the Slack bus id.

change_lines = np.atleast_1d(change_lines)
psi = self.get_isf()

slack = np.array(self.system.Slack.bus.v)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A similar issue here. Consider generalizing it.

Comment on lines 100 to 101
bfrom = np.asarray(self.system.Line.bus1.v)[change_lines - 1]
bto = np.asarray(self.system.Line.bus2.v)[change_lines - 1]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem with these indices.

@jinningwang
Copy link
Member

Considering it is more like a steady state analysis, I add similar functionalities in AMS.

https://github.com/CURENT/ams/blob/fcc7e579c8f7453fae3ddebbd0eedbe4e463c1c9/ams/core/matprocessor.py#L395-L518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants