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.
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=process, 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
@article{lineflow,
author = {Kai M{\"u}ller and Martin Wenzel and Tobias Windisch},
title = {LineFlow: A framework to learn active control of production lines},
year = {2025},
}
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 Distribution
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.0.2.tar.gz.
File metadata
- Download URL: lineflow_rl-0.0.2.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b89841d4d12c72ba7cdb5250c37dbdf459771d34a706716ab8c99a26f0f960e
|
|
| MD5 |
7b3423e3f72876f1ec1b453aaca8af66
|
|
| BLAKE2b-256 |
bea0ec6e651123f05190f805481d468b9731e4095ef31b97b66521a5ff6f35b8
|
File details
Details for the file lineflow_rl-0.0.2-py3-none-any.whl.
File metadata
- Download URL: lineflow_rl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4db5a012fd7cc71578147c786bc35a1a77c89c0b83bc4c814560c9f342f981a8
|
|
| MD5 |
8c319f9a08c228cc31fd5cd699c56831
|
|
| BLAKE2b-256 |
062b41ff89a624fb15b147bca4781b13086abb2cead2dfd81804b9e37b61abb7
|