diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 819f849b1..8335437ee 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1752,6 +1752,19 @@ def adjust_endogenous_transport(n): "land transport fuel cell": cost_FCE, "land transport oil": cost_ICE, } + + # add dummy generator only needed for solving with glpk with higher solver tolerance + n.add("Carrier", "dummy transport", color="#dd2e23", nice_name="Dummy transport") + buses_i = n.buses[n.buses.carrier=="land transport demand"].index + n.madd( + "Generator", + buses_i, + " load", + bus=buses_i, + carrier="load", + marginal_cost=1e5, + p_nom=1e9, + ) for car_type, cost in costs_car_type.items(): car_i = n.links[n.links.carrier == car_type].index