This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Mosaik

Mosaik is a simulation compositor for Smart Grid simulations.

It lets you re-use existing simulators and couple them to simulate large-scale Smart Grid scenarios. Mosaik offers powerful mechanisms to specify and compose these scenarios.

Version: 2.3.0 License: LGPL

Example

A simple demo scenario with mosaik:

>>> import mosaik
>>>
>>> sim_config = {
...     'ExampleSim': {'python': 'example_sim.mosaik:ExampleSim'},
... }
>>>
>>> def create_scenario(world):
...     exsim1 = world.start('ExampleSim')
...     exsim2 = world.start('ExampleSim')
...
...     a = [exsim1.A(init_val=0) for i in range(3)]
...     b = exsim2.B.create(2, init_val=0)
...
...     for i, j in zip(a, b):
...         world.connect(i, j, ('val_out', 'val_in'))
>>>
>>> world = mosaik.World(sim_config)
>>> create_scenario(world)
>>> world.run(until=2)
Progress: 25.00%
Progress: 50.00%
Progress: 75.00%
Progress: 100.00%

Installation

Mosaik requires Python >= 3.3. Use pip to install it, preferably into a virtualenv:

$ pip install mosaik

Documentation, Source code and issues

The documentation is available at https://mosaik.readthedocs.org.

Please report bugs and ideas for improvment to our issue tracker.

Changelog

2.3.0 - 2016-04-26

  • [NEW] Allow passing environment vars to sup processes
  • [FIX] Fixed a bug in the version validation which raised an errro when using a floating point for the version

2.2.0 - 2016-02-15

  • [NEW] API version 2.2: Added an optional “setup_done()” method.
  • [CHANGE] API version validation: The API version is no longer an integer but a “major.minor” string. The major part has to math with mosaiks major version. The minor part may be lower or equal to mosaik’s minor version.
  • [FIX] Various minor fixes and stability improvements.
  • [FIX] Various documentation updates and fixes.

2.1.2 – 2014-10-29

  • [FIX] World.shutdown() now checks if the socket still exists before attempting to close it.
  • [FIX] Fixed a bug that made the last extra method of a simulator shadow all previous ones.

2.1.1 – 2014-10-28

  • [NEW] World.run() now prints a warning if you forget to connect a simulator’s entities.
  • [FIX] Fixed some problems with the data-flow cache.

2.1 – 2014-10-24

  • [NEW] Mosaik can now perform real-time simulations. Before, this functionality needed to be implemented by simulators. Now it’s just World.run(until=x, rt_factor=y), where rt_factor defines the simulation speed relative to the wall-clock time (issue #24).
  • [NEW] Simulators can now expose extra methods via their API that can be called from a mosaik scenario. This allows you to, e.g., store static data in a data base. These extra API methods need to be specified in the simulator’s meta data (issue #26).
  • [NEW] util.connect_many_to_one() helper function.
  • [NEW] More and better documentation:
    • Tutorial for integrating simulators, control strategies and for creating scenarios.
    • Sim API description
    • Scenario API description
    • Sim Manager documentation
    • Scheduler documentation
    • Discussion of design decisions
    • Logo, colors, CI
  • [NEW] Added util.sync_call() which eases calling proxied methods of a simulator synchronously.
  • [CHANGE] The rel attribute in the entity description returned by create() is now optional.
  • [CHANGE] Moved proxied methods from SimProxy to SimProxy.proxy in order to avoid potential name clashes with other attributes.
  • [CHANGE] Check a simulator’s models and extra API methods for potential name clashes with the built-in API methods.
  • [CHANGE] The argument execution_graph of World was renamed to debug. The execution graph now also stores the time after a simulation step (in addition to the time before the step).
  • [FIX] issue #22: The asynchronous requests get_data() and set_data() now check if the async_requests flag was set in World.connect().
  • [FIX] issue #23: finalize() is now called for in-process Python simulators.
  • [FIX] issue #27: Dramatically improved simulation performance (30 times as fast in some cases) if simulators use different step sizes (e.g. 1 minute and 1 hour) by improving some internal data structures.

2.0 – 2014-09-22

  • Mosaik 2 is a complete rewrite of mosaik 1 in order to improve its maintainability and flexibility.
  • Removed features:
    • The mosl DSL (including Eclipse xtext and Java) are now gone. Mosaik now only uses Python.
    • Mosaik now longer has executables but is now used as a library.
    • The platform manager is gone.
    • The database is now a separate package, see mosaik-hdf5.
    • The old web UI is gone.
  • Mosaik now consists of four core components with the following feature sets:
    • mosaik Sim API
      • The API has bean cleaned up and simplified.
      • Simulators and control strategies share the same API.
      • There are only four calls from mosaik to a simulator: init, create, step and get_data.
      • Simulators / processes can make asynchronous requests to mosaik during a step: get_progress, get_related_entities, get_data, set_data.
      • ZeroMQ with JSON is replaced by plain network sockets with JSON.
    • Scenarios:
      • Pure Python is now used to describe scenarios. This offers you more flexibility to create complex scenarios.
      • Scenario creation simplified: Start a simulator to get a model factory. Use the factory to create model instances (entities). Connect entities. Run simulation.
      • Connection rules are are no based on a primitive connect function that only connects two entities with each other. On top of that, any connection strategy can be implemented.
    • Simulation Manager:
      • Simulators written in Python 3 can be executed in process.
      • Simulators can be started as external processes.
      • Mosaik can connect to an already running instance of a simulator. This can be used as a replacement for the now gone platform manager.
    • Simulation execution:
      • The simulation is now event-based. No schedule and no synchronization points need to be computed.
      • Simulators can have different and varying step sizes.
  • Mosaik ecosystem:
You can find information about older versions on the history page

Authors

The original concepts for mosaik were developed by Steffen Schütte and Stefan Scherfke.

The author of mosaik version 2 is Stefan Scherfke.

Okko Nannen and Florian Schloegl joined the team in May / July 2014.

Release History

Release History

2.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0a4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0a3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0a2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mosaik-2.3.0-py2.py3-none-any.whl (28.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Apr 28, 2016
mosaik-2.3.0.tar.gz (5.4 MB) Copy SHA256 Checksum SHA256 Source Apr 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting