simpy


Namesimpy JSON
Version 4.1.1 PyPI version JSON
download
home_page
SummaryEvent discrete, process based simulation for Python.
upload_time2023-11-13 03:39:04
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SimPy
=====

SimPy is a process-based discrete-event simulation framework based on standard
Python. Processes in SimPy are defined by Python `generator`__ functions and
can, for example, be used to model active components like customers, vehicles or
agents.  SimPy also provides various types of shared resources to model
limited capacity congestion points (like servers, checkout counters and
tunnels).

Simulations can be performed “as fast as possible”, in real time (wall clock
time) or by manually stepping through the events.

Though it is theoretically possible to do continuous simulations with SimPy, it
has no features that help you with that. Also, SimPy is not really required for
simulations with a fixed step size and where your processes don’t interact with
each other or with shared resources.

The `documentation`__ contains a `tutorial`__, `several guides`__ explaining key
concepts, a number of `examples`__ and the `API reference`__.

SimPy is released under the MIT License. Simulation model developers are
encouraged to share their SimPy modeling techniques with the SimPy community.
Please post a message to the `SimPy mailing list`__.

There is an introductory talk that explains SimPy’s concepts and provides some
examples: `watch the video`__ or `get the slides`__.

__ http://docs.python.org/3/glossary.html#term-generator
__ https://simpy.readthedocs.io/en/latest/
__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html
__ https://simpy.readthedocs.io/en/latest/topical_guides/index.html
__ https://simpy.readthedocs.io/en/latest/examples/index.html
__ https://simpy.readthedocs.io/en/latest/api_reference/index.html
__ https://groups.google.com/forum/#!forum/python-simpy
__ https://www.youtube.com/watch?v=Bk91DoAEcjY
__ http://stefan.sofa-rockers.org/downloads/simpy-ep14.pdf


A Simple Example
----------------

One of SimPy's main goals is to be easy to use. Here is an example for a simple
SimPy simulation: a *clock* process that prints the current simulation time at
each step:

.. code-block:: python

    >>> import simpy
    >>>
    >>> def clock(env, name, tick):
    ...     while True:
    ...         print(name, env.now)
    ...         yield env.timeout(tick)
    ...
    >>> env = simpy.Environment()
    >>> env.process(clock(env, 'fast', 0.5))
    <Process(clock) object at 0x...>
    >>> env.process(clock(env, 'slow', 1))
    <Process(clock) object at 0x...>
    >>> env.run(until=2)
    fast 0
    slow 0
    fast 0.5
    slow 1
    fast 1.0
    fast 1.5


Installation
------------

SimPy requires Python >= 3.8, both CPython and PyPy3 are known to work.

You can install SimPy easily via `pip <http://pypi.python.org/pypi/pip>`_:

.. code-block:: bash

    $ python -m pip install simpy

You can also download and install SimPy manually:

.. code-block:: bash

    $ cd where/you/put/simpy/
    $ python -m build
    $ python -m pip install dist/simpy-*.whl

To run SimPy’s test suite on your installation, execute:

.. code-block:: bash

    $ python -m tox


Getting started
---------------

If you’ve never used SimPy before, the `SimPy tutorial`__ is a good starting
point for you. You can also try out some of the `Examples`__ shipped with
SimPy.

__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html
__ https://simpy.readthedocs.io/en/latest/examples/index.html


Documentation and Help
----------------------

You can find `a tutorial`__, `examples`__, `topical guides`__ and an `API
reference`__, as well as some information about `SimPy and its history`__ in
our `online documentation`__. For more help, contact the `SimPy mailing
list`__. SimPy users are pretty helpful. You can, of course, also dig through
the `source code`__.

If you find any bugs, please post them on our `issue tracker`__.

__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html
__ https://simpy.readthedocs.io/en/latest/examples/index.html
__ https://simpy.readthedocs.io/en/latest/topical_guides/index.html
__ https://simpy.readthedocs.io/en/latest/api_reference/index.html
__ https://simpy.readthedocs.io/en/latest/about/index.html
__ https://simpy.readthedocs.io/
__ mailto:python-simpy@googlegroups.com
__ https://gitlab.com/team-simpy/simpy/-/tree/master
__ https://gitlab.com/team-simpy/simpy/-/issues

Enjoy simulation programming in SimPy!


Ports and comparable libraries
------------------------------

Re-implementations of SimPy and libraries similar to SimPy are available in the
following languages:

- C#: `SimSharp <https://github.com/abeham/SimSharp>`_ (written by Andreas Beham)
- Julia: `ConcurrentSim <https://github.com/JuliaDynamics/ConcurrentSim.jl>`_
- R: `Simmer <https://github.com/r-simmer/simmer>`_

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "simpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Ontje L\u00fcnsdorf <the_com@gmx.de>, Stefan Scherfke <stefan@sofa-rockers.org>",
    "download_url": "https://files.pythonhosted.org/packages/a8/66/860505ec021a16f9d8cf4b8c4d60ee07bb427649b643312303698c93b551/simpy-4.1.1.tar.gz",
    "platform": null,
    "description": "SimPy\n=====\n\nSimPy is a process-based discrete-event simulation framework based on standard\nPython. Processes in SimPy are defined by Python `generator`__ functions and\ncan, for example, be used to model active components like customers, vehicles or\nagents.  SimPy also provides various types of shared resources to model\nlimited capacity congestion points (like servers, checkout counters and\ntunnels).\n\nSimulations can be performed \u201cas fast as possible\u201d, in real time (wall clock\ntime) or by manually stepping through the events.\n\nThough it is theoretically possible to do continuous simulations with SimPy, it\nhas no features that help you with that. Also, SimPy is not really required for\nsimulations with a fixed step size and where your processes don\u2019t interact with\neach other or with shared resources.\n\nThe `documentation`__ contains a `tutorial`__, `several guides`__ explaining key\nconcepts, a number of `examples`__ and the `API reference`__.\n\nSimPy is released under the MIT License. Simulation model developers are\nencouraged to share their SimPy modeling techniques with the SimPy community.\nPlease post a message to the `SimPy mailing list`__.\n\nThere is an introductory talk that explains SimPy\u2019s concepts and provides some\nexamples: `watch the video`__ or `get the slides`__.\n\n__ http://docs.python.org/3/glossary.html#term-generator\n__ https://simpy.readthedocs.io/en/latest/\n__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html\n__ https://simpy.readthedocs.io/en/latest/topical_guides/index.html\n__ https://simpy.readthedocs.io/en/latest/examples/index.html\n__ https://simpy.readthedocs.io/en/latest/api_reference/index.html\n__ https://groups.google.com/forum/#!forum/python-simpy\n__ https://www.youtube.com/watch?v=Bk91DoAEcjY\n__ http://stefan.sofa-rockers.org/downloads/simpy-ep14.pdf\n\n\nA Simple Example\n----------------\n\nOne of SimPy's main goals is to be easy to use. Here is an example for a simple\nSimPy simulation: a *clock* process that prints the current simulation time at\neach step:\n\n.. code-block:: python\n\n    >>> import simpy\n    >>>\n    >>> def clock(env, name, tick):\n    ...     while True:\n    ...         print(name, env.now)\n    ...         yield env.timeout(tick)\n    ...\n    >>> env = simpy.Environment()\n    >>> env.process(clock(env, 'fast', 0.5))\n    <Process(clock) object at 0x...>\n    >>> env.process(clock(env, 'slow', 1))\n    <Process(clock) object at 0x...>\n    >>> env.run(until=2)\n    fast 0\n    slow 0\n    fast 0.5\n    slow 1\n    fast 1.0\n    fast 1.5\n\n\nInstallation\n------------\n\nSimPy requires Python >= 3.8, both CPython and PyPy3 are known to work.\n\nYou can install SimPy easily via `pip <http://pypi.python.org/pypi/pip>`_:\n\n.. code-block:: bash\n\n    $ python -m pip install simpy\n\nYou can also download and install SimPy manually:\n\n.. code-block:: bash\n\n    $ cd where/you/put/simpy/\n    $ python -m build\n    $ python -m pip install dist/simpy-*.whl\n\nTo run SimPy\u2019s test suite on your installation, execute:\n\n.. code-block:: bash\n\n    $ python -m tox\n\n\nGetting started\n---------------\n\nIf you\u2019ve never used SimPy before, the `SimPy tutorial`__ is a good starting\npoint for you. You can also try out some of the `Examples`__ shipped with\nSimPy.\n\n__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html\n__ https://simpy.readthedocs.io/en/latest/examples/index.html\n\n\nDocumentation and Help\n----------------------\n\nYou can find `a tutorial`__, `examples`__, `topical guides`__ and an `API\nreference`__, as well as some information about `SimPy and its history`__ in\nour `online documentation`__. For more help, contact the `SimPy mailing\nlist`__. SimPy users are pretty helpful. You can, of course, also dig through\nthe `source code`__.\n\nIf you find any bugs, please post them on our `issue tracker`__.\n\n__ https://simpy.readthedocs.io/en/latest/simpy_intro/index.html\n__ https://simpy.readthedocs.io/en/latest/examples/index.html\n__ https://simpy.readthedocs.io/en/latest/topical_guides/index.html\n__ https://simpy.readthedocs.io/en/latest/api_reference/index.html\n__ https://simpy.readthedocs.io/en/latest/about/index.html\n__ https://simpy.readthedocs.io/\n__ mailto:python-simpy@googlegroups.com\n__ https://gitlab.com/team-simpy/simpy/-/tree/master\n__ https://gitlab.com/team-simpy/simpy/-/issues\n\nEnjoy simulation programming in SimPy!\n\n\nPorts and comparable libraries\n------------------------------\n\nRe-implementations of SimPy and libraries similar to SimPy are available in the\nfollowing languages:\n\n- C#: `SimSharp <https://github.com/abeham/SimSharp>`_ (written by Andreas Beham)\n- Julia: `ConcurrentSim <https://github.com/JuliaDynamics/ConcurrentSim.jl>`_\n- R: `Simmer <https://github.com/r-simmer/simmer>`_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Event discrete, process based simulation for Python.",
    "version": "4.1.1",
    "project_urls": {
        "Documentation": "https://simpy.readthedocs.io",
        "Homepage": "https://simpy.readthedocs.io",
        "Source code": "https://gitlab.com/team-simpy/simpy/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4872920ed1224c94a8a5a69e6c1275ac7fe4eb911ba8feffddf469f1629d47f3",
                "md5": "9a4fc48d2094190647327a3c5643f3c0",
                "sha256": "7c5ae380240fd2238671160e4830956f8055830a8317edf5c05e495b3823cd88"
            },
            "downloads": -1,
            "filename": "simpy-4.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9a4fc48d2094190647327a3c5643f3c0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27224,
            "upload_time": "2023-11-13T03:39:03",
            "upload_time_iso_8601": "2023-11-13T03:39:03.362399Z",
            "url": "https://files.pythonhosted.org/packages/48/72/920ed1224c94a8a5a69e6c1275ac7fe4eb911ba8feffddf469f1629d47f3/simpy-4.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a866860505ec021a16f9d8cf4b8c4d60ee07bb427649b643312303698c93b551",
                "md5": "6b9e19f97b358c68705a22f7f5de1eab",
                "sha256": "06d0750a7884b11e0e8e20ce0bc7c6d4ed5f1743d456695340d13fdff95001a6"
            },
            "downloads": -1,
            "filename": "simpy-4.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6b9e19f97b358c68705a22f7f5de1eab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 408997,
            "upload_time": "2023-11-13T03:39:04",
            "upload_time_iso_8601": "2023-11-13T03:39:04.909134Z",
            "url": "https://files.pythonhosted.org/packages/a8/66/860505ec021a16f9d8cf4b8c4d60ee07bb427649b643312303698c93b551/simpy-4.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 03:39:04",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "team-simpy",
    "gitlab_project": "simpy",
    "lcname": "simpy"
}
        
Elapsed time: 0.14778s