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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file midas-timesim-1.0.0rc5.tar.gz.

File metadata

  • Download URL: midas-timesim-1.0.0rc5.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for midas-timesim-1.0.0rc5.tar.gz
Algorithm Hash digest
SHA256 4eaa90477f7b80748fe9b95b96b6cc77a4f8e36f4639484cc5aeda83d4129173
MD5 e158d8d9b60b0d7ee42d1c1d785df634
BLAKE2b-256 33857e3595856293d5c3307b745a2be27e5dc1312d0a7151ced2d3bab162085e

See more details on using hashes here.

File details

Details for the file midas_timesim-1.0.0rc5-py3-none-any.whl.

File metadata

File hashes

Hashes for midas_timesim-1.0.0rc5-py3-none-any.whl
Algorithm Hash digest
SHA256 b61d3b2ae33da82652a8098445f34df24d55ea113109282e4987ef2eeb7e934a
MD5 46906e44acdf836207db3d2cd63712ad
BLAKE2b-256 6e3af1fd7d6d134c5587feac159ae918b104c8610c3ece5ad5d21d6877bce5a5

See more details on using hashes here.

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