Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mosaik Demo

Demonstration project for the mosaik co-simulation middleware.

Status

  • pipeline status
  • coverage report

Prerequisites

Under Windows:

  • install Python 3.7 64 bit for all users

Under Ubuntu

sudo apt install python3.7

Ensuring pip

sudo python3.7 -m ensurepip

Creating the Virtual Environment

Under Linux

python3.7 -m venv venv

Under Windows

"C:\Program Files\Python37\python.exe" -m venv venv

Activating the Virtual Environment

Under Bash:

source venv/bin/activate

Under Windows:

venv\Scripts\activate.bat

Installing the Virtual Environment Requirements

python -m pip install --upgrade -r requirements.d/venv.txt

Upgrading the Virtual Environment Requirements

pip-review --local --auto

Testing the Virtual Environment

tox --help

Freezing the Virtual Environment Requirements

Under Linux

 venv/bin/python -m pip uninstall pkg_resources
 venv/bin/python -m pip freeze --all --exclude-editable | grep -v "mosaik_demo" > requirements.d/venv.txt
 # And remove line beginning with package name

Under Windows

 venv\Scripts\python -m pip freeze --all --exclude-editable | grep -v "mosaik_demo" > requirements.d/venv.txt
# And remove line beginning with package name

Creating the Test Environment

tox -e py37 --notest

Activating the Test Environment

Under Bash:

source .tox/py37/bin/activate

Under Windows:

venv\Scripts\activate.bat

Executing the Scenario

Under Linux:

PYTHONPATH=. python mosaik_demo/demo/demo.py

Under Windows:

set PYTHONPATH=. && python mosaik_demo\demo\demo.py 

Accessing the User Interface

The user interface can be accessed from a web browser: http://localhost:8000

The server-side log should look something like this:

Starting "PyPower" as "PyPower-0" ...
Starting "HouseholdSim" as "HouseholdSim-0" ...
Starting "CSV" as "CSV-0" ...
Starting "DB" as "DB-0" ...
INFO:mosaik_api:Starting MosaikHdf5 ...
Starting "WebVis" as "WebVis-0" ...
INFO:mosaik_api:Starting MosaikWeb ...
Starting simulation.
INFO:mosaik_web.mosaik:Creating topology ...
INFO:mosaik_web.mosaik:Topology created
Simulation finished successfully.

Upgrading the Test Environment Requirements

pip-review --local --auto

Test Updated Packages

PYTHONPATH=. pytest

Freezing the Tox Requirements

Under Linux

.tox/py37/bin/python -m pip uninstall pkg_resources
.tox/py37/bin/python -m pip freeze --all --exclude-editable | grep -v "mosaik_demo" > requirements.d/base.txt

Under Windows

.tox\py37\Scripts\python.exe -m pip freeze --all --exclude-editable | grep -v "mosaik_demo" > requirements.d\base.txt

Deactivating any Environment

deactivate

Testing GitLab's Continuous Integration locally

Make sure the code to be tested is pushed, then run:

gitlab-runner exec docker python37

Installing the Package from PyPI

python -m pip install mosaik-demo

Running the Demo

mosaik-demo-month

Metadata

Release files for mosaik.Demo-SemVer 0.1.0rc20190717000634

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mosaik.Demo-SemVer 0.1.0rc20190717000634
File Interpreter ABI Platform
mosaik.Demo_semver-0.1.0rc20190717000634-py3-none-any.whl Python 3 none any Details

Release files / mosaik.Demo_semver-0.1.0rc20190717000634-py3-none-any.whl

Download URL mosaik.Demo_semver-0.1.0rc20190717000634-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d75d84367d73a086f2b96337af7a8b4eab65c324d0e16e0d7f1561f8b7ad44a2
BLAKE2b-256 checksum
How to use checksums
af7995b61e6af10d5cf741a38436742b5785e1abfd964076597fa4ecae6c5a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page