Spaces:
Running
Running
|
Download integrations/simpy/README.md from pgg-engineering/sincekit: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/pgg-engineering/sincekit/resolve/main/integrations/simpy/README.md
- Command line
-
hf download hf://spaces/pgg-engineering/sincekit/integrations/simpy/README.md
-
curl -L -o README.md https://huggingface.co/spaces/pgg-engineering/sincekit/resolve/main/integrations/simpy/README.md
1.23 kB
| # SimPy warehouse example | |
| Simulate 256 robots sending position updates and going offline. Sixty-four dashboards keep independent local replicas and poll at five different intervals. A dispatcher gathers due readers once per simulated time unit, fetches changed positions once, and applies each reader's prefix. Every delivery checks the dashboard against the authoritative fleet before advancing its cursor. | |
| From the repository root, use a Python environment with a C++17 compiler, CPython headers and setuptools. The following commands build the binding locally and isolate the SimPy installation. | |
| ```sh | |
| (cd python && python3 setup.py build_ext --inplace) | |
| python3 -m venv /tmp/sincekit-simpy | |
| /tmp/sincekit-simpy/bin/python -m pip install -r integrations/simpy/requirements.txt | |
| PYTHONPATH=python /tmp/sincekit-simpy/bin/python integrations/simpy/warehouse.py | |
| ``` | |
| The default run publishes 4,096 mutations and validates 832 replica deliveries, including a final catch-up for all 64 readers. Results count shared rows planned and rows applied across dashboards. The two counts describe different work. This is a first-party SinceKit example using the [SimPy 4.1.2 discrete-event runtime](https://simpy.readthedocs.io/en/4.1.2/). | |