From ee4e71e54c0841d6d153c6a90208b4c53f94aa25 Mon Sep 17 00:00:00 2001 From: Brian Mirletz Date: Fri, 9 Dec 2022 16:29:20 -0700 Subject: [PATCH] test replacing the safety factor with a charging efficiency --- shared/lib_battery_dispatch.cpp | 2 +- shared/lib_battery_dispatch_automatic_btm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/lib_battery_dispatch.cpp b/shared/lib_battery_dispatch.cpp index 98aac4108..b8c629172 100644 --- a/shared/lib_battery_dispatch.cpp +++ b/shared/lib_battery_dispatch.cpp @@ -681,7 +681,7 @@ dispatch_automatic_t::dispatch_automatic_t( _mode = dispatch_mode; _weather_forecast_mode = weather_forecast_mode; - _safety_factor = 0.03; + _safety_factor = 0.0; m_batteryPower->canClipCharge = can_clip_charge; m_batteryPower->canSystemCharge = can_charge; diff --git a/shared/lib_battery_dispatch_automatic_btm.cpp b/shared/lib_battery_dispatch_automatic_btm.cpp index 9af8e7f3f..dfca0e300 100644 --- a/shared/lib_battery_dispatch_automatic_btm.cpp +++ b/shared/lib_battery_dispatch_automatic_btm.cpp @@ -446,7 +446,7 @@ void dispatch_automatic_behind_the_meter_t::target_power(double E_useful, size_t if (sorted_grid[ii].Grid() > P_target_min) break; - E_charge += (P_target_min - sorted_grid[ii].Grid())*_dt_hour; + E_charge += (P_target_min - sorted_grid[ii].Grid()) * _dt_hour * m_batteryPower->singlePointEfficiencyACToDC; } E_charge_vec.push_back(E_charge); if (debug)