From 77f1f5fcc4a0671184aaa637a5313aa78540d129 Mon Sep 17 00:00:00 2001 From: Darice Date: Wed, 23 Aug 2023 13:29:06 -0600 Subject: [PATCH] fix tests --- tests/analysis/test_custom_financial.py | 8 ++++---- tests/hybrid/test_battery.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/analysis/test_custom_financial.py b/tests/analysis/test_custom_financial.py index 567f445c4..3cdf681de 100644 --- a/tests/analysis/test_custom_financial.py +++ b/tests/analysis/test_custom_financial.py @@ -274,12 +274,12 @@ def test_hybrid_simple_pv_with_wind_storage_dispatch(site): # Test wind + simple PV (pvwattsv8) + storage with dispatch hybrid plant with custom financial model annual_energy_expected_pv = 9882421 annual_energy_expected_wind = 33637983 - annual_energy_expected_battery = -31287 - annual_energy_expected_hybrid = 43489117 + annual_energy_expected_battery = -97166 + annual_energy_expected_hybrid = 43423237 npv_expected_pv = -1898253 npv_expected_wind = -4664335 - npv_expected_battery = -8163435 - npv_expected_hybrid = -14726773 + npv_expected_battery = -8183538 + npv_expected_hybrid = -14746114 interconnect_kw = 15000 pv_kw = 5000 diff --git a/tests/hybrid/test_battery.py b/tests/hybrid/test_battery.py index 3d1860be0..2b82f3c3e 100644 --- a/tests/hybrid/test_battery.py +++ b/tests/hybrid/test_battery.py @@ -139,7 +139,7 @@ def test_batterystateless_dispatch(): battery_sl._system_model, battery_sl._financial_model, 'battery', - default_options) + HybridDispatchOptions()) model_sl.test_objective = pyomo.Objective( rule=create_test_objective_rule, @@ -204,7 +204,7 @@ def test_batterystateless_cycle_limits(): results = HybridDispatchBuilderSolver.glpk_solve_call(model_sl) assert results.solver.termination_condition == TerminationCondition.optimal - assert pyomo.value(model_sl.test_objective) == pytest.approx(expected_objective, 1e-5) + assert pyomo.value(model_sl.test_objective) == pytest.approx(expected_objective, 1e-3) battery_sl.simulate_with_dispatch(48, 0)