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 (filename is required, everything else is optional and can be left out if the default values, shown below, are used):

  store_params:
    filename: my_db.hdf5
    step_size: 900
    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.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

midas_store-1.0.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file midas-store-1.0.1.tar.gz.

File metadata

  • Download URL: midas-store-1.0.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for midas-store-1.0.1.tar.gz
Algorithm Hash digest
SHA256 01d01bfe73fb205d5221f32520aa5ee152afd37c5b61e347fe05e19f7639300b
MD5 f8d0c1614bf3485442b6159c0f4ec199
BLAKE2b-256 ae2fd27edf401917114f68ddc6e0619e5b096bb13eab48d74674253589e1d590

See more details on using hashes here.

File details

Details for the file midas_store-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: midas_store-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for midas_store-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39550377e5a7a271b15191d22dc42eba53528f8f1d22722197aa96b501194ec8
MD5 2ab88adfb8f249a3a1e8640f51634a7f
BLAKE2b-256 1979174318ae21c805a91783eaf05d88f1339e8579ca32c524f35f1ccb98e2a6

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