From bfd100da7b72b6854c5e32993d45edbea5c9aa7a Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Thu, 15 Oct 2020 15:34:48 -0700 Subject: [PATCH] test: ensure transformer cost test uses regional multiplier --- .../design/investment/tests/test_investment_costs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/powersimdata/design/investment/tests/test_investment_costs.py b/powersimdata/design/investment/tests/test_investment_costs.py index 14e1fd546..6c42e461f 100644 --- a/powersimdata/design/investment/tests/test_investment_costs.py +++ b/powersimdata/design/investment/tests/test_investment_costs.py @@ -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"] = [ @@ -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()