PC-Gym
收藏资源简介:
PC-Gym是由帝国理工学院开发的用于化学过程控制问题的强化学习算法评估的开源工具。该数据集包含多个模拟化学过程的环境,涉及非线性动力学、扰动和约束条件。数据集提供了自定义的约束处理、扰动生成和奖励函数设计功能,旨在加速机器学习与过程系统工程交叉领域的研究。PC-Gym通过提供标准化的平台,连接理论强化学习进展与实际工业过程控制应用,为研究人员提供了一个探索数据驱动控制解决方案的工具。
PC-Gym is an open-source tool developed by Imperial College London for evaluating reinforcement learning algorithms in chemical process control tasks. This dataset features multiple environments that simulate chemical processes, incorporating nonlinear dynamics, disturbances, and operational constraints. It offers customizable functionalities for constraint handling, disturbance generation, and reward function design, with the goal of accelerating research at the intersection of machine learning and process systems engineering. PC-Gym provides researchers with a standardized platform that bridges theoretical advancements in reinforcement learning and real-world industrial process control applications, serving as a practical tool for exploring data-driven control solutions.
pc-gym 数据集概述
数据集简介
pc-gym 是一个用于过程控制强化学习的环境集合。它提供了多个模拟环境,用于训练和测试强化学习算法在过程控制中的应用。
快速开始
以下是一个简单的示例代码,展示了如何设置一个连续搅拌反应器(CSTR)环境,并进行模拟:
python import pcgym
模拟变量
nsteps = 100 T = 25
设定点
SP = {Ca: [0.85 for i in range(int(nsteps/2))] + [0.9 for i in range(int(nsteps/2))]}
动作和观测空间
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])}
构建环境参数字典
env_params = { N: nsteps, # 时间步数 tsim:T, # 模拟时间 SP :SP, o_space : observation_space, a_space : action_space, x0: np.array([0.8, 330, 0.8]), # 初始条件 [Ca, T, Ca_SP] model: cstr_ode, # 选择模型 }
创建环境
env = pcgym.make_env(env_params)
重置环境
obs, state = env.reset()
采样一个随机动作
action = env.action_space.sample()
在环境中执行一步
obs, rew, done, term, info = env.step(action)
文档
完整的文档可以在 这里 找到。
安装
可以通过 PyPI 安装最新版本的 pc-gym:
bash pip install pcgym
示例
示例笔记本包含了训练演练、实现约束、干扰和策略评估工具的示例,可以在 这里 找到。
实现的过程控制环境
| 环境名称 | 参考文献 | 源代码 | 文档 |
|---|---|---|---|
| CSTR | Hedengren, 2022 | Source | |
| 一阶系统 | N/A | Source | |
| 多级萃取柱 | Ingham et al, 2007 (pg 471) | Source | |
| 非光滑控制 | Lim,1969 | Source |
引用
如果在研究中使用了 pc-gym,请使用以下引用:
@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}, }




