A light-weight component library for simulating manufacturing systems, based on SimPy
Project description
FactorySimPy
A light-weight component library for discrete-event simulation of manufacturing systems
FactorySimPy is a light-weight Python library for modeling and discrete-event simulation of manufacturing systems, built using SimPy (version ≥ 4.1.1). It provides a compact set of pre-built, validated, and configurable component classes for manufacturing systems components such as machines and conveyors. Users can easily model a manufacturing system as a graph, with nodes representing processing elements (such as machines), and edges representing transportation methods (such as conveyors, human operators, or robotic fleets). FactorySimPy includes built-in support for reporting a variety of performance metrics and offers both accelerated ("as-fast-as-possible") and real-time simulation modes, making it suitable for digital twins and control applications. Currently, the library supports discrete item flows and is particularly suited for systems with fixed structures. Future updates will include support for continuous material flow.
Key Features
- Open source, light-weight, reusable component-based library
- Modular and extensible
- Documentation with examples and usage details
Installation
- Install SimPy (if not already installed, See the SimPy documentation for details.)
pip install simpy
-
Install FactorySimPy
Latest Git main
pip install git+https://github.com/FactorySimPy/FactorySimPy.git
Quick‑start — A minimum working example
# System layout
# SRC ──> BUF1 ──> MACHINE1 ──> BUF2 ──> SINK
import factorysimpy
from factorysimpy.nodes.machine import Machine
from factorysimpy.edges.buffer import Buffer
from factorysimpy.nodes.source import Source
from factorysimpy.nodes.sink import Sink
env = simpy.Environment()
# Initializing nodes
SRC= Source(env, id="SRC", flow_item_type="item", inter_arrival_time= 0.8,blocking=False,out_edge_selection="RANDOM" )
MACHINE1 = Machine(env, id="MACHINE1",work_capacity=4, processing_delay=1.1,blocking=False, in_edge_selection="RANDOM",out_edge_selection="RANDOM")
SINK= Sink(env, id="SINK" )
# Initializing edges
BUF1 = Buffer(env, id="BUF1", store_capacity=4, delay=0.5, mode = "FIFO")
BUF2 = Buffer(env, id="BUF2", store_capacity=4, delay=0.5, mode = "FIFO")
# Adding connections
BUF1.connect(SRC,MACHINE1)
BUF2.connect(MACHINE1,SINK)
env.run(until=10)
Component Reference
Nodes
| Class | Purpose | Key parameters |
|---|---|---|
Node |
base class for active entities | id , node_set_up_time=0, in_edges=None,out_edges=None |
Source |
Generates new items | inter_arrival_time=0 , flow_item_type="item", blocking=False , out_edge_selection="RANDOM" |
Machine |
Processes/modifies items. | work_capacity=1, blocking=False , processing_delay=0, in_edge_selection="RANDOM",out_edge_selection="ROUND_ROBIN" |
Sink |
Collects / destroys items. | |
Splitter |
Routes items to multiple outputs | blocking=False , processing_delay=0, in_edge_selection="RANDOM", out_edge_selection="RANDOM" |
Combiner |
Merges input streams into one | blocking=False , processing_delay=0,target_quantity_of_each_item=[1], in_edge_selection="RANDOM",out_edge_selection="ROUND_ROBIN" |
Edges
| Class | Purpose | Key parameters |
|---|---|---|
Edge |
base class for passive entities | id ,delay=0, src_node=None,dest_node=None |
Buffer |
Finite‑capacity queue. | store_capacity,delay=0, mode="FIFO" |
Conveyor |
slotted conveyor belt; optional blocking slots. | belt_capacity, time_per_slot, accumulating=False |
Fleet |
Pool of AGVs/robots moving items. |
Project Layout
FactorySimPy/
├─ src/factorysimpy/
│ ├─ nodes/ # Machine, Source, Sink, Split, Join
│ ├─ edges/ # Buffer, Conveyor, Fleet
│ ├─ base/ # extended resources from simPy
│ ├─ helper/ # Other necessary classes like Item,
│ └─ utils/ # Other utility functions
├─ docs/
│ ├─ index.md
│ └─ examples/
├─ tests/
├─ examples/
└─ README.md
Documentation
Detailed documentation is available in FactorySimPy documentation
License
FactorySimPy is released under the MIT License.
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
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 factorysimpy-0.1.0b3.tar.gz.
File metadata
- Download URL: factorysimpy-0.1.0b3.tar.gz
- Upload date:
- Size: 81.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c6358afecc30f998351f9e19fec9c7a7d319c616cf9cceaab73615e2a48291
|
|
| MD5 |
b4f10ebecd2ae465f6418dbea54f04c0
|
|
| BLAKE2b-256 |
85faa7671808b5d109e65450613db505494a967ca41b4ec7e2588df30b0aba64
|
File details
Details for the file factorysimpy-0.1.0b3-py3-none-any.whl.
File metadata
- Download URL: factorysimpy-0.1.0b3-py3-none-any.whl
- Upload date:
- Size: 104.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83f49ddc2c61f2211a918036bd98d631fee7a6c26419467e2d99529592b5c248
|
|
| MD5 |
69a44e750342265ec8a4f4e4a4b576c1
|
|
| BLAKE2b-256 |
741a4229800541185ffb64c89a7d1bf909b20cd9629822ec532341b72e2af369
|