Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

  1. Install SimPy (if not already installed, See the SimPy documentation for details.)
pip install simpy
  1. 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.


Metadata

Release files for factorysimpy 0.1.0b3

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

Source distribution (sdist)

Source distribution for factorysimpy 0.1.0b3
File Size Uploaded
factorysimpy-0.1.0b3.tar.gz 81.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for factorysimpy 0.1.0b3
File Interpreter ABI Platform
factorysimpy-0.1.0b3-py3-none-any.whl Python 3 none any Details

Total release size: 185.4 kB

Release files / factorysimpy-0.1.0b3.tar.gz

Download URL factorysimpy-0.1.0b3.tar.gz
Size 81.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a1c6358afecc30f998351f9e19fec9c7a7d319c616cf9cceaab73615e2a48291
BLAKE2b-256 checksum
How to use checksums
85faa7671808b5d109e65450613db505494a967ca41b4ec7e2588df30b0aba64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / factorysimpy-0.1.0b3-py3-none-any.whl

Download URL factorysimpy-0.1.0b3-py3-none-any.whl
Size 104.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83f49ddc2c61f2211a918036bd98d631fee7a6c26419467e2d99529592b5c248
BLAKE2b-256 checksum
How to use checksums
741a4229800541185ffb64c89a7d1bf909b20cd9629822ec532341b72e2af369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.0b3 This release

2 release files

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