Asymmetric line flow (Refined); READY FOR REVIEW !!!#789
Asymmetric line flow (Refined); READY FOR REVIEW !!!#789sambuddhac wants to merge 52 commits intodevelopfrom
Conversation
0002caf to
0e224c5
Compare
|
Hi @JesseJenkins and @lbonaldo , I have pushed all the modifications to the code base for this PR. Few things to note: First of all, as you will see, it's way more lengthy and complicated than what Jesse suggested to me previously. I first tried with the simpler version. But, was getting bidirectional flows on the asymmetric lines with Qian's example case even when we restricted the flow limits to zero in one of the directions for the asymmetric lines. With some pondering, I realized that I was doing wrong indexing on the constraints and decision variables. So, I had to do a bit more digging and refining the code. The fundamental reasons for which the code is so much lengthier are: 1) I have both symmetric as well as asymmetric lines in a system and 2) In order to maintain backward compatibility with the existing example cases (As you will observe, I had to go to lengths to split the data-frame into two parts and assign separate variables and constraint names so that things stay clean and correct. I could not find an easier way to do this. I'll highly appreciate any feedback on this). We tested with @qluo0320github 's example cases and it seems the results are sensible (?) However, I still get discrepancies when I benchmark against an actually symmetric system versus a "simulated" symmetric system (in which the asymmetric lines have the same flow limits, loss percentages, and transmission buildout in both directions). I am attaching hereby all the relevant flow comparison I scrutinized the code several times, but couldn't spot any flaw so far. I would appreciate if you could point some obvious bug (if at all) that I might have missed. Also, I would appreciate taking a look at the quadratic loss formulation. I believe I did it right, but am not totally certain. Thank you so much !!! I have also updated most of the doc pages; I will wrap up parts of the transmission.jl doc page and make another push to close this. |
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 280 to 282 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 289 to 290 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 294 to 297 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 470 to 471 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 473 to 474 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 548 to 549 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 551 to 552 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 558 to 559 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 561 to 562 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 625 to 626 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 628 to 629 in 7d90bd9
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 628 to 629 in 146916a
[JuliaFormatter] reported by reviewdog 🐶
GenX.jl/src/model/core/transmission/transmission.jl
Lines 631 to 632 in 146916a
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
1d3943a to
6fc5330
Compare
example_systems/1_three_zones_asymmetric_bidirectional/settings/genx_settings.yml
Outdated
Show resolved
Hide resolved
example_systems/1_three_zones_asymmetric_bidirectional/system/Network.csv
Outdated
Show resolved
Hide resolved
...tems/6_three_zones_w_multistage_asymmetric_bidirectional/inputs/inputs_p3/system/Network.csv
Show resolved
Hide resolved
There was a problem hiding this comment.
First round of review. Thanks @sambuddhac for this PR. In your opinion, which example case should we keep? The branch is now rebased with the latest develop.
…al flag is turned on but the corresponding columns are not provided in the Networks.csv
…xpansion lines in network load file to speed up computation
…onal flows and fixed the loss writing
…ample cases to test multistage asymmetric builds
Add warning for potential issues with asymmetric flow in multistage capacity expansion.
6e87ae1 to
5e7bdac
Compare
sambuddhac
left a comment
There was a problem hiding this comment.
Reviewed and approved !!!
|
This now looks good. However, I cannot view the change requested @lbonaldo , as I mentioned earlier. Can you please let me know at your earliest convenience? Otherwise, now it looks all good. Can be merged. I also resolved one conflict on the CHANGELOG. Thanks !!! |
| OverwriteResults: 1 | ||
| AsymmetricalTransFlowLimit: 1 No newline at end of file |
There was a problem hiding this comment.
I probably wouldn't modify the precompile case. Do we have a specific reason for this change?
There was a problem hiding this comment.
Thanks for the feedback, Luca. I think the reason I was doing it initially, is because I wasn't sure if the changes would impact the precompile. But, we can surely have the original precompile.
| L = inputs["L"] | ||
|
|
||
| NetworkExpansion = setup["NetworkExpansion"] | ||
| MultiStage = setup["MultiStage"] |
There was a problem hiding this comment.
Is this line being used?
| L_sym = inputs["L_sym"] # Number of transmission lines with symmetrical bidirectional flow | ||
| L_asym = inputs["L_asym"] #Default number of asymmetrical lines | ||
| # Number of lines in the network | ||
| L = L_sym + L_asym |
There was a problem hiding this comment.
Are L_sym and L_asym being used in other places other than at this line? If not, we could keep using L.
| "PoliciesFolder" => "policies", | ||
| "ObjScale" => 1) | ||
| "ObjScale" => 1, | ||
| "AsymmetricalTransFlowLimit" => 0 |
There was a problem hiding this comment.
We need to update the documentation with this new settings key.
lbonaldo
left a comment
There was a problem hiding this comment.
Hi @sambuddhac, thank you for your recent changes to this PR. I’m doing a more comprehensive review, but in the meantime, I added a few more comments.
Do we want to keep all the new example cases? Right now we have 8 example cases for single stage, and 4 for multi-stage.
Description
This PR attempts to introduce bidirectional asymmetric transmission lines into the system. Such lines have different values of MW flow limits, loss percentage, and capacity expansion limits along the two directions. While doing so, this PR also ensures that there are also symmetric lines present in the system along with the asymmetric lines and modifies the code in such a way that backwards compatibility is maintained with the existing cases.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Checklist
How this can be tested
Post-approval checklist for GenX core developers
After the PR is approved