Skip to main content

LineFlow

PyPI

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.

til

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.

Metadata

Release files for lineflow-rl 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for lineflow-rl 0.5.0
File Interpreter ABI Platform Actions
lineflow_rl-0.5.0-py3-none-any.whl Python 3 none any Details for lineflow_rl-0.5.0-py3-none-any.whl

Release files / lineflow_rl-0.5.0-py3-none-any.whl

Download URL lineflow_rl-0.5.0-py3-none-any.whl
Size 50.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33614043fcbd56ad57cba7c9299a7954023c54ba4e21a840c343764bff3de0c3
BLAKE2b-256 checksum
How to use checksums
308761731853586cb0bd78533402ddf5aa2ea51576e380fc8af1fcaefbc80533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for lineflow-rl 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page