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 8.1.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 8.1.0
File Size Uploaded Provenance
phyelds_mesa-8.1.0.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.9 kB

Release files / phyelds_mesa-8.1.0.tar.gz

Download URL phyelds_mesa-8.1.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
668287eca2f6c95841e4006941fa376621637b40f13484df82d0918d7dd07262
BLAKE2b-256 checksum
How to use checksums
3fb863b0a6e8c971be2d765092d782b7ec2399f4ecff0a452f141ca4222b2422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.16 Linux/6.17.0-1022-azure

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

Download URL phyelds_mesa-8.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f18eb9f635101a9f079efc63d82ca91bdb8a71f4107ee1a865e20e7386e1a4d2
BLAKE2b-256 checksum
How to use checksums
48a3e5b83f2c425479325e30a18a225178844e033cc5590b48c2894e7c16ee2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.16 Linux/6.17.0-1022-azure

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

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