Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to multiple phases if soc < min_soc during in automatic mode #1276

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/control/ev.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,16 @@ def _check_phase_switch_conditions(self,
# verbleibender EVU-Überschuss unter Berücksichtigung der Einspeisegrenze und Speicherleistung
all_surplus = (-evu_counter.calc_surplus() - evu_counter.data.set.released_surplus +
evu_counter.data.set.reserved_surplus - feed_in_yield)
condition_1_to_3 = (((max(get_currents) > max_current and
all_surplus > self.ev_template.data.min_current * max_phases_ev * 230
- get_power) or limit == LimitingValue.UNBALANCED_LOAD.value) and
min_soc = self.charge_template.data.chargemode.pv_charging.min_soc
soc = self.data.get.soc
log.debug(f'min_soc: {min_soc}%, soc: {soc}%')
condition_1_to_3 = ((min_soc != 0 and soc < min_soc) or
((max(get_currents) > max_current and
all_surplus > self.ev_template.data.min_current * max_phases_ev * 230
- get_power) or limit == LimitingValue.UNBALANCED_LOAD.value) and
phases_in_use == 1)
condition_3_to_1 = max(get_currents) < min_current and all_surplus <= 0 and phases_in_use > 1
condition_3_to_1 = ((min_soc == 0 or (min_soc != 0 and soc >= min_soc)) and
max(get_currents) < min_current and all_surplus <= 0 and phases_in_use > 1)
if condition_1_to_3 or condition_3_to_1:
return True, None
else:
Expand Down