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

Fix docstring of DCPPowerModel #911

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Fix docstring of DCPPowerModel #911

merged 2 commits into from
Apr 17, 2024

Conversation

odow
Copy link
Collaborator

@odow odow commented Apr 17, 2024

Closes #910

I don't have the domain knowledge to know whether this is correct.

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.85%. Comparing base (57d382d) to head (cc094a4).

❗ Current head cc094a4 differs from pull request most recent head 83c26e2. Consider uploading reports for the commit 83c26e2 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #911      +/-   ##
==========================================
- Coverage   94.19%   93.85%   -0.35%     
==========================================
  Files          43       43              
  Lines        9618     9589      -29     
==========================================
- Hits         9060     9000      -60     
- Misses        558      589      +31     
Files Coverage Δ
src/core/types.jl 100.00% <ø> (ø)

... and 18 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57d382d...83c26e2. Read the comment docs.

@@ -156,7 +156,7 @@ abstract type AbstractDCPModel <: AbstractActivePowerModel end
Linearized 'DC' power flow Model with polar voltage variables.

This model is a basic linear active-power-only approximation, which uses branch susceptance values
`br_b = -br_x / (br_x^2 + br_x^2)` for determining the network phase angles. Furthermore, transformer
`br_b = -br_x / (br_x^2 + br_r^2)` for determining the network phase angles. Furthermore, transformer
Copy link
Member

Choose a reason for hiding this comment

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

This is a correct fix but the convention is that r comes before x, so (br_r^2 + br_x^2) would be more standard.

the reason is the complex number Z = r + x im, then |Z|^2 = r^2 + x^2

src/core/types.jl Outdated Show resolved Hide resolved
@ccoffrin ccoffrin merged commit 8e346b4 into master Apr 17, 2024
13 checks passed
@ccoffrin
Copy link
Member

Thanks!

@odow odow deleted the odow-patch-2 branch October 22, 2024 21:09
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.

Documentation: DCPPowerModel description text
2 participants