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
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4ec86cf21888cce7acd140547be5301bc3f3100b46d7b9ad68ff5054ac9886 |
|
MD5 | 7e7b4f4897b5429a4d089bb7cecdbdbd |
|
BLAKE2b-256 | 138ec91b15d572e30dd3d3306137afa2d15d2b5e8ee8a7eb022daca5daa71334 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4394ec5515aee3d0660f6b525650c8fa89eb56de566d2438219c398ddee2eee |
|
MD5 | 85c5a01dc7a884f1f650244c95b1f401 |
|
BLAKE2b-256 | 69a3c8490317bb395eb3f3a37336a4ba4eba42299444b2f15c810204ef719144 |