The following repository reflects the work done by the authors, in order to solve the homeworks assigned during the Network Dynamics course at Politecnico di Torino.
To cloning the repo throgh HTTPS or SSH, you must have installed Git on your operating system.
Then you can open a new terminal and type the following command (this is the cloning throgh HTTPS):
git clone https://github.com/fracapuano/NetworkDynamics.git
If you don't have installet Git, you can simply download the repository by pressing "Download ZIP".
Once the repo is cloned, some python libraries are required to properly setup your (virtual) enviroment.
They can be installed via pip:
pip install -r requirements.txt
or via conda:
conda create --name <env_name> --file requirements.txt
The requirements.txt
includes mandatory libraries to run properly the env.
In each homework directory, there are:
- several
.py
files, corresponding to the exercises requested in the requirements utils
folder contains supporting files
The main.py
is the entry point of the execution.
To see the help, please execute the command python main.py -h
. This is how to use the program:
usage: main.py [-h] -o HOMEWORK -e EXERCISE
options:
-h, --help show this help message and exit
-o HOMEWORK, --homework HOMEWORK
Homework number
-e EXERCISE, --exercise EXERCISE
Exercise number
Two parameters are mandatory:
-o --homerwork
the number of homework you want to execute-e --exercise
the number of exercise inside the homework you want to execute
Then, you can run the program in this way:
python main.py --homework number_of_homework --exercise number_of_exercise
Our code for Exercise 1 in Homework 3 is presented in this notebook.
Author | Student Id | GitHub |
---|---|---|
Lorenzo Bergadano | s304415 | lolloberga |
Francesco Capuano | s295366 | fracapuano |
Matteo Matteotti | s294552 | mttmtt31 |
Enrico Porcelli | s296649 | enricoporcelli |
Paolo Rizzo | s301961 | polrizzo |