Add model embeddings for Z-factor DoF, separate from SaturatedController.
Some checks failed
CI / check (push) Has been cancelled

Fixed/Free Probe calibration now emits embeddings[] (unknown + equation) instead of controls[], keeping SaturatedController for physical regulation only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-19 22:42:31 +02:00
parent 3808e0f11b
commit 5425685a48
22 changed files with 1189 additions and 485 deletions

View File

@@ -526,19 +526,18 @@ pub fn extract_solved_variables(system: &System, state: &[f64]) -> Vec<SolvedVar
}
}
// Calibration factors (z_ua, z_dp, z_flow, z_flow_eco, z_power, z_etav)
// promoted to free unknowns via control loops. Each `Some(idx)` slot means
// the solver computed a value for that factor at `state[idx]`. The generic
// `actuator` slot (physical opening / fan speed) is already covered by the
// bounded-variable path above, so we only surface the six named Z-factors.
// Calibration factors promoted to free unknowns via control loops.
// Each `Some(idx)` slot means the solver computed a value at `state[idx]`.
// The generic `actuator` slot is already covered by the bounded-variable path.
for (name, indices) in system.calib_indices_by_name() {
for (factor, slot) in [
("z_flow", indices.z_flow),
("z_flow_eco", indices.z_flow_eco),
("z_dp", indices.z_dp),
("z_ua", indices.z_ua),
("z_power", indices.z_power),
("z_etav", indices.z_etav),
for (factor, slot, min, max) in [
("z_flow", indices.z_flow, 0.5, 2.0),
("z_flow_eco", indices.z_flow_eco, 0.5, 2.0),
("z_dp", indices.z_dp, 0.5, 2.0),
("z_ua", indices.z_ua, 0.5, 2.0),
("z_power", indices.z_power, 0.5, 2.0),
("z_etav", indices.z_etav, 0.5, 2.0),
("f_w", indices.f_w, 0.0, 1.0),
] {
if let Some(idx) = slot {
if idx < state.len() {
@@ -552,10 +551,8 @@ pub fn extract_solved_variables(system: &System, state: &[f64]) -> Vec<SolvedVar
component: Some(name.clone()),
variable: factor.to_string(),
value: state[idx],
// Calibration factors are bounded to [0.5, 2.0]
// (see entropyk_core::CalibValidationError).
min: 0.5,
max: 2.0,
min,
max,
});
}
}