Skip to content

Commit

Permalink
fix loading results twice
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Garcia Reolid <[email protected]>
  • Loading branch information
victorgarcia98 committed Jul 31, 2023
1 parent af887dc commit 2f5c1c0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions flexmeasures/data/models/planning/linear_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,6 @@ def device_scheduler( # noqa C901
initial_stock,
)

# load the results only if a feasible solution has been found
if len(results.solution) > 0:
model.solutions.load_from(results)

planned_costs = value(model.costs)
planned_power_per_device = []
for d in model.d:
Expand Down

0 comments on commit 2f5c1c0

Please sign in to comment.