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, you can use in any mosaik simulation scenario.

Installation

This package will usually installed automatically together with midas-mosaik if you opt-in any of the extras, e.g., base or bh. 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-2.1.0a4.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midas_store-2.1.0a4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file midas_store-2.1.0a4.tar.gz.

File metadata

  • Download URL: midas_store-2.1.0a4.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for midas_store-2.1.0a4.tar.gz
Algorithm Hash digest
SHA256 4ac0e59e91ba3aaa092c1b5a18a66ec0862040c1f1ef191889ed3e151e6f3ede
MD5 40a9e2eca0668d4c78d1e02aa71efad1
BLAKE2b-256 06b82d674d7025576315c0b2794469b00edf37a9629c1f38c83cd05ce8c76cad

See more details on using hashes here.

File details

Details for the file midas_store-2.1.0a4-py3-none-any.whl.

File metadata

  • Download URL: midas_store-2.1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for midas_store-2.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 f10629725308cca569737e6a5e038375b1e536b8a82d1de985c2efa66e525624
MD5 9209681ff4287d872242e156f43f67c7
BLAKE2b-256 2f801d9d9ed3f303b24f92195f5f69df72fe4fd58bae2c9b697f051cb6d67ff8

See more details on using hashes here.

Supported by

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