Make grain_mass/water_mass per-step and re-derive plant params on change
grain_mass and water_mass now live on each step (defaulted from default.step) instead of being fixed for the whole brew, since both change over a mash (malt going in, water boiling off). Sud.derive_plant_params() takes them as arguments so it can be recomputed per step; the demo re-applies the resulting M/C to both the real plant and the controller's Smith-predictor model on every step change via the new Pot.set_thermal_params()/ TempController.set_model_params(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CgR9tPaSzFkAwRAUyeaaCD
This commit is contained in:
@@ -56,6 +56,10 @@ class Pot(APlant):
|
||||
def set_ambient_temperature(self, theta_amb):
|
||||
self.theta_amb = theta_amb
|
||||
|
||||
def set_thermal_params(self, M, C):
|
||||
self.M = M
|
||||
self.C = C
|
||||
|
||||
def set_power(self, power):
|
||||
self.p_in = power
|
||||
|
||||
|
||||
Reference in New Issue
Block a user