Regime Manager¶
Regimes¶
| Regime | Description |
|---|---|
NOMINAL |
Healthy operation. R_good above threshold, no violations. |
DEGRADED |
R_good below target but above critical. Soft warnings possible. |
CRITICAL |
Hard boundary violations or R below critical threshold. |
RECOVERY |
Transitioning from CRITICAL back toward NOMINAL. |
Entry Conditions¶
| Regime | Condition |
|---|---|
| NOMINAL | avg_R >= 0.6 and no hard violations |
| DEGRADED | 0.3 <= avg_R < 0.6 and no hard violations |
| CRITICAL | avg_R < 0.3 OR hard boundary violations |
| RECOVERY | Previously CRITICAL, now avg_R >= 0.3 |
avg_R is the mean R across all layers in UPDEState.
Thresholds¶
_R_CRITICAL = 0.3
_R_DEGRADED = 0.6
Hysteresis¶
RegimeManager(hysteresis=0.05, cooldown_steps=10).
- hysteresis: Not currently used for threshold offset; reserved for future refinement.
- cooldown_steps: Minimum steps between regime transitions. Prevents oscillation between adjacent regimes.
Exception: escalation to CRITICAL always bypasses cooldown.
Transition Logic¶
proposed = evaluate(upde_state, boundary_state)
regime = transition(current, proposed)
transition() applies cooldown gating:
- If
proposed == current, no change. - If
steps_since_last_transition < cooldown_stepsANDproposed != CRITICAL, reject transition. - Otherwise, accept transition and reset counter.
Supervisor Integration¶
SupervisorPolicy.decide() calls RegimeManager.evaluate() and transition() internally, then selects control actions based on the resulting regime:
| Regime | Action |
|---|---|
| NOMINAL | No-op |
| DEGRADED | Boost global K |
| CRITICAL | Increase zeta, reduce K on worst layer |
| RECOVERY | Gradual K restore |