Python library timewave
a stochastic process evolution simulation engine in python.
simulation engine
timewave consists of four building blocks.
The State
which evolves over time during a simulation path. It is the nucleus or node which marks a point of time in a path.
The Producer
is the objects that provides states to the simulation and does the actual time evolution. Think of the producer building as the constructor of a stochastic process like a Brownian motion or, less mathematical, future stock prices or future rain intensities.
The Consumer
is an object that takes a state as a point in time provided by the producer and consumes it, i.e. does something with it - the actual calculation if you like.
The Engine
finally, which organizes the creation of states by the producer and the consumption by the consumer. The engine uses, if present, multiprocessing, i.e. takes full advantage of multi cpu frameworks. Therefore the engine splits the simulation into equal but distinct chunks of path for the number of workers (by default the number of cpu) and loops over the set of dedicated path in each worker. Each path is evolved by the producer in states which are at each point in time consumed directly by consumers. States are, due to limits of resources, not stored during the simulation. If you like to, use the storage consumer to save all states.
main frame workflow
setup simulation by
engine = Engine(Producer(), Consumer()) engine.run(range(20))
then run loop starts by
producer/initialize()
setup workers (by default by the number of cpu’s) on each worker start loop by
producer/consumer.initialize_worker()
and invoke loop over paths and start again with
producer/consumer.initialize_path()
then do time evolution of a path
producer.evolve() / consumer.consume()
and finish with last consumer in consumer stack
consumer[-1].finalize_path()
and
consumer[-1].finalize_worker()
put results into queue and take them out by
consumer[-1].put()/get(result)
finish simulation (kind of reduce method)
consumer[-1].finalize()
before returning results from run.
Development Version
The latest development version can be installed directly from GitHub:
$ pip install --upgrade git+https://github.com/sonntagsgesicht/timewave.git
Contributions
Issues and Pull Requests are always welcome.
License
Code and documentation are available according to the Apache Software License (see LICENSE).
Metadata
Release files for timewave 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| timewave-0.6-py3-none-any.whl | Python 3 | none | any | Details for timewave-0.6-py3-none-any.whl |
Release files / timewave-0.6-py3-none-any.whl
| Download URL | timewave-0.6-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b088e506e9e3feb7d2e110772de6e337731653a38f99f18f990ce9a7d6df828
|
|
BLAKE2b-256 checksum How to use checksums |
8c7425628f0ef32ff1794322b602b435db3a5a9da4a49a6aa3c93cb67d45f1aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Security for timewave 0.6
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.