You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest version of PyPSA available on the 4th of October 2023, without any modification.
Describe the Bug
If some parameters in the dataframe are Nan, the import_components_from_dataframe does not take into consideration the default values. For example, if the p_max_pu and p_min_pu of Generators are not defined in an inputted data frame, the network does not consider the default values of the component parameters and consistency_check() shows them as warnings. This finally results in an infeasible solution.
The text was updated successfully, but these errors were encountered:
Just to add on to this, import_components_from_dataframe is used internally in PyPSA too in ways that have been causing me some trouble. In particular, when clustering networks, the new (output) variable n_mod receives NaN values at clustering/spatial.py#L262 (in aggregateoneport), and these NaN values later can lead to problems in get_clustering_from_busmap where a call to import_components_from_dataframe now raises an error because NaN values cannot be cast to int.
It seems like either PyPSA internally must be able to accept NaN values even in columns that nominally should be cast to int, or that aggregateoneport (and maybe other functions?) need to be fixed so as not lot let NaN values slip into int-typed columns.
(This problem seems to make PyPSA-Eur incompatible with PyPSA 0.26, at least for me.)
Checklist
Describe the Bug
If some parameters in the dataframe are Nan, the
import_components_from_dataframe
does not take into consideration the default values. For example, if thep_max_pu
andp_min_pu
of Generators are not defined in an inputted data frame, the network does not consider the default values of the component parameters andconsistency_check()
shows them as warnings. This finally results in an infeasible solution.The text was updated successfully, but these errors were encountered: