Conversation
|
|
||
|
|
||
| def test_add_dcline_argument_wrong_bus(capsys): | ||
| ct = ChangeTable('Eastern') |
There was a problem hiding this comment.
This set of tests seems a bit slow, and I think it's due to the bottleneck in spinning up new Grid objects, which has the bottleneck in making the gencost tables. It would be nice if we could either make one Eastern ChangeTable and do a deepcopy on it in each test to speed these up, or perhaps have a special flag we can pass to ChangeTable and Grid to avoid the slow parts of instantiation when we do not need them, but these are nice-to-have ideas and are not required for this PR.
There was a problem hiding this comment.
I think it can be done quickly if we use the same interconnect for each test and use the clear method in each test to make sure that we deal with an empty dictionary.
|
This function seems clean and well-tested. After the check on the values passed to |
danielolsen
left a comment
There was a problem hiding this comment.
Looks great, thanks!
Purpose
Add HVDC line to existing HVDC lines following method exposed in issue #114
What is the code doing?
Create a
new_dclinekey in change table via theadd_dclinemethod of theChangeTableobject. The value is a list and each entry in the list contains the information needed to add a new HVDC line to the network. Via theScalerobject, the HVDC lines are appended to the existingdclinedata frame of theGridobject.Where to look
add_dclinehas been created.add_dclinemethod of theChangeTableobject is tested.dclinedata frame of theGridobject.Time estimate
30 min.
Test
Tests pass, including the newly written:
Using the following script mimicking what is done in the
Scalerobject I was able to test the methodology for Texas where there is no existing HVDC line (emptydclinedata frame inGridobject) and for USA where there are 17 HVDC lines:Output for Texas:
Output for USA: