Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed Aug 23, 2023
1 parent 607c733 commit 77f1f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/analysis/test_custom_financial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/hybrid/test_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 77f1f5f

Please sign in to comment.