Simplify industry load-link-bus to avoid numerical problems

Gurobi had numerical problems solving the system.

Trivial load-link-bus combinations to manage CO2 have been replaced
with simple loads.
This commit is contained in:
Tom Brown 2019-07-19 12:10:22 +02:00
parent 06cb526fef
commit 03670c1ab3
2 changed files with 27 additions and 31 deletions

View File

@ -2,7 +2,7 @@ logging_level: INFO
results_dir: 'results/' results_dir: 'results/'
summary_dir: results summary_dir: results
run: '190718-new_industry' run: '190719-new_industry'
scenario: scenario:
sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ] sectors: [E] # ,E+EV,E+BEV,E+BEV+V2G] # [ E+EV, E+BEV, E+BEV+V2G ]

View File

@ -1160,49 +1160,45 @@ def add_industry(network):
solid_biomass_by_country = industrial_demand["solid biomass"].groupby(pop_layout.ct).sum() solid_biomass_by_country = industrial_demand["solid biomass"].groupby(pop_layout.ct).sum()
countries = solid_biomass_by_country.index countries = solid_biomass_by_country.index
network.madd("Bus",
countries + " solid biomass for industry",
carrier="solid biomass for industry")
network.madd("Load", network.madd("Load",
countries, countries,
suffix=" solid biomass for industry", suffix=" solid biomass for industry",
bus=countries+ " solid biomass for industry", bus=countries+ " solid biomass",
carrier="solid biomass for industry", carrier="solid biomass for industry",
p_set=solid_biomass_by_country/8760.) p_set=solid_biomass_by_country/8760.)
#with BECCS #Net transfer of CO2 from atmosphere to stored
network.madd("Link", network.madd("Load",
countries + " solid biomass for industry", ["solid biomass for industry co2 from atmosphere"],
bus0=countries + " solid biomass", bus="co2 atmosphere",
bus1=countries + " solid biomass for industry", carrier="solid biomass for industry co2 from atmosphere",
bus2="co2 atmosphere", p_set=solid_biomass_by_country.sum()*costs.at['solid biomass','CO2 intensity']*options["ccs_fraction"]/8760.)
bus3="co2 stored",
efficiency2=-costs.at['solid biomass','CO2 intensity']*options["ccs_fraction"], network.madd("Load",
efficiency3=costs.at['solid biomass','CO2 intensity']*options["ccs_fraction"], ["solid biomass for industry co2 to stored"],
carrier="solid biomass for industry", bus="co2 stored",
p_nom_extendable=True) carrier="solid biomass for industry co2 to stored",
p_set=-solid_biomass_by_country.sum()*costs.at['solid biomass','CO2 intensity']*options["ccs_fraction"]/8760.)
network.madd("Bus",
["gas for industry"],
carrier="gas for industry")
network.madd("Load", network.madd("Load",
["gas for industry"], ["gas for industry"],
bus="gas for industry", bus="EU gas",
carrier="gas for industry", carrier="gas for industry",
p_set=industrial_demand.loc[nodes,"methane"].sum()/8760.) p_set=industrial_demand.loc[nodes,"methane"].sum()/8760.)
network.madd("Link", network.madd("Load",
["gas for industry"], ["gas for industry co2 to atmosphere"],
bus0="EU gas", bus="co2 atmosphere",
bus1="gas for industry", carrier="gas for industry co2 to atmosphere",
bus2="co2 atmosphere", p_set=-industrial_demand.loc[nodes,"methane"].sum()*costs.at['gas','CO2 intensity']*(1-options["ccs_fraction"])/8760.)
bus3="co2 stored",
efficiency2=costs.at['gas','CO2 intensity']*(1-options["ccs_fraction"]), network.madd("Load",
efficiency3=costs.at['gas','CO2 intensity']*options["ccs_fraction"], ["gas for industry co2 to stored"],
carrier="gas for industry", bus="co2 stored",
p_nom_extendable=True) carrier="gas for industry co2 to stored",
p_set=-industrial_demand.loc[nodes,"methane"].sum()*costs.at['gas','CO2 intensity']*options["ccs_fraction"]/8760.)
network.madd("Load", network.madd("Load",
nodes, nodes,