Skip to content

Commit

Permalink
test: ensure transformer cost test uses regional multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen committed Oct 16, 2020
1 parent 4306c0a commit bfd100d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions powersimdata/design/investment/tests/test_investment_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
mock_branch = {
"branch_id": [10, 11, 12, 13, 14],
"rateA": [0, 10, 1100, 30, 40],
"from_bus_id": [2010228, 2010228, 2010319, 2010319, 2010320],
"to_bus_id": [2021106, 2021106, 2021106, 2010320, 2010319],
"from_bus_id": [2010228, 2010228, 2010319, 2010319, 2021106],
"to_bus_id": [2021106, 2021106, 2021106, 2010320, 2021106],
"branch_device_type": 3 * ["Line"] + 2 * ["Transformer"],
}
mock_branch["from_lat"] = [
Expand Down Expand Up @@ -83,7 +83,8 @@ def test_calculate_ac_inv_costs(mock_grid):
# ((reg_mult1 + reg_mult2) / 2) * sum(basecost * rateA * miles)
"line_cost": ((1 + 2.25) / 2)
* (3666.67 * 10 * 679.179925842 + 1500 * 1100 * 680.986501516),
"transformer_cost": (30 + 40) * 7670,
# for each: rateA * basecost * regional multiplier
"transformer_cost": (30 * 7670 * 1) + (40 * 8880 * 2.25),
}
ac_cost = _calculate_ac_inv_costs(mock_grid)
assert ac_cost.keys() == expected_ac_cost.keys()
Expand Down

0 comments on commit bfd100d

Please sign in to comment.