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

Tx losses file has value larger than flows.csv #616

Closed
gschivley opened this issue Jan 29, 2024 · 2 comments
Closed

Tx losses file has value larger than flows.csv #616

gschivley opened this issue Jan 29, 2024 · 2 comments
Assignees
Milestone

Comments

@gschivley
Copy link
Contributor

The transmission losses reported from my model are a couple orders of magnitude larger than the absolute flows for each line. It looks like this commit changed the output calculation from multiplying by ModelScalingFactor to multiplying by ModelScalingFactor^2.

@cfe316, am I reading the code correctly?

@lbonaldo lbonaldo self-assigned this Feb 1, 2024
@lbonaldo lbonaldo added this to the v0.4 milestone Feb 1, 2024
lbonaldo added a commit to lbonaldo/GenX that referenced this issue Feb 2, 2024
@cfe316
Copy link
Collaborator

cfe316 commented Feb 2, 2024

While I believe your statement that there are anomalously high losses, even before that linked commit the output was multiplied by ModelScalingFactor twice! Thanks for finding this bug.

for i in 1:L
   if i in inputs["LOSS_LINES"]
   	tlosses[i,:] = value.(EP[:vTLOSS])[i,:] * ModelScalingFactor     # once
   end
   ...
end
dfTLosses = hcat(dfTLosses, DataFrame(tlosses * ModelScalingFactor, :auto))     # twice

lbonaldo added a commit to lbonaldo/GenX that referenced this issue Feb 2, 2024
lbonaldo added a commit that referenced this issue Feb 3, 2024
Fix scaling of tx losses in tlosses.csv #616
@lbonaldo
Copy link
Collaborator

lbonaldo commented Feb 3, 2024

Thank you, @gschivley, for opening this issue! Fixed in #622 (main) and #621 (develop).

@lbonaldo lbonaldo closed this as completed Feb 3, 2024
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

No branches or pull requests

3 participants