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
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.8 -m venv venv
Under Windows
"C:\Program Files\Python38\python.exe" -m venv venv
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.exe -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
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/py38/bin/python -m pip uninstall pkg_resources
.tox/py38/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
Testing GitLab's Continuous Integration locally
Make sure the code to be tested is pushed, then run:
gitlab-runner exec docker python38
Installing the Package from PyPI
python -m pip install mosaik-demo
Running the Demo
mosaik-demo-month
Release files for mosaik.Demo-SemVer 0.1.0rc20210608000927
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mosaik.Demo_SemVer-0.1.0rc20210608000927-py3-none-any.whl | Python 3 | none | any | Details |
Release files / mosaik.Demo_SemVer-0.1.0rc20210608000927-py3-none-any.whl
| Download URL | mosaik.Demo_SemVer-0.1.0rc20210608000927-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68a2bbcce1c67a1fb354ea63e7f1553815263fd58d93f4beff5161ed577320b1
|
|
BLAKE2b-256 checksum How to use checksums |
7d5c028db238ae16d1670c6c82c38b0080fef6ac55c9823405911a129f36d314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.8
|