Python tool to simulate assembly lines.
Project description
LineFlow
LineFLow is a python framework to simulate assembly lines. It allows to model
arbitrary discrete part assembly lines and provides an gymnasium environment to
optimize them with reinforcement learning. The documentation can be
found here.
Install
Install with
pip install lineflow-rl
Examples
Visualization
This is how an assembly line can be implemented and visualized:
from lineflow.simulation import Line, Source, Sink, Process
class SimpleLine(Line):
def build(self):
# Set up stationary objects
source = Source(
name='Source',
processing_time=5,
position=(100, 500),
unlimited_carriers=True,
)
process = Process('Process', processing_time=6, position=(350, 500))
sink = Sink('Sink', processing_time=3, position=(600, 500))
# Wire them with buffers
source.connect_to_output(station=process, capacity=3)
process.connect_to_output(station=sink, capacity=2)
line = SimpleLine()
line.run(simulation_end=500, visualize=True)
df = line.get_observations()
Training RL agents
This is how an RL agent can be trained using LineFlow:
from stable_baselines3 import PPO
from lineflow.simulation import LineSimulation
line = SimpleLine()
env = LineSimulation(line, simulation_end=100)
model = PPO("MlpPolicy", env)
model.learn(total_timesteps=100)
Docs
Serve the docs with
mkdocs serve
Paper
If you use our work in your research, please consider citing us with
@InProceedings{pmlr-v267-muller25c,
title = {{L}ine{F}low: A Framework to Learn Active Control of Production Lines},
author = {M\"{u}ller, Kai and Wenzel, Martin and Windisch, Tobias},
booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
pages = {45212--45235},
year = {2025},
editor = {Singh, Aarti and Fazel, Maryam and Hsu, Daniel and Lacoste-Julien, Simon and Berkenkamp, Felix and Maharaj, Tegan and Wagstaff, Kiri and Zhu, Jerry},
volume = {267},
series = {Proceedings of Machine Learning Research},
month = {13--19 Jul},
publisher = {PMLR},
url = {https://proceedings.mlr.press/v267/muller25c.html},
}
See this README for more details how to run the benchmarks.
Funding
The research behind LineFlow is funded by the Bavarian state ministry of research. Learn more here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lineflow_rl-0.4.0-py3-none-any.whl.
File metadata
- Download URL: lineflow_rl-0.4.0-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5611dab346e3869014b0a4799ab3efeadb9113c2b33054f245d0211315110bea
|
|
| MD5 |
2a16624b3e84490e99e7b714b879eb25
|
|
| BLAKE2b-256 |
37a8253d881a85ac95655894fb3efc2b1571b7c3b6b7db836fd4fa8ed4d3ebb7
|