fast_pyworld3
A high-performance Python implementation of the World3 model from "Limits to Growth: The 30-Year Update" (2004). Resolves circular dependency issues for faster simulation.
Installation
pip install fast_pyworld3
Usage
from fast_pyworld3 import World3
world3 = World3()
world3.run()
results = world3.get_results()
from fast_pyworld3.core import World3, World3Config
config = World3Config(year_max=2050, dt=0.25)
world3 = World3(config)
world3.init_constants(nri=1.5e12) # custom
world3.init_variables()
world3.set_table_functions()
world3.set_delay_functions()
world3.run()
Simulation Sectors
- Population
- Capital (Industrial/Service)
- Agriculture
- Pollution (Persistent)
- Resources (Nonrenewable)
Benchmark
20x faster than PyWorld3-03 with identical results.
| Metric | PyWorld3-03 | fast_pyworld3 |
|---|---|---|
| Mean | 1903.91 ms | 94.24 ms |
| Speedup | - | 20.20x |
Validation
| Variable | Correlation | Mean Rel Err | Max Rel Err |
|---|---|---|---|
| Total Population | 1.000000 | 0.0000% | 0.0000% |
| Industrial Output | 1.000000 | 0.0000% | 0.0000% |
| Food Per Capita | 1.000000 | 0.0000% | 0.0000% |
| Pollution Index | 1.000000 | 0.0000% | 0.0000% |
| Natural Resources | 1.000000 | 0.0000% | 0.0000% |
Time Step Scaling
| dt | Steps | PyWorld3-03 | fast_pyworld3 | Speedup |
|---|---|---|---|---|
| 1.000 | 201 | 978.25 ms | 50.67 ms | 19.31x |
| 0.500 | 401 | 1915.30 ms | 92.16 ms | 20.78x |
| 0.250 | 801 | 3840.44 ms | 190.58 ms | 20.15x |
| 0.125 | 1601 | 7794.03 ms | 381.27 ms | 20.44x |
Requirements
- Python >= 3.13
- numpy, scipy, matplotlib
License
CeCILL v2.1
Metadata
Release files for fast_pyworld3 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_pyworld3-1.0.0.tar.gz | 28.7 kB | Without provenance | Details for fast_pyworld3-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_pyworld3-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for fast_pyworld3-1.0.0-py3-none-any.whl |
Total release size: 63.9 kB
Release files / fast_pyworld3-1.0.0.tar.gz
| Download URL | fast_pyworld3-1.0.0.tar.gz |
|---|---|
| Size | 28.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f15d82d94dabdbce3465a722a107ca669977645b31f845bda6f063dca5bdb7a
|
|
BLAKE2b-256 checksum How to use checksums |
70546bd7561dd8f12913e300ec50fa070422a3e96d10c5c4b267cd8197378225
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fast_pyworld3-1.0.0-py3-none-any.whl
| Download URL | fast_pyworld3-1.0.0-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25aa6cafbcc2e1d7a04d9119ccc7bf5ea31625eed882a6e15e205240d6b92486
|
|
BLAKE2b-256 checksum How to use checksums |
f9050292311c756c760803ba83bd446d700e95a3a9ce8a15c029048e6a5fdc98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fast_pyworld3 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.