@@ -923,7 +923,7 @@ def add_hydrogen_turbines(n):
923923 h2_plants .bus2 = ""
924924 h2_plants .efficiency2 = 1
925925 # add the new links
926- n .import_components_from_dataframe ( h2_plants , "Link" )
926+ n .add ( "Link" , h2_plants . index , ** h2_plants )
927927
928928 # special handling of CHPs
929929 gas_plants = n .links [
@@ -937,7 +937,7 @@ def add_hydrogen_turbines(n):
937937 h2_plants .bus0 = h2_plants .bus1 + " H2"
938938 h2_plants .bus3 = ""
939939 h2_plants .efficiency3 = 1
940- n .import_components_from_dataframe ( h2_plants , "Link" )
940+ n .add ( "Link" , h2_plants . index , ** h2_plants )
941941
942942
943943def force_retrofit (n , params ):
@@ -980,7 +980,7 @@ def force_retrofit(n, params):
980980 h2_plants .capital_cost *= 1 + params ["cost_factor" ]
981981 h2_plants .overnight_cost *= 1 + params ["cost_factor" ]
982982 # add the new links
983- n .import_components_from_dataframe ( h2_plants , "Link" )
983+ n .add ( "Link" , h2_plants . index , ** h2_plants )
984984 n .links .drop (gas_plants , inplace = True )
985985
986986 # special handling of CHPs
@@ -1001,7 +1001,7 @@ def force_retrofit(n, params):
10011001 h2_plants .efficiency3 = 1 # default value
10021002 h2_plants .capital_cost *= 1 + params ["cost_factor" ]
10031003 h2_plants .overnight_cost *= 1 + params ["cost_factor" ]
1004- n .import_components_from_dataframe ( h2_plants , "Link" )
1004+ n .add ( "Link" , h2_plants . index , ** h2_plants )
10051005 n .links .drop (gas_plants , inplace = True )
10061006
10071007
0 commit comments