File tree Expand file tree Collapse file tree 5 files changed +0
-15
lines changed
src/frequenz/sdk/timeseries/formula_engine/_formula_generators Expand file tree Collapse file tree 5 files changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,9 @@ def generate(
7070 "Can't find inverters for all batteries from the component graph."
7171 )
7272
73- builder .push_oper ("(" )
74- builder .push_oper ("(" )
7573 for idx , comp in enumerate (battery_inverters ):
7674 if idx > 0 :
7775 builder .push_oper ("+" )
7876 builder .push_component_metric (comp .component_id , nones_are_zeros = True )
79- builder .push_oper (")" )
8077
8178 return builder .build ()
Original file line number Diff line number Diff line change @@ -50,13 +50,10 @@ def generate( # noqa: DOC502 (FormulaGenerationError is raised indirectly by _g
5050 )
5151 return builder .build ()
5252
53- builder .push_oper ("(" )
54- builder .push_oper ("(" )
5553 for idx , chp_meter_id in enumerate (chp_meter_ids ):
5654 if idx > 0 :
5755 builder .push_oper ("+" )
5856 builder .push_component_metric (chp_meter_id , nones_are_zeros = False )
59- builder .push_oper (")" )
6057
6158 return builder .build ()
6259
Original file line number Diff line number Diff line change @@ -41,12 +41,9 @@ def generate(self) -> FormulaEngine[Power]:
4141 )
4242 return builder .build ()
4343
44- builder .push_oper ("(" )
45- builder .push_oper ("(" )
4644 for idx , component_id in enumerate (component_ids ):
4745 if idx > 0 :
4846 builder .push_oper ("+" )
4947 builder .push_component_metric (component_id , nones_are_zeros = True )
50- builder .push_oper (")" )
5148
5249 return builder .build ()
Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ def generate( # noqa: DOC502
4040 # - `PASSIVE_SIGN_CONVENTION`: `(grid-successor-1 + grid-successor-2 + ...)`
4141 # - `PRODUCTION`: `max(0, -(grid-successor-1 + grid-successor-2 + ...))`
4242 # - `CONSUMPTION`: `max(0, (grid-successor-1 + grid-successor-2 + ...))`
43- builder .push_oper ("(" )
44- builder .push_oper ("(" )
4543 for idx , comp in enumerate (grid_successors ):
4644 if idx > 0 :
4745 builder .push_oper ("+" )
@@ -65,6 +63,5 @@ def generate( # noqa: DOC502
6563 builder .push_component_metric (
6664 comp .component_id , nones_are_zeros = nones_are_zeros
6765 )
68- builder .push_oper (")" )
6966
7067 return builder .build ()
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ def generate( # noqa: DOC502
5757 )
5858 return builder .build ()
5959
60- builder .push_oper ("(" )
61- builder .push_oper ("(" )
6260 for idx , component in enumerate (pv_components ):
6361 if idx > 0 :
6462 builder .push_oper ("+" )
@@ -68,6 +66,5 @@ def generate( # noqa: DOC502
6866 component .component_id ,
6967 nones_are_zeros = component .category != ComponentCategory .METER ,
7068 )
71- builder .push_oper (")" )
7269
7370 return builder .build ()
You can’t perform that action at this time.
0 commit comments