Skip to main content

phyelds-mesa

Mesa integration for phyelds: run aggregate programs on the agents of a Mesa model.

Installation

pip install phyelds-mesa

phyelds-mesa installs a compatible phyelds release and Mesa.

Usage

from phyelds.calculus import aggregate
from phyelds.libraries.device import sense
from phyelds.libraries.distances import hops_distance
from phyelds.libraries.spreading import distance_to
from phyelds.mesa import AggregateRuntime, within


@aggregate
def hops_to_source():
    return distance_to(sense("source"), hops_distance())


runtime = AggregateRuntime(
    hops_to_source,
    neighbors=within(1.5),                                 # or cell_neighbors in a grid
    sensors=lambda agent: {"source": agent.unique_id == 1},
)
# In Model.step(): one synchronous round on every agent.
hops = runtime.run_round(model.agents)                     # {unique_id: result}

See the documentation.

Metadata

Release files for phyelds-mesa 10.3.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 phyelds-mesa 10.3.0
File Size Uploaded Provenance Actions
phyelds_mesa-10.3.0.tar.gz 3.5 kB Without provenance Details for phyelds_mesa-10.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phyelds-mesa 10.3.0
File Interpreter ABI Platform Actions
phyelds_mesa-10.3.0-py3-none-any.whl Python 3 none any Details for phyelds_mesa-10.3.0-py3-none-any.whl

Total release size: 7.7 kB

Release files / phyelds_mesa-10.3.0.tar.gz

Download URL phyelds_mesa-10.3.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6ce9693e2021220d5b726116791bb4f89f77f718984d9ec6aeba76b7c8bd6bf3
BLAKE2b-256 checksum
How to use checksums
fb19a881afcdd985f7ec29c93427d20be563daeca0f68faa637dfbc0bcb8dbdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.13.18 Linux/7.0.0-1019-azure

Release files / phyelds_mesa-10.3.0-py3-none-any.whl

Download URL phyelds_mesa-10.3.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10eff58bb9a365e3f6b5920c6eee0886bb022319e34cfb4c94569aacbc2e21ae
BLAKE2b-256 checksum
How to use checksums
15a70f122617f1a37968b59d5d2acf6fde866bfdcad4e83ab603556e7f58f5b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.13.18 Linux/7.0.0-1019-azure

Security for phyelds-mesa 10.3.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

10.3.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