Skip to content

Commit

Permalink
Fix order of setting links bi-directional
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Feb 19, 2025
1 parent b91bfaa commit e39a1ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions etrago/execute/market_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,14 @@ def build_shortterm_market_model(self, unit_commitment=False):
m.stores.e_cyclic = False
m.storage_units.cyclic_state_of_charge = False

m.links.loc[m.links.carrier.isin(["CH4", "DC", "AC"]), "p_min_pu"] = -1.0

self.market_model = m

if unit_commitment:
set_unit_commitment(self, apply_on="market_model")

self.market_model.links.loc[self.market_model.links.carrier.isin(
["CH4", "DC", "AC", "H2_grid"]), "p_min_pu"] = -1.0

# Set country tags for market model
self.buses_by_country(apply_on="market_model")
self.geolocation_buses(apply_on="market_model")
Expand Down

0 comments on commit e39a1ca

Please sign in to comment.