Reinforcement learning suite of process control problems.
Project description
Reinforcement learning environments for process control
Quick start ⚡
Setup a CSTR environment with a setpoint change
# Setpoint
SP = {'Ca': [0.85 for i in range(int(nsteps/2))] + [0.9 for i in range(int(nsteps/2))]}
# Action and observation Space
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])}
# Construct the environment parameter dictionary
env_params = {
'N': nsteps, # Number of 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 the model
}
# Create environment
env = pcgym.make_env(env_params)
# Reset the environment
obs, state = env.reset()
# Sample a random action
action = env.action_space.sample()
# Perform a step in the environment
obs, rew, done, term, info = env.step(action)
Documentation
You can read the full documentation here!
Installation ⏳
The latest pc-gym version can be installed from PyPI:
pip install pcgym
Examples
TODO: Link example notebooks here
Implemented Process Control Environments
TODO: Add table of environments
Other Great Gyms 🔍
TODO: Link other gyms such as Jumanji, safety gymnasium etc.
Citing pc-gym
If you use pc-gym
in your research, please cite using the following
@software{pcgym2024,
author = {Max Bloor and ...},
title = {{pc-gym}: Reinforcement Learning Envionments for Process Control},
url = {https://github.com/MaximilianB2/pc-gym},
version = {0.0.4},
year = {2024},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pcgym-0.0.6.tar.gz
(24.4 kB
view details)
Built Distribution
pcgym-0.0.6-py3-none-any.whl
(24.9 kB
view details)
File details
Details for the file pcgym-0.0.6.tar.gz
.
File metadata
- Download URL: pcgym-0.0.6.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68ab34f612fa5762c20fedd378857ee3efe52467086691f65ff68bc7690a4fc1 |
|
MD5 | 39865241ec9f727076159ba36e6ec27d |
|
BLAKE2b-256 | da64e1f71bd06b6294db6c9d6c34a48c4cb855c6e6c1a955d91e2995130b4e88 |
File details
Details for the file pcgym-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: pcgym-0.0.6-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b44113e0da61423c3e67af0b56d2544ef562e5d2e152b84f4ac89bb378591f8 |
|
MD5 | 3182792707f0ac810953f8fe77e95e36 |
|
BLAKE2b-256 | 548945135d05b1e0202dd6a0120211cac5abe80e00de19c6ace878677dfbac90 |