Skip to main content

Event discrete, process based simulation for Python.

Project description

Project logo

ci pypi read-the-docs

Welcome to Py-DES

py-des is a Python package designed to simplify the process of discrete event simulation, providing users with an intuitive and efficient framework for modeling and analyzing complex systems. Built upon the principles of simplicity, flexibility, and performance, py-des aims to offer a streamlined solution for simulation tasks across various domains, including operations research, computer science, and manufacturing.

Key Principles

  • Simplicity: py-des prioritizes ease of use, allowing users to quickly define simulation models and scenarios without unnecessary complexity.

  • Flexibility: With py-des, users have the flexibility to customize simulation through the usage of predefined and custom Components. From simple simulations to complex scenarios involving multiple entities and interactions, py-des adapts to diverse use cases with ease.

Getting Started

To begin using py-des, simply install the package via pip (coming soon):

pip install py-des-lib

First define your main process extending the Component and defining a main method. First define your main process extending the Component and defining a main method.

from pydes import Component, Simulator

class Process(Component):
    def __init__(self, sim: Simulator):
        self.sim = sim

    def main(self):
        for _ in range(10):
            self.sim.record(self.id, "start waiting")
            self.sim.record(self.id, "start waiting")
            self.sim.sleep(2)
            self.sim.record(self.id, "end waiting")
            self.sim.record(self.id, "end waiting")

Now schedule the main process object and run simulation

sim = Simulator()
p = Process(sim)
sim.schedule(p)
sim.run()

Start your journey looking at the documentation in the quick-start section or check out the examples for guidance on how to create simulation environments, schedule events, and analyze simulation outcomes. Start your journey looking at the documentation in the quick-start section or check out the examples for guidance on how to create simulation environments, schedule events, and analyze simulation outcomes.

Feedback and Support

If you have any questions, suggestions, or feedback regarding py-des, feel free to reach out via GitHub issues or the official communication channels. Your input is invaluable in shaping the future development of the library and ensuring that it meets the needs of its users.

Todos/Ideas

  • more docs
  • add simulation speed
  • add predefined records on components
  • add components: Server, Source, Sink ...
  • add a Network module with nodes and links.

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

py_des_lib-0.1.4.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

py_des_lib-0.1.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file py_des_lib-0.1.4.tar.gz.

File metadata

  • Download URL: py_des_lib-0.1.4.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for py_des_lib-0.1.4.tar.gz
Algorithm Hash digest
SHA256 22fa6064096ce837c61cc0a6b596403bc50f24a6f2e924a5bda1d5fd84f10d24
MD5 dded4a3a7ceb3844cd664d50c9deef5b
BLAKE2b-256 03405a8eebbf8c9ffd2d483a55a0360b7c1f732f86fddfb5be88f36a863abaa5

See more details on using hashes here.

File details

Details for the file py_des_lib-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: py_des_lib-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for py_des_lib-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5a534807aab810dbcec556e017c3b7ef6c1354abc1fb2d4996ad402d45d55355
MD5 431b179c9d14119403e1b9523bbe6164
BLAKE2b-256 27c7c6f483c34892869f853d4544ff0028239fee30836b4d3a44194e0e6e4cbc

See more details on using hashes here.

Supported by

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