hermess.tests.baselines.inverter_baseline ========================================= .. py:module:: hermess.tests.baselines.inverter_baseline .. autoapi-nested-parse:: Shared configuration + runner for the inverter byte-identical baselines. Single source of truth for the ``IEEE39_bus_inverter`` baseline runs, imported by both ``create_baseline_inverter.py`` (which pickles the references) and the ``test_recur_sim_inverter.py`` gates (which compare against them). Keeping the config here prevents drift between baseline-creation and the tests. Two cases: - ``sim_ld`` -- SIM, ``line_dyn=True`` (ODE; cvodes): 2 GridForming + 3 GridFollowing + 5 SGs through the t=4.0 bus fault. Run at the production output step ``ts=1e-4`` but stored decimated (every ``SIM_LD_STRIDE``-th sample) so the pickle stays ~1 MB; a byte-identical refactor matches at every sample. - ``sim_alg`` -- SIM, ``line_dyn=False`` (algebraic network / DAE; idas). Baselines store only the ``x_full`` numpy arrays, not the whole DaeSim objects: under pytest's ``pythonpath="hermess"`` + ``--import-mode=importlib``, ``system.DaeSim`` is reachable under two module paths, so whole-object pickling raises "it's not the same object". The arrays are all the gates compare. Attributes ---------- .. autoapisummary:: hermess.tests.baselines.inverter_baseline.FIXTURE_ROOT hermess.tests.baselines.inverter_baseline._BASE hermess.tests.baselines.inverter_baseline.SIM_LD_STRIDE hermess.tests.baselines.inverter_baseline.T_END hermess.tests.baselines.inverter_baseline.BASELINES hermess.tests.baselines.inverter_baseline._COMMON hermess.tests.baselines.inverter_baseline._INT_OPTS Functions --------- .. autoapisummary:: hermess.tests.baselines.inverter_baseline.make_inverter_baseline_config hermess.tests.baselines.inverter_baseline.run_inverter_case Module Contents --------------- .. py:data:: FIXTURE_ROOT .. py:data:: _BASE .. py:data:: SIM_LD_STRIDE :value: 50 .. py:data:: T_END :value: 5.0 .. py:data:: BASELINES .. py:data:: _COMMON .. py:data:: _INT_OPTS .. py:function:: make_inverter_baseline_config(case: str) Return the config for one baseline ``case`` (``sim_ld`` / ``sim_alg``). .. py:function:: run_inverter_case(case: str) -> numpy.ndarray Run one baseline ``case`` and return the simulated trajectory (decimated for ``sim_ld``).