Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midas-timesim-1.0.0rc5.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

midas_timesim-1.0.0rc5-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

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