Skip to content

Commit

Permalink
fix calculation of flexable storage bids
Browse files Browse the repository at this point in the history
bids positive if average price is greater
else bids negative
only bids with the actual marginal price and not with the average_price
  • Loading branch information
maurerle committed Dec 20, 2023
1 parent dd9a744 commit 8434409
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions assume/strategies/flexable_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,19 @@ def calculate_bids(
price_forecast=price_forecast,
)

if price_forecast[start] >= average_price / unit.efficiency_discharge:
if price_forecast[start] >= average_price:
price = average_price / unit.efficiency_discharge
bid_quantity = max_power_discharge[start]
elif price_forecast[start] <= average_price * unit.efficiency_charge:
bid_quantity = max_power_charge[start]
else:
previous_power = current_power
continue
price = average_price * unit.efficiency_charge
bid_quantity = max_power_charge[start]

bids.append(
{
"start_time": start,
"end_time": end,
"only_hours": None,
"price": average_price,
"price": price,
"volume": bid_quantity,
}
)
Expand Down

0 comments on commit 8434409

Please sign in to comment.