A MIDAS module for a time simulator.
Project description
MIDAS Time Simulator
Description
This package contains a MIDAS timesim module, which contains a simulator that tracks time and is able to manipulate it within the simulation.
The intended use-case for the time simulator is to be used inside of MIDAS.
However, it only depends on the midas-util
package and be used 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-timesim
Usage
The complete documentation is available at https://midas-mosaik.gitlab.io/midas.
Inside of MIDAS
To use the store inside of MIDAS, simply add timesim
to your modules:
my_scenario:
modules:
- timesim
# - ...
This is sufficient for the timesim to run. However, additional configuration is possible with:
my_scenario:
# ...
timesim_params:
start_date: 2020-01-01 01:00:00+0100
All of the core simulators that have support time inputs will then automatically connect to the timesim simulator. The scope timesim will be created automatically but no other scopes are supported.
Any Mosaik Scenario
If you don't use MIDAS, you can add the timesim
manually to your mosaik scenario file. First, the entry in the sim_config
:
sim_config = {
"TimeSimulator": {"python": "midas.modules.timesim:TimeSimulator"},
# ...
}
Next, you need to start the simulator (assuming a step_size
of 900):
timesim_sim = world.start("TimeSimulator", step_size=900)
Finally, the model needs to be started:
timesim = timesim_sim.Timegenerator()
Afterwards, you can define world.connect(timesim, other_entity, 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_timesim-2.0.0a1.tar.gz
.
File metadata
- Download URL: midas_timesim-2.0.0a1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c124f4c429780faa677a577dedf590707b70245d5b0b1c0ad6e0c22399f68c23 |
|
MD5 | 217ff7312bd3cd8fefef732c35247bee |
|
BLAKE2b-256 | af1d83004c0ed226a74dff9dea25ee6ef56e81f726a977720f489f7a0baac7b3 |
File details
Details for the file midas_timesim-2.0.0a1-py3-none-any.whl
.
File metadata
- Download URL: midas_timesim-2.0.0a1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfdf3b775bbca6edccca99e9c6c9792acea1ccd72845d6cf552a3e59f2b533ec |
|
MD5 | 6413cf733579faa2780e11265cd3e592 |
|
BLAKE2b-256 | f75d158f067ea70c2b0b10f370ffecf3d77fee275aa4e0125ca5ab0fb1de4fe9 |