Skip to content

Commit

Permalink
-return simple clearing to the initial state
Browse files Browse the repository at this point in the history
-as this wasn't the issue
  • Loading branch information
nick-harder committed Sep 28, 2023
1 parent 6449ac3 commit ac6f415
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assume/markets/clearing_algorithms/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,17 @@ def clear(
elif diff > 0:
# generation left over - split last generation bid
supply_order = to_commit[-1]
split_supply_order = supply_order.copy()
split_supply_order["volume"] = diff
supply_order["accepted_volume"] = supply_order["volume"] - diff

# changed supply_order is still part of to_commit and will be added
# only volume-diff can be sold for current price
gen_vol -= diff

# add left over to supply_orders again
supply_orders.insert(0, split_supply_order)

else:
demand_order["accepted_volume"] = demand_order["volume"]

Expand Down

0 comments on commit ac6f415

Please sign in to comment.