Skip to main content

A simple simulation visualization for the browser.

Project description

mosaik-web

A simple mosaik simulation visualization for web browsers.

Installation

$ pip install mosaik-web

Add mosaik-web to sim_config:

sim_config = {
    'WebVis': {
        'cmd': 'mosaik-web -s 127.0.0.1:8000 %(addr)s',
    },
}

Start mosaik-web without SSL:

webvis = world.start('WebVis', start_date='2014-01-01 00:00:00', step_size=60)

Start mosaik-web with SSL:

webvis = world.start('WebVis', start_date='2014-01-01 00:00:00', step_size=60, activate_ssl=True, keyfile=keyfile, certfile=certfile)

CONFIGURATION

The default configuration looks like this:

default_config = {
    'ignore_types': ['Topology'],
    'merge_types': ['Branch', 'Transformer'],
    'merge_nodes': [],
    'disable_heatmap': False,
    'timeline_hours': 24,
    'etypes': {},
    'ignore_names': [],
}

You can find a full example configuration here: https://gitlab.com/mosaik/examples/des_demos/-/blob/master/data/setup_webvis.py

Changelog

0.4.0 - 2022-01-05

  • [NEW] ignore_names: Allow to ignore nodes with specific names

  • [NEW] Add merge_nodes functionality

0.3.0 – 2021-06-18

  • [NEW] Allow to activate SSL.

  • [CHANGE] Updated to mosaik-api 3.0.

0.2.2 – 2019-11-01

  • [CHANGE] Compatibility to networkx 2.4

0.2.1 – 2017-12-08

  • [FIX] Some necessary bug fixes for the cooperation with mosaik.

0.2 – 2014-10-31

  • [CHANGE] Moved configuration from separate config file to extra methods set_config() and set_etypes().

  • [CHANGE] Tolerate entities for which no etype-config is provided.

  • [CHANGE] Removed real-time capabilities since mosaik offers this now.

  • [FIX] Catch OSErrors for websockets to make them not crash the whole simulation.

0.1.6 – 2014-09-22

  • [NEW] Raise an AssertionError if an entity type is not listed in the config file.

  • [FIX] The progress bar no longer makes strange jumps.

0.1.5 – 2014-09-22

  • [CHANGE] Updated to mosaik-api 2.0.

0.1.4 – 2014-07-31

  • [CHANGE] Updated to mosaik-api 2.0a4.

0.1.3 – 2014-06-26

  • [CHANGE] The timeline diagram now looks way nicer.

  • [CHANGE] Adopted latest changes of the mosaik API.

0.1.2 – 2014-05-05

  • [FIX] Updated get_related_entities() call for mosaik 2.0a2.

0.1.1 – 2014-03-27

  • [FIX] Include html/css/js files in the package.

0.1 – 2014-03-27

  • Initial release

Authors

The mosaik web visualization was created by Stefan Scherfke and Gunnar Jeddeloh.

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

mosaik-web-0.4.0.tar.gz (75.0 kB view details)

Uploaded Source

Built Distribution

mosaik_web-0.4.0-py2.py3-none-any.whl (67.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mosaik-web-0.4.0.tar.gz.

File metadata

  • Download URL: mosaik-web-0.4.0.tar.gz
  • Upload date:
  • Size: 75.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for mosaik-web-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c122ec225b41457f116469770f206e9b806d5e73efec1f8f10a728add7af52ba
MD5 eeda7efacf6431c0adfe0d3019a64668
BLAKE2b-256 6e55f929118d806d1c75ea078a6f79cbb41470e0a33bf19443dbfc973cb2af25

See more details on using hashes here.

File details

Details for the file mosaik_web-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mosaik_web-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 67.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for mosaik_web-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c4f55ed76c5668e7f020796f8bbff40f3c885e3c22179f47cd7d24442107e011
MD5 1ba8941e81ca43123819452b42bf3a1e
BLAKE2b-256 7dceda4560822e1252c1d5dc326cbd688b8bd32161ba26fbcc3242fe38bbd5ac

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