Mentions légales du service

Skip to content
Snippets Groups Projects
Commit dae09895 authored by BAUCHER Achille's avatar BAUCHER Achille
Browse files

Tried to merge package

parents f49a59ec 093c9a87
Branches
Tags
No related merge requests found
# Pydynamo # Pydynamo
Pydynamo is a module to define, run and analyse system dynamics. Pydynamo is a module to define, run and analyse system dynamics. I first present how to use the practical session we designed to play with the module, and then brief comments and references in english at the end.
# TPworld3
Un TP pour jouer avec le modèle World3 et découvrir tout un tas de concepts, qui peuvent servir pour comprendre les dynamiques de la croissance dans un monde fini. Voir dans le fichier [details_TP](details_TP.md) pour plus d'informations !
## Installation
### Avec le jupyterhub de l'UGA si vous avez un compte UGA
1. Télécharger le TP à l'adresse suivante: https://gitlab.inria.fr/abaucher/pydynamo/-/blob/TPworld3/TP.ipynb (cliquer sur download tout à droite)
2. Se connecter à <https://jupyterhub.univ-grenoble-alpes.fr> avec ses identifiants UGA
3. Cliquer sur `upload` en haut à droite et sélectionner le TP téléchargé
4. Aller dans le menu `Nbextentions` en haut. À l'aide de la barre de recherche, activer les deux extentions suivantes:
- Tapper _exercise2_ pour cocher la case `Exercise2`
- Tapper _latex_ pour cocher la case `(some) LaTeX environments for Jupyter`
5. Retourner dans le menu `files`, et double-cliquer sur le TP.ipynb pour commencer !
### Autrement, en local sous Linux
- Il faut avoir Python3
- Le module a été testé sous Ubuntu 20
#### Créer un environnement virtuel
- Il est préférable d'utiliser un environnement virtuel, qui assure les bonnes versions des librairies.
- Pour installer et créer un nouvel environnement virtuel sous le nom de *dnovenv*:
```
sudo apt install python3.8-venv
python3.8 -m venv dnovenv
```
Pour l'activer, il faut être dans le dossier qui contient le dossier `dnovenv` et tapper:
```
source dnovenv/bin/activate
```
et on peut le désactiver avec `deactivate`.
#### Installer le TP
- Ouvrir un terminal, puis:
- installer la version de test de pydynamo
- installer en plus ipykernel et jupyter et le manager d'extensions
- installer et ajouter les extensions
- avec les commandes suivantes:
```
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pydynamo-abaucher
python3 -m pip install ipykernel jupyter jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable exercise2/main
jupyter nbextension enable latex_envs/latex_envs
```
## Jouer
Dans le notebook TP.ipynb, des textes et morceaux de codes montrent l'idée et le fonctionnement de pydynamo et du modèle World3. On peut faire différentes expériences de simulation en changeant des paramètres, et étudier certains phénomènes.
## Documentation
Tout est dans: <https://abaucher.gitlabpages.inria.fr/pydynamo/>.
***
# Comments in english
It was originally created to run the World3 model [2], written in DYNAMO language [1]. Included in the module are functions to convert DYNAMO code to pydynamo syntax. All scenarios of *Limits to Growth*, updated with 2003 version, are shown in [LimitsToGrowth03](./examples/LimitsToGrowth03.ipynb). For a quick tuto of how to use World3 in pydynamo, see [World3](./examples/World3.ipynb). For a quick tuto on how to use pydynamo, see [BTmodel](./examples/BTmodel.ipynb). It was originally created to run the World3 model [2], written in DYNAMO language [1]. Included in the module are functions to convert DYNAMO code to pydynamo syntax. All scenarios of *Limits to Growth*, updated with 2003 version, are shown in [LimitsToGrowth03](./examples/LimitsToGrowth03.ipynb). For a quick tuto of how to use World3 in pydynamo, see [World3](./examples/World3.ipynb). For a quick tuto on how to use pydynamo, see [BTmodel](./examples/BTmodel.ipynb).
Documentation about the World models is in <https://abaucher.gitlabpages.inria.fr/pydynamo/>. Documentation about the World models is in <https://abaucher.gitlabpages.inria.fr/pydynamo/>.
## Installation
- clone this repository and got to folder
- python -m pip install -r requirements.txt
- you can import pydynamo
## Note ## Note
_This is a beta version and all documentation and commands may not be complete or updated_ _This is a beta version and all documentation and commands may not be complete or updated_
...@@ -14,9 +74,10 @@ _This is a beta version and all documentation and commands may not be complete o ...@@ -14,9 +74,10 @@ _This is a beta version and all documentation and commands may not be complete o
- Run, change parameters, re-run, plot - Run, change parameters, re-run, plot
## Author ## Author
Achille BAUCHER for my internship at the LIG-lab. I used some functions from pyworld3 [3], and nice explanations by it's author Charles Vanwynsberghe. I got the 2003 updates from one of the authors, Jørgen Randers. Achille BAUCHER for my internship at the LIG-lab. I used some functions from pyworld3 [3], and nice explanations by it's author Charles Vanwynsberghe.
## References ## References
- [1] How DYNAMO works: <https://archive.org/details/dynamousersmanua0000pugh/> - [1] How DYNAMO works: <https://archive.org/details/dynamousersmanua0000pugh/>
- Some additional explanations about DYNAMO language are in [dynamo_doc](./dynamo_doc.md)
- [2] Book describing the world3 model: <https://archive.org/details/dynamicsofgrowth0000unse/> - [2] Book describing the world3 model: <https://archive.org/details/dynamicsofgrowth0000unse/>
- [3] Pyworld3: <https://github.com/cvanwynsberghe/pyworld3> - [3] Pyworld3: <https://github.com/cvanwynsberghe/pyworld3>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment