Skip to content

Commit

Permalink
readd ds["TradeCapacityToActivityUnit"]
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardxtg committed Nov 4, 2024
1 parent 570e39b commit a7f6525
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tz/osemosys/model/constraints/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,14 @@ def add_trade_constraints(ds: xr.Dataset, m: Model, lex: Dict[str, LinearExpress

# Capacity
con = lex["GrossTradeCapacity"] * ds["TradeRoute"] * (
1
- ds["TradeLossBetweenRegions"]
# ) >= m["Export"] / (ds["TradeCapacityToActivityUnit"] * ds["YearSplit"])
) >= m["Export"] / (ds["YearSplit"])
1 - ds["TradeLossBetweenRegions"]
) >= m["Export"] / (ds["TradeCapacityToActivityUnit"] * ds["YearSplit"])
m.add_constraints(con, name="TC1a_TradeConstraint_Export")

con = lex["GrossTradeCapacity"] * ds["TradeRoute"] * (
1 - ds["TradeLossBetweenRegions"]
) >= m["Import"].rename({"REGION": "_REGION", "_REGION": "REGION"}) / (
# ds["TradeCapacityToActivityUnit"] * ds["YearSplit"]
ds["YearSplit"]
ds["TradeCapacityToActivityUnit"] * ds["YearSplit"]
)
m.add_constraints(con, name="TC1b_TradeConstraint_Import")

Expand Down

0 comments on commit a7f6525

Please sign in to comment.