diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 45d9d8bcb..26caf3206 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -34,6 +34,7 @@ Change Log - [ADDED] option to use a second tap changer for the trafo element - [CHANGED] parameters of function merge_internal_net_and_equivalent_external_net() - [FIXED] :code:`convert_format.py`: update the attributes of the characteristic objects to match the new characteristic +- [FIXED] additional arguments from mpc saved to net._options: create "_options" if it does not exist [2.13.1] - 2023-05-12 diff --git a/pandapower/converter/matpower/from_mpc.py b/pandapower/converter/matpower/from_mpc.py index 87f87cbed..c399ef2db 100644 --- a/pandapower/converter/matpower/from_mpc.py +++ b/pandapower/converter/matpower/from_mpc.py @@ -66,6 +66,8 @@ def from_mpc(mpc_file, f_hz=50, casename_mpc_file='mpc', validate_conversion=Fal ppc = _m2ppc(mpc_file, casename_mpc_file) net = from_ppc(ppc, f_hz=f_hz, validate_conversion=validate_conversion, **kwargs) if "mpc_additional_data" in ppc: + if "_options" not in net: + net["_options"] = dict() net._options.update(ppc["mpc_additional_data"]) logger.info('added fields %s in net._options' % list(ppc["mpc_additional_data"].keys()))