Skip to content

Commit

Permalink
Backport PR #517: Fix scheduler for Charge Points (#517)
Browse files Browse the repository at this point in the history
* Fix bug: list multiplication refers to the same object; as a consequence, any new device constraint overwrote all previously set device constraints

Signed-off-by: F.N. Claessen <felix@seita.nl>

* changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

Signed-off-by: F.N. Claessen <felix@seita.nl>
  • Loading branch information
Flix6x committed Nov 2, 2022
1 parent b2a9ce2 commit e062a25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions documentation/changelog.rst
Expand Up @@ -2,6 +2,14 @@
FlexMeasures Changelog
**********************

v0.11.3 | November XX, 2022
============================

Bugfixes
-----------
* Fix scheduler for Charge Points when taking into account inflexible devices [see `PR #517 <http://www.github.com/FlexMeasures/flexmeasures/pull/517>`_]


v0.11.2 | September 6, 2022
============================

Expand Down
7 changes: 4 additions & 3 deletions flexmeasures/data/models/planning/charging_station.py
Expand Up @@ -110,9 +110,10 @@ def schedule_charging_station(
]
if inflexible_device_sensors is None:
inflexible_device_sensors = []
device_constraints = [initialize_df(columns, start, end, resolution)] * (
1 + len(inflexible_device_sensors)
)
device_constraints = [
initialize_df(columns, start, end, resolution)
for i in range(1 + len(inflexible_device_sensors))
]
for i, inflexible_sensor in enumerate(inflexible_device_sensors):
device_constraints[i + 1]["derivative equals"] = get_power_values(
query_window=(start, end),
Expand Down

0 comments on commit e062a25

Please sign in to comment.