Claudio Gomes 484520a98f tecnical issues solved 6 tahun lalu
..
1-NewtonsLaws 6c908d974f bond graph materials and docker file 6 tahun lalu
2-StationaryAction a120f9001f exercises 6 tahun lalu
3-BondGraphs 6c908d974f bond graph materials and docker file 6 tahun lalu
4-Modelica 51f67bddd2 tecnical issues solved with modelica tutorial 6 tahun lalu
5-CBDModeling 484520a98f tecnical issues solved 6 tahun lalu
assets 8dbcd08f5b empirical experiment with stationary motion 6 tahun lalu
lib 3cf891e4c8 cbds running in jupyter 6 tahun lalu
DockerfileTutorials123567 484520a98f tecnical issues solved 6 tahun lalu
DockerfileTutorials4 00bbd20833 cbd 6 tahun lalu
README.md 484520a98f tecnical issues solved 6 tahun lalu
generate_exercises.ps1 51f67bddd2 tecnical issues solved with modelica tutorial 6 tahun lalu
generate_exercises.py a120f9001f exercises 6 tahun lalu
notes.drawio 484520a98f tecnical issues solved 6 tahun lalu
notes.ipynb d491aae96e stationary action exercises done 6 tahun lalu
notes.md d491aae96e stationary action exercises done 6 tahun lalu
test.mo 83e4d35d95 materials and notes 6 tahun lalu
test_bondgraphs.py 6c908d974f bond graph materials and docker file 6 tahun lalu

README.md

Objective

This repository contains the materials that are used in the MoDELS tutorial of physical systems modelling for software engineers, in 2019.

Running the Materials

  1. Install Docker.

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

  3. Build the corresponding docker image (each requires about 5GB of disk space):

    docker build -f DockerfileTutorials123567 -t jupyter .
    

    or

    docker build -f DockerfileTutorials4 -t jupyter .
    

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

  1. Note the host's ip address by running:

    docker-machine ip
    

    Let us denote it by MACHINE_IP

  2. 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. If a token is given, copy it so that you can later access the jupyter notebook from your browser. Let TOKEN denote the token given.

  3. Open your browser and navigate to http://MACHINE_IP:8888/. If asked for a token, insert TOKEN.

  4. Explore the examples.

  5. Any changes made in the notebooks affect only the files inside the container. To retrieve them, either use the notebook interface to download them to your computer (File -> Download As -> Notebook), or 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.

  6. To terminate and clean up, run the following commands

    docker stop jupyterrun && docker rm jupyterrun
    

Common Problems

No space left on device error

This is usually caused by having pre-existing docker images in your pc. Since docker allocates a virtual hard disk for them, this disk may be full.

One solution is to run, in the docker terminal:

docker image prune

Which should reclaim some space.