No Description

Claudio Gomes e5b9450b6c slides improvements 1 year ago
cosimlibrary f4fb5fddbf exercises made 2 years ago
fmus ccf0d21308 moved fmus 2 years ago
slides e5b9450b6c slides improvements 1 year ago
solutions 597d3f51da material running 2 years ago
theory d1b998a67a bentley's comments 2 years ago
tutorial d1b998a67a bentley's comments 2 years ago
.gitignore 57aec7379a ignore platform specific fmus 2 years ago
Dockerfile 597d3f51da material running 2 years ago fd21b433e0 readme improvement 1 year ago
notebook.ps1 65e3f80a4e notebo 2 years ago


This repository contains the materials that are used in the Co-simulation tutorial delivered at Wintersim Conference, in 2019.

Running the Examples

  1. Install Docker.

  2. Using docker's console, navigate to the root of this repository.

  3. Build the docker image:

    docker build -t jupyter .

    This will download all dependencies you need to run the examples. You might need root access.

  4. If you are running docker on windows, you might need to note the host's ip address by running:

    docker-machine ip

    Let us denote it by MACHINE_IP. If this step fails, you might need to run the next step to start the docker machine first.

  5. Run the docker container:

    docker run --name jupyterrun -p 8888:8888 -t jupyter

    This will start a container with name jupyterrun of the image tagged with jupyter and will forward any traffic going into port 8888 (in the host machine) to the same port in the virtual machine. Let TOKEN denote the token given.

  6. Open your browser and navigate to http://MACHINE_IP:8888/?token=TOKEN

  7. Explore the examples.

  8. Any changes made in the notebooks affect only the files inside the container. To retrieve them, you need to detach from the jupyterrun container (typing Ctrl+C on docker's console), and use the following command on docker's console:

    docker cp jupyterrun:/opt/notebooks/tutorial mytutorial

Which will copy all files under the tutorial folder to the mytutorial folder in the repository.

  1. To terminate and clean up, run the following commands docker stop jupyterrun docker rm jupyterrun

Exporting the VM

If you want to preserve the virtual machine that is used to run the materials in this repository (for example, you may want to later load it from a USB stick), follow these instructions:

  1. Build the docker image as in the instructions above.
  2. Export the VM: docker save jupyter | gzip > jupyter.tar.gz
  3. Save the jupyter.tar.gz wherever you want.

Loading the VM

The VM exported with the above instructions can be loaded as follows:

  1. Locate the jupyter.tar.gz file.
  2. Load the VM: docker load < jupyter.tar.gz