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

feat: enable differential pmin/pmax for DC lines #91

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

danielolsen
Copy link
Contributor

@danielolsen danielolsen commented Dec 11, 2020

Purpose

Interpret the Pmin and Pmax of DC lines, don't assume symmetry using just the Pmax.
Closes #87.

What is the code doing

Walking through in order of execution:

  • In read.jl, we look at the Pmin and Pmax columns of the DC line table, not just Pmax.
  • In types.jl, we expect these new entries in the Case struct, which will get created based on what we got in read.jl.
  • In model.jl:
    • In _make_sets, we change how we build the noninf_branch_idx set, since we now have case.dcline_pmax and case.dcline_pmin instead of case.dcline_rating. We also make sure that we do the replacement of 0 capacity -> Inf for AC lines only, not DC lines (since we may have a DCline with e.g. -100 Pmin and 0 Pmax).
    • In -build_model, we use the new case.dcline_pmin and case.dcline_pmax to create separate branch limits for + and -: branch_pmin and branch_pmax instead of the previous symmetric branch_rating. Then, we use these in building the constraints.

Testing

This is provisional code. I've done some limited local testing (thanks to the command-line extract_data.py options from @ahurli, see #75), and this appears to work properly on symmetrical DC lines for existing scenarios. I still need to do testing for asymmetrical lines, but I'm reasonably confident in this code, since the changes are fairly straightforward.

Time to review

15 minutes. The code changes are minor but meaningful.

@danielolsen danielolsen self-assigned this Dec 11, 2020
@BainanXia
Copy link
Collaborator

All the modifications make sense to me

@danielolsen danielolsen marked this pull request as ready for review December 11, 2020 19:54
Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

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

The change looks good to me. But I haven't run any tests on my side regarding adding asymmetric HVDC lines in a scenario yet. I trust you @danielolsen

@danielolsen
Copy link
Contributor Author

The change looks good to me. But I haven't run any tests on my side regarding adding asymmetric HVDC lines in a scenario yet. I trust you @danielolsen

I will run an integration test with the changes in PowerSimData before I merge either :)

I'm thinking of replacing one of the big HVDC lines in the west with two uni-directional lines, that should show that each line is being limited properly and that the sum of the two is equal to a bidirectional.

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.

Add support for asymmetric DC lines
2 participants