PC-Gym
PC‑Gym is an open‑source toolkit developed by Imperial College London for evaluating reinforcement‑learning algorithms on chemical process‑control problems. The dataset includes multiple simulated chemical‑process environments featuring nonlinear dynamics, disturbances and constraints. It provides custom constraint handling, disturbance generation and reward‑function design to accelerate research at the intersection of machine learning and process systems engineering. By offering a standardized platform, PC‑Gym bridges theoretical RL advances with real industrial process‑control applications, giving researchers a tool to explore data‑driven control solutions.
Description
pc‑gym Dataset Overview
Dataset Introduction
pc‑gym is a collection of environments for process‑control reinforcement learning. It offers several simulated environments for training and testing RL algorithms in process‑control applications.
Quick Start
Below is a simple example showing how to set up a continuous stirred‑tank reactor (CSTR) environment and run a simulation:
import pcgym
# Simulation parameters
nsteps = 100
T = 25
# Setpoint
SP = {Ca: [0.85 for i in range(int(nsteps/2))] + [0.9 for i in range(int(nsteps/2))]}
# Action and observation spaces
action_space = {low: np.array([295]), high: np.array([302])}
observation_space = {low: np.array([0.7,300,0.8]),high: np.array([1,350,0.9])}
# Build environment parameter dictionary
env_params = {
N: nsteps, # time steps
tsim:T, # simulation time
SP :SP,
o_space : observation_space,
a_space : action_space,
x0: np.array([0.8, 330, 0.8]), # initial conditions [Ca, T, Ca_SP]
model: cstr_ode, # select model
}
# Create environment
env = pcgym.make_env(env_params)
# Reset environment
obs, state = env.reset()
# Sample a random action
action = env.action_space.sample()
# Step in the environment
obs, rew, done, term, info = env.step(action)
Documentation
Full documentation can be found here.
Installation
Install the latest version via PyPI:
pip install pcgym
Examples
Example notebooks covering training loops, constraint handling, disturbances and policy evaluation are available here.
Implemented Process‑Control Environments
| Environment | Reference | Source Code | Documentation |
|---|---|---|---|
| CSTR | Hedengren, 2022 | Source | |
| First‑order System | N/A | Source | |
| Multistage Extraction Column | Ingham et al., 2007 (pg 471) | Source | |
| Nonsmooth Control | Lim, 1969 | Source |
Citation
If you use pc‑gym in your research, please cite:
@software{pcgym2024,
author = {Max Bloor and Jose Neto and Ilya Sandoval and Max Mowbray and Akhil Ahmed and Mehmet Mercangoz and Calvin Tsay and Antonio Del Rio‑Chanona},
title = {{pc‑gym}: Reinforcement Learning Environments for Process Control},
url = {https://github.com/MaximilianB2/pc-gym},
version = {0.1.6},
year = {2024},
}
AI studio
Generate PPTs instantly with Nano Banana Pro.
Generate PPT NowAccess Dataset
Please login to view download links and access full dataset details.
Topics
Source
Organization: arXiv
Created: 10/29/2024
Power Your Data Analysis with Premium AI Models
Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.
Enjoy a free trial and save 20%+ compared to official pricing.