How google/sbsim works
Smart Buildings Control combines real-building datasets, a calibrated HVAC/building simulator, and reinforcement-learning control. The principal workflow is to construct a controllable environment, observe building state, choose setpoints, apply them, and receive reward feedback; agents can be trained through the RL scripts. Dataset partitioning and visual observation are additional capabilities. The source index supports several module relationships, while some implementation details—especially script orchestration and simulator wiring—were not excerpted, so those links are omitted or marked unverified.
Main entry points: environment.py RL Environment · sac_agent.py SAC Agent · rendering_observer.py Environment Renderer · dataset.py Building Dataset
Components 23
Real-World Data
- Building Dataset
smart_control/dataset/dataset.py - Dataset Partitioning
smart_control/dataset/partition.py
Building Simulation
- Thermal Building Model
smart_control/simulator/building.py - Radiation Model
smart_control/simulator/building_radiation_utils.py - Solar Radiation
smart_control/simulator/solar_radiation.py - Weather Control
smart_control/simulator/weather_controller.py - TF Simulator
smart_control/simulator/tf_simulator.py - Air Handler
smart_control/simulator/air_handler.py
Control Environment
- Building Interface
smart_control/models/base_building.py - RL Environment
smart_control/environment/environment.py - Energy-Carbon Reward
smart_control/reward/base_setpoint_energy_carbon_reward.py - Regret Reward
smart_control/reward/setpoint_energy_carbon_regret.py
Reinforcement Learning
- Training Script
smart_control/reinforcement_learning/scripts/train.py - SAC Agent
smart_control/reinforcement_learning/agents/sac_agent.py - SAC Networks
smart_control/reinforcement_learning/agents/networks/sac_networks.py - Schedule Policy
smart_control/reinforcement_learning/policies/schedule_policy.py - Replay Buffer
smart_control/reinforcement_learning/replay_buffer/replay_buffer.py
Logs and Visualization
- RL Data Processing
smart_control/reinforcement_learning/utils/data_processing.py - Environment Renderer
smart_control/reinforcement_learning/observers/rendering_observer.py - Controller Reader
smart_control/utils/controller_reader.py - Controller Writer
smart_control/utils/controller_writer.py - Histogram Reduction
smart_control/utils/histogram_reducer.py
Other components
- Engineer / Trainer
Connections 19
- Engineer / Trainer → Building Dataset: uses data
README.md - Engineer / Trainer → Training Script: starts training
README.md - Building Dataset → Dataset Partitioning: provides records
smart_control/dataset/partition.py - Training Script → SAC Agent: trains
- SAC Agent → SAC Networks: uses networks
smart_control/reinforcement_learning/agents/sac_agent.py - SAC Agent → Replay Buffer: stores experience
- SAC Agent → RL Environment: controls
- Schedule Policy → RL Environment: provides actions
- RL Environment → Building Interface: calls building API
smart_control/environment/environment.py - RL Environment → Energy-Carbon Reward: evaluates reward
smart_control/environment/environment.py - Regret Reward → Energy-Carbon Reward: extends reward
smart_control/reward/setpoint_energy_carbon_regret.py - Thermal Building Model → Radiation Model: uses model
smart_control/simulator/building.py - Radiation Model → Solar Radiation: uses model
smart_control/simulator/building_radiation_utils.py - Air Handler → Weather Control: queries weather
smart_control/simulator/air_handler.py - TF Simulator → Thermal Building Model: simulates building
- RL Environment → Controller Writer: writes metrics
smart_control/environment/environment.py - Controller Reader → Histogram Reduction: supplies observations
smart_control/utils/histogram_reducer.py - Environment Renderer → RL Environment: renders environment
smart_control/reinforcement_learning/observers/rendering_observer.py - Environment Renderer → RL Data Processing: plots timeseries
smart_control/reinforcement_learning/observers/rendering_observer.py