STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_failed_solve_holds Namespace Reference

Functions

None _break (pytest.MonkeyPatch monkeypatch, Session session, *, float flows=1.0, float pressures=1.0)
None test_mains_opening_onto_a_failed_solve_move_no_propellant (pytest.MonkeyPatch monkeypatch)
None test_a_failed_tick_acts_on_and_shows_the_last_converged_pressures (pytest.MonkeyPatch monkeypatch)

Detailed Description

A failed network solve holds the stand; it does not move it.

``solve_steady(raise_on_failure=False)`` hands back wherever Newton stopped.
That iterate closes no node balance, so a vessel integrated on it gains or loses
propellant no path carried, and a gauge reading it shows a pressure nothing
holds. Through a failed solve the session keeps the last converged flows and
pressures; right after the circuit changes, when no converged answer for the
new circuit exists yet, it moves nothing.

Driven by failing the solve on purpose: its real answer, reported as not
converged, with the flows or the free nodes' pressures scaled -- once a solve
has not converged, one iterate is as good as another. Both tests go red on the
session that integrated the iterate (``flows = self._last_flows or
dict(result.flows)``, and ``result.pressures`` into the step and the frame).

Function Documentation

◆ _break()

None test_failed_solve_holds._break ( pytest.MonkeyPatch monkeypatch,
Session session,
* ,
float flows = 1.0,
float pressures = 1.0 )
protected
Every solve from here fails, its flows and free pressures scaled.

Definition at line 28 of file test_failed_solve_holds.py.

Referenced by test_a_failed_tick_acts_on_and_shows_the_last_converged_pressures(), and test_mains_opening_onto_a_failed_solve_move_no_propellant().

◆ test_a_failed_tick_acts_on_and_shows_the_last_converged_pressures()

None test_failed_solve_holds.test_a_failed_tick_acts_on_and_shows_the_last_converged_pressures ( pytest.MonkeyPatch monkeypatch)
With a good solve behind it a failed tick holds that solve's flows, and
its pressures with them -- into the tank's supply clip, the frame, and the
value a trapped leg will later be held at.

Definition at line 88 of file test_failed_solve_holds.py.

References _break().

◆ test_mains_opening_onto_a_failed_solve_move_no_propellant()

None test_failed_solve_holds.test_mains_opening_onto_a_failed_solve_move_no_propellant ( pytest.MonkeyPatch monkeypatch)
Ready -> Fire is a new circuit: the last flows are dropped, and a solve
that then fails has nothing converged to hold. The tanks stay put.

Definition at line 54 of file test_failed_solve_holds.py.

References _break().