Skip to main content

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

  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.


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

factorysimpy-0.1.0b1.tar.gz (81.1 kB view details)

Uploaded Source

Built Distribution

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

factorysimpy-0.1.0b1-py3-none-any.whl (104.3 kB view details)

Uploaded Python 3

File details

Details for the file factorysimpy-0.1.0b1.tar.gz.

File metadata

  • Download URL: factorysimpy-0.1.0b1.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

Hashes for factorysimpy-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 9add55214b64a1734ef2dd401efd3f57f5053f3e050bcdc5463494126f740746
MD5 9d1ced5a1d344a88b5ce19537fa56709
BLAKE2b-256 7f37b80c9017d9794402d456a182a7f7afe108ec0adc2f651ae0b58d745bb18f

See more details on using hashes here.

File details

Details for the file factorysimpy-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: factorysimpy-0.1.0b1-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

Hashes for factorysimpy-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 40c5b60475f8621eed699760ab188e323c65e2f87a2d5428933eb646b96d6e54
MD5 d6db7b0313f42373813b3c3f8dc26d4e
BLAKE2b-256 ecddc7e0163573019dc14ce93dc0504248ba2553359cf0c05d7b14f24098cb4f

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