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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file midas-store-1.0.0rc3.tar.gz
.
File metadata
- Download URL: midas-store-1.0.0rc3.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35cb6252520845e0d6174929d7a4787a05c7fedf4bcadde728b661ac592eda43 |
|
MD5 | c19b62702620d057a26f469396811c0b |
|
BLAKE2b-256 | 8da84e1ca8195cdea3d9e24a7150f040860b8570665aed7a0cb4f02c3c0c0937 |
File details
Details for the file midas_store-1.0.0rc3-py3-none-any.whl
.
File metadata
- Download URL: midas_store-1.0.0rc3-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd9fde65a660e61f33715b47a11139f2ed3d593e4850f698f20b2c3d1db181c |
|
MD5 | ce0e39773654ad47c2ce4547d4eebefe |
|
BLAKE2b-256 | 6ac22cf0a38d00e17cc0f64db09ff35a15ac4097b1de2d8a6526c88ddaee66f2 |