Baseline Controllers
PID Baseline
Single-loop PI controller that maintains temperature at 252°C by adjusting cooling water flow. The simplest classical approach.
from examples.pid_baseline import PIDController
pid = PIDController(T_setpoint=252.0, Kp=2.0, Ki=0.05)
cooling_adjustment = pid.compute(current_temperature)
MPC Baseline (Dynamic Matrix Control)
Linear DMC using step-response model. Optimizes cooling moves over a prediction horizon with move suppression penalty.
Comparison Framework
Runs PID, MPC, and heuristic controllers across all tasks. Outputs a comparison table with:
- Economic Regret: profit left on the table vs theoretical max
- Constraint Violations: temperature excursions outside safe zone
- Adaptability Score: stability under varying conditions
Gymnasium Wrapper
from examples.rl_benchmark import get_gym_wrapper
env = get_gym_wrapper()
obs, info = env.reset()
obs, reward, done, truncated, info = env.step(action_array)
observation_space:Box(30,)— all float observationsaction_space:Box(13,)— 13 continuous controls