Move Sud step's target temperature from ramp.temp to step.temperature

A step's target temperature applies to the whole step (it's what a
ramp ramps to and what a hold then holds at), not just its ramp phase
- promote it from a nested "ramp": {"temp": ...} to a step-level
"temperature" field, defaulted like descr/grain_mass/etc. Updates all
consumers (Sud._build_step, SudTask, the GUI's forecast estimator,
demo_sud.py) and migrates sude/sud_0010.json and the README.
This commit is contained in:
2026-06-21 09:47:45 +02:00
parent e62863ca93
commit 194156f244
6 changed files with 28 additions and 26 deletions
+3 -3
View File
@@ -81,15 +81,15 @@ if __name__ == '__main__':
# A ramp step whose target is below the current temperature can
# only be reached by passive cooling - force the heater off,
# mirroring tasks/sud.py's SudTask.
cooling = ramping and 'ramp' in step and step['ramp']['temp'] < ctrl.get_theta_ist() - TEMP_REACHED_TOLERANCE
cooling = bool(ramping and 'ramp' in step and step['temperature'] < ctrl.get_theta_ist() - TEMP_REACHED_TOLERANCE)
ctrl.set_cooling(cooling)
if cooling:
print(" -> cooling down to {}".format(step['ramp']['temp']))
print(" -> cooling down to {}".format(step['temperature']))
print(f"Step {step['number']}: {step['descr']}")
apply_plant_params(step)
if ramping and 'ramp' in step:
ctrl.set_theta_soll(step['ramp']['temp'])
ctrl.set_theta_soll(step['temperature'])
ctrl.set_heatrate_soll(step['ramp']['rate'])
apply_stirrer(phase)