Skip to content

Commit

Permalink
refactor: account for terminals at either end of HVDC
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen committed Oct 15, 2020
1 parent b290f04 commit c575e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion powersimdata/design/investment/investment_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _calculate_single_line_cost(line, bus):
# Calculate cost
mw_miles = miles * line.Pmax
line_cost = mw_miles * const.hvdc_line_cost["costMWmi"]
total_cost = line_cost + const.hvdc_terminal_cost_per_MW * line.Pmax
total_cost = line_cost + 2 * const.hvdc_terminal_cost_per_MW * line.Pmax
return total_cost

bus = grid_new.bus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_calculate_ac_inv_costs(mock_grid):


def test_calculate_dc_inv_costs(mock_grid):
expected_dc_cost = 10 * 679.1799258421203 * 457.1428571 + 135e3 * 10
expected_dc_cost = 10 * 679.1799258421203 * 457.1428571 + 135e3 * 10 * 2
dc_cost = _calculate_dc_inv_costs(mock_grid)
assert dc_cost == pytest.approx(expected_dc_cost)

Expand Down

0 comments on commit c575e73

Please sign in to comment.