Skip to content

Commit

Permalink
Put back tweak plan option for now (#448)
Browse files Browse the repository at this point in the history
* Put back tweak plan option for now

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
springfall2008 and pre-commit-ci-lite[bot] authored Dec 11, 2023
1 parent c6d3e73 commit 8eeaedd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@
{"name": "car_charging_plan_smart", "friendly_name": "Car Charging Plan Smart", "type": "switch", "default": False},
{"name": "car_charging_from_battery", "friendly_name": "Allow car to charge from battery", "type": "switch", "default": False},
{"name": "calculate_discharge_oncharge", "friendly_name": "Calculate Discharge on charge slots", "type": "switch", "enable": "expert_mode", "default": True},
{"name": "calculate_second_pass", "friendly_name": "Calculate second pass (slower)", "type": "switch", "enable": "expert_mode", "default": False},
{"name": "calculate_second_pass", "friendly_name": "Calculate full second pass (slower)", "type": "switch", "enable": "expert_mode", "default": False},
{"name": "calculate_tweak_plan", "friendly_name": "Calculate tweak second pass (faster)", "type": "switch", "enable": "expert_mode", "default": False},
{"name": "calculate_inday_adjustment", "friendly_name": "Calculate in-day adjustment", "type": "switch", "enable": "expert_mode", "default": True},
{
"name": "calculate_plan_every",
Expand Down Expand Up @@ -9027,7 +9028,7 @@ def fetch_config_options(self):
self.calculate_discharge_oncharge = self.get_arg("calculate_discharge_oncharge")
self.calculate_second_pass = self.get_arg("calculate_second_pass")
self.calculate_inday_adjustment = self.get_arg("calculate_inday_adjustment")
self.calculate_tweak_plan = False
self.calculate_tweak_plan = self.get_arg("calculate_tweak_plan")

self.balance_inverters_enable = self.get_arg("balance_inverters_enable")
self.balance_inverters_charge = self.get_arg("balance_inverters_charge")
Expand Down
6 changes: 6 additions & 0 deletions docs/customisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ See the Predbat mode setting as above for basic calculation options
**switch.predbat_calculate_discharge_oncharge** (_expert mode_) When True calculated discharge slots will
disable or move charge slots, allowing them to intermix. When False discharge slots will never be placed into charge slots.

**switch.predbat_calculate_tweak_plan** (_expert mode_) When True causes Predbat to perform a second pass optimisation
across the next 8 charge and discharge windows in time order.

This can help to slightly improve the plan for tariffs like Agile but can make it worse in some fixed rate tariffs which
you want to discharge late.

**switch.predbat_calculate_second_pass** (_expert mode_) When True causes Predbat to perform a second pass optimisation
across all the charge and discharge windows in time order.

Expand Down

0 comments on commit 8eeaedd

Please sign in to comment.