We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35b4ecd commit ef7b7f1Copy full SHA for ef7b7f1
1 file changed
src/muse/mca.py
@@ -565,13 +565,17 @@ def check_demand_fulfillment(market: Dataset, tol: float) -> bool:
565
"""
566
from logging import getLogger
567
568
- future = market.year[-1]
+ future = market.year[-1].item()
569
delta = (market.supply - market.consumption).sel(year=future)
570
unmet = (delta < tol).any([u for u in delta.dims if u != "commodity"])
571
572
if unmet.any():
573
commodities = ", ".join(unmet.commodity.sel(commodity=unmet.values).values)
574
- getLogger(__name__).warning(f"Check growth constraints for {commodities}.")
+ msg = (
575
+ f"Consumption exceeds supply in the year {future} for the following "
576
+ f"commodities: {commodities} "
577
+ )
578
+ getLogger(__name__).warning(msg)
579
580
return False
581
0 commit comments