pydynamicestimator.tests.test_compute_i_full ============================================ .. py:module:: pydynamicestimator.tests.test_compute_i_full .. autoapi-nested-parse:: Numerical validation of compute_i_full post-processing against CasADi branch_current_fun. Compares the new vectorized NumPy i_full computation against the original per-step CasADi build_branch_current_fun approach across multiple scenarios. All tests use frozen fixtures under tests/fixtures/ rather than the shared pydynamicestimator/systems/ workspace, so interactive edits to the demo systems cannot silently change test behavior. See tests/fixtures/README.md. Attributes ---------- .. autoapisummary:: pydynamicestimator.tests.test_compute_i_full.FIXTURE_ROOT Functions --------- .. autoapisummary:: pydynamicestimator.tests.test_compute_i_full._recompute_i_full_casadi pydynamicestimator.tests.test_compute_i_full.test_no_faults_incl_lim_true pydynamicestimator.tests.test_compute_i_full.test_no_faults_incl_lim_false pydynamicestimator.tests.test_compute_i_full.test_bus_fault_incl_lim_true pydynamicestimator.tests.test_compute_i_full.test_dist_mode_incl_lim_true pydynamicestimator.tests.test_compute_i_full.test_coi_mode_incl_lim_true pydynamicestimator.tests.test_compute_i_full.test_line_dyn_true Module Contents --------------- .. py:data:: FIXTURE_ROOT .. py:function:: _recompute_i_full_casadi(sim) Recompute i_full using the old CasADi branch_current_fun approach. .. py:function:: test_no_faults_incl_lim_true() nom mode, LOAD step at t=1s, incl_lim=True: should match to machine precision. .. py:function:: test_no_faults_incl_lim_false() nom mode, LOAD step at t=1s, incl_lim=False: should match to machine precision. .. py:function:: test_bus_fault_incl_lim_true() nom mode, FAULT_BUS + CLEAR_FAULT_BUS, incl_lim=True. .. py:function:: test_dist_mode_incl_lim_true() dist mode (has_delta_ref=True) under LOAD step at t=1s, incl_lim=True. .. py:function:: test_coi_mode_incl_lim_true() coi mode, incl_lim=True. COI frequency deviates from 1.0 pu during transients, so the omega=1.0 approximation in build_y() causes a small error vs the frequency-aware CasADi function. Same root cause as the dist mode discrepancy. Uses the LOAD-step fixture so the disturbance is pinned. .. py:function:: test_line_dyn_true() nom mode, line_dyn=True, incl_lim=False.