Skip to main content

An extension of SimPy for working with distinct agents.

Project description

simpy-agents extends SimPy by adding the ‘agent’ field to events, allowing the user to track which agent is associated with each event.

# Create an environment and schedule a Timeout
env = Environment()
env.timeout(10, agent='Test Agent')

# The 'agent' field is passed to the event and stored in the queue
env._queue
>>> [(10, 1, 0, <Timeout(10) object at 0x10f913bd0>, 'Test Agent')]

# The Environment class now has a 'scheduled_agents' property
env.scheduled_agents
>>> ['Test Agent']

Installation

simpy-agents is installable via pip: pip install simpy-agents.

All new functionality is optional and the original SimPy API is maintained. It is recommended to remove any other installations SimPy from the environment to ensure the intended version is imported.

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

simpy-agents-1.0.0.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

simpy_agents-1.0.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file simpy-agents-1.0.0.tar.gz.

File metadata

  • Download URL: simpy-agents-1.0.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

File hashes

Hashes for simpy-agents-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b4ec86cf21888cce7acd140547be5301bc3f3100b46d7b9ad68ff5054ac9886
MD5 7e7b4f4897b5429a4d089bb7cecdbdbd
BLAKE2b-256 138ec91b15d572e30dd3d3306137afa2d15d2b5e8ee8a7eb022daca5daa71334

See more details on using hashes here.

File details

Details for the file simpy_agents-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: simpy_agents-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

File hashes

Hashes for simpy_agents-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4394ec5515aee3d0660f6b525650c8fa89eb56de566d2438219c398ddee2eee
MD5 85c5a01dc7a884f1f650244c95b1f401
BLAKE2b-256 69a3c8490317bb395eb3f3a37336a4ba4eba42299444b2f15c810204ef719144

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