Skip to content

Commit 0b69cba

Browse files
authored
Fix demand fulfillment check (#590)
* Switch demand fulfillment check to annual * More informative error message * Revert "More informative error message" This reverts commit 11ac0c5.
1 parent d44fbb3 commit 0b69cba

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/muse/mca.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ def check_demand_fulfillment(market: Dataset, tol: float) -> bool:
499499
from logging import getLogger
500500

501501
future = market.year[-1].item()
502-
delta = (market.supply - market.consumption).sel(year=future)
502+
delta = (market.supply.sum("timeslice") - market.consumption.sum("timeslice")).sel(
503+
year=future
504+
)
503505
unmet = (delta < tol).any([u for u in delta.dims if u != "commodity"])
504506

505507
if unmet.any():

0 commit comments

Comments
 (0)