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 can be used in any mosaik simulation scenario.

Installation

This package will installed automatically together with midas-mosaik if you opt-in for the full extra. 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 time simulator 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_timesim.simulator: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-2.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midas_timesim-2.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file midas_timesim-2.0.0.tar.gz.

File metadata

  • Download URL: midas_timesim-2.0.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for midas_timesim-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c0a269c4d52ddd4724be47857b45bb70ae9f2ec7946d3f39773bff3467dca96a
MD5 43977884e3c6cb5dbee1ca29e669b3c8
BLAKE2b-256 4c2e713aa2672ea5030ea78a0c08dc98553550b30081b4034ccf48669f959387

See more details on using hashes here.

File details

Details for the file midas_timesim-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: midas_timesim-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for midas_timesim-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b4a0e569f6fc3ed4a59f5ba381e392d8e37f29f38366cb2ef131ca22a35d66f
MD5 6c38aa8640a7c8c9adb0de7e7226cc44
BLAKE2b-256 dcc919bade910e48a6942b1c85509dd0a2a9f331c035eb8fad7719d608e48906

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