Skip to main content

This library allows you to simulate multi-agent-system using pm4py representation of Petri nets

About conditions:

There are several types of conditions in package simulating/conditions. condition.py - contains a definition of abstract class. This class contains following methods:

  1. check(self, trace: dict[PetriNet.Transition | str, int]) -> bool. Used for checking conditions by traveled path
  2. still_relevant(self, trace: dict[PetriNet.Transition | str, int]) -> bool. Used for checking the conditions for relevance
  3. get_dependent(self) -> Iterable[PetriNet.Transition | str]. Used to get dependent part of condition. See

Let a and b are transitions in some Petri net, then the library provides following types of condition:

  1. a occurs before b (a < b). In case of cyclic interactions after the first 'a' there can be any number of 'b'
  2. a occurs before b with cyclic interaction. Provides following opportunity for transitions: for each 'b' in trace should be own 'a'. For example, the trace a -> ... -> a -> ... -> b -> ... -> b also satisfies the condition
  3. a does not occur before b (a !< b)
  4. a set of transitions must be triggered synchronously. This condition also can be used with cycled interactions. By default, after first trigger of all synchronized transition, the condition become irrelevant. If cycled mod enabled, the condition is always relevant

How to use library for simulating multi-agent-systems:

  1. Import/create Petri nets and initial markings by using pm4py
  2. Create iterable object of conditions
  3. Create MultiAgentSystems object (pass him Petri nets, marking, time of start logging (optional) and duration of transition's trigger (optional))
  4. Create traces trough method create_traces. You can pass number of traces (by default = 1) and maximal depth (by default = 2 * sum of number of elements in all nets). This method return list of event logs ( simulating/log/event_log.py)
  5. You can export in csv the list from previous step by using method export_csv from simulating/log/export.py
In case of deadlock at least in one of simulated traces the create_traces method returns only trace that reached the deadlock. See example in ~/examples/1/

Metadata

Release files for multi-agent-systems 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multi-agent-systems 1.0.0
File Size Uploaded Provenance
multi_agent_systems-1.0.0.tar.gz 6.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for multi-agent-systems 1.0.0
File Interpreter ABI Platform
multi_agent_systems-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / multi_agent_systems-1.0.0.tar.gz

Download URL multi_agent_systems-1.0.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
21abf8cd6c2b59aa11da91351117d3cbd90f129e6e55e5be368d23e828850623
BLAKE2b-256 checksum
How to use checksums
9d97ec96e12b6fc925fcaf7efcaf65b87a056eb9a5c5f28f0f3932dfefa3e31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.0

Release files / multi_agent_systems-1.0.0-py3-none-any.whl

Download URL multi_agent_systems-1.0.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86a2aa251ba11a0c66cd148d8d623c39e0d1cf7ebad13aeb089c3dc59df47d9f
BLAKE2b-256 checksum
How to use checksums
26583e818ca9946941858e07e3ace951144b43cb2fb9031ce2d8d51076a20924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.0

Security for multi-agent-systems 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page