Skip to main content

A database simulator that stores every input.

Project description

MIDAS Store

Description

This package contains a MIDAS module providing a database simulator. This works like most other collectors for mosaik, i.e., it accepts any number of inputs and stores them in a database file.

Although this package is intended to be used with MIDAS, it does not depend from anything MIDAS-related except for the midas-util package. You can use in any mosaik simulation scenario.

Installation

This package will usually installed automatically together with midas-mosaik. It is available on pypi, so you can install it manually with

pip install midas-store

Usage

The complete documentation is available at https://midas-mosaik.gitlab.io/midas.

Inside of MIDAS

To use the store inside of midas, just add store to your modules

my_scenario:
  modules:
    - store
    - ...

and configure it with

  store_params:
    filename: my_db.hdf5
    overwrite: False
    buffer_size: 0

All simulators that have something to store will then automatically connect to the store simulator.

Any mosaik scenario

If you don't use MIDAS, you can add the store manually to your mosaik scenario file. First, the entry in the sim_config:

sim_config = {
    "MidasHdf": {"python": "midas.modules.store:MidasHdf5"},
    # ...
}

Next, you need to start the simulator (assuming a step_size of 900):

store_sim = world.start("MidasHdf", step_size=900)

Finally, the model needs to be started:

store = store_sim.Database(filename="path/to/my_db.hdf5", buffer_size=0, overwrite=False)

Afterwards, you can define world.connect(other_entity, store, attrs) as you like.

License

This software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midas-store-1.0.0rc2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

midas_store-1.0.0rc2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file midas-store-1.0.0rc2.tar.gz.

File metadata

  • Download URL: midas-store-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for midas-store-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 8265814af2090abeb886c6f37859211a14b425b1ede28dd4e7fd4a4608487771
MD5 c032c7f1465bceed606ca3aa55d22ffb
BLAKE2b-256 647b3dc4f3de2bda0d4fc93aee295dac6ab696c7c382df182b5d4a5325cedcb7

See more details on using hashes here.

File details

Details for the file midas_store-1.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: midas_store-1.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for midas_store-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c8f3f34763243239773046b1a7ddeab5c2b80cd1ad9b79f3879f2d990d6d9bc
MD5 f1d1c8abd08f882a5a933bcca01078c2
BLAKE2b-256 55ef6a8e74c1646f9643e75feb4bc7c7c84a3d7fb312164968252442b23e9ac7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page