From f3e4440b6d998de4307cb8b6032c2b4b73ea9b43 Mon Sep 17 00:00:00 2001 From: fboundy Date: Wed, 27 Mar 2024 17:20:35 +0000 Subject: [PATCH] log plunge --- apps/pv_opt/pvpy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/pv_opt/pvpy.py b/apps/pv_opt/pvpy.py index 7824627..51a8518 100644 --- a/apps/pv_opt/pvpy.py +++ b/apps/pv_opt/pvpy.py @@ -634,7 +634,8 @@ def optimised_force(self, initial_soc, static_flows, contract: Contract, **kwarg axis=1, ) plunge_cost = round(contract.net_cost(df).sum(), 1) - self.log(f"Plunge cost: {plunge_cost}") + if log: + self.log(f"Plunge cost: {plunge_cost}") base_cost = plunge_cost # --------------------------------------------------------------------------------------------