mirror of
https://github.com/lynchaos/ashvale-station.git
synced 2026-09-12 12:47:49 +00:00
Heated environment: a thermostat member in the forecast ensemble
A room held at a setpoint is a different process from one left to drift. It is
a closed loop, and persistence, the baseline everything here is scored against,
is the wrong statement about it: the truth is not that it stays where it is, it
is that it returns to the setpoint.
So site.heating adds a fourth ensemble member, first order because that is what
a controlled system is:
dT_set(h) = (T_set - T_now) * (1 - exp(-h / tau))
Humidity follows and is the part that is easy to get wrong. Heating adds no
moisture, so vapour pressure is conserved and not relative humidity:
RH(h) = RH_now * es(T_now) / es(T_now + dT_set(h))
Warm the air and RH falls although nothing was dried, which is why a heated
house in winter is dry. The test asserts the dew point is unchanged to 1e-6.
Pressure gets zero: a thermostat cannot move the synoptic field.
Offered, not imposed. Hedge scores this member on realised error like any
other, so a wrong tau or a stale setpoint costs accuracy and gets down-weighted
rather than quietly biasing every forecast. Verified: on history with no
heating the ensemble assigned it weight 0.000. With heating off it returns zero
and is identical to persistence.
Going from three members to four means old saved heads must migrate.
from_dict reinitialises weights and member_mae. I missed member_mae first time
and it did not fail on load, it failed later inside learn() on a broadcast
error, which is a much worse place to find out; the migration test now covers
both and calls learn() to prove it.
Settings tab gains the toggle, setpoint and time constant. Turning heating on
or off is treated as a regime change like a door: discontinuity marker plus a
queued retrain.
This commit is contained in:
+19
-1
@@ -57,7 +57,25 @@ class SiteConfig:
|
||||
# keep predicting the old regime for two days unless told. POST
|
||||
# /api/environment marks the moment and asks for a retrain.
|
||||
environment: str = "indoor" # indoor | sheltered | outdoor
|
||||
enclosure: str = "closed" # closed | ventilated | open # honest flag, changes how forecasts are worded
|
||||
enclosure: str = "closed" # closed | ventilated | open
|
||||
|
||||
# Central heating or air conditioning holding the room at a setpoint.
|
||||
#
|
||||
# This is a genuine change of process, not a label. A free-running room
|
||||
# follows outdoor forcing and drifts; a thermostatted one is a closed loop
|
||||
# that pulls back toward heating_setpoint_c whenever it strays. Persistence
|
||||
# ("tomorrow equals today") is the wrong baseline for a controlled system,
|
||||
# because the truth is "it returns to the setpoint".
|
||||
#
|
||||
# thermal_time_constant_h is how fast that pull acts: the time to close
|
||||
# about 63% of a gap. A small well-insulated flat with responsive heating is
|
||||
# under an hour; a large draughty house with slow radiators is several. If
|
||||
# you do not know it, leave it: the ensemble weights this member against the
|
||||
# others from measured error, so a wrong constant costs accuracy, not
|
||||
# correctness.
|
||||
heating: bool = False
|
||||
heating_setpoint_c: float = 21.0
|
||||
thermal_time_constant_h: float = 1.5 # honest flag, changes how forecasts are worded
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user