Skip to main content

Python tool to simulate assembly lines.

Project description

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

@misc{LineFlow,
      title={LineFlow: A Framework to Learn Active Control of Production Lines}, 
      author={Kai Müller and Martin Wenzel and Tobias Windisch},
      year={2025},
      eprint={2505.06744},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2505.06744}, 
}

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

lineflow_rl-0.1.0.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lineflow_rl-0.1.0-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file lineflow_rl-0.1.0.tar.gz.

File metadata

  • Download URL: lineflow_rl-0.1.0.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lineflow_rl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd6536034fd0e8954b42bb46687dd9707c711c9729d568a625a07f1dd863e94d
MD5 eec786ac626b10c6bf091fc45790c9da
BLAKE2b-256 1e393e14aef0e0bc130feaaf2bb7708f506dfff2ae6b4a72bff1211387e2c43d

See more details on using hashes here.

File details

Details for the file lineflow_rl-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lineflow_rl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lineflow_rl-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 694a8d1c53f17e0c12abedb6774393e79845e2c3bfd3d629e54399539b6ff742
MD5 31c0553444f2edd4f4263e5788a73676
BLAKE2b-256 bd58a2ce5af17642e9cb45f10c5ab6495e10924866e0c8d4bf7030542e4dd61e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page