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.

Version: 2.1

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_results.csv
    step_size: 900
    unique_filename: False
    keep_old_files: False

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 = {
    "MidasCSV": {"python": "midas_store.simulator:MidasCSVStore"},
    # ...
}

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

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

Finally, the model needs to be started:

store = store_sim.Database(filename="my_results.csv", keep_old_files=False, unique_filename=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.0a9.tar.gz (13.0 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.0a9-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for midas_store-2.1.0a9.tar.gz
Algorithm Hash digest
SHA256 a258df426f40e55527bde807fae17f895dd5761bf5c25a7eec98d5a105566cf7
MD5 b0252dd59d1c3dd520efe2d5ff3884c6
BLAKE2b-256 8b8ad8c603bf9fbdbb1ac3494f197274de8b8dced6db9b86d4d9cde75ca6fab0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for midas_store-2.1.0a9-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc18c9e14f6ff7e7d20fbdb35a88c0b1e76829481368fe44482649adc6d781f
MD5 384792dd4be0f6564795ccaf9e8036d1
BLAKE2b-256 51076e4f2b45a6bd6b3341285e7adad16eb4f53b03c76a2d8dbe7f62b5a656e3

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