Planning Nature-based Solutions (Plans) is a modelling framework for planning the expansion of nature-based solutions in watersheds.
Plans was born within the scope of a master's degree research project, by 2018. While Plans1 was just a handful of python scripts, Plans2 has an application-like structure.
- The python files required to run Plans2;
- A directory called '
samples
' with examples of all input files; - A '
Plans2_handbook.pdf
' document.
Plans2 is built on top of:
Go to https://www.python.org/downloads/ and download it. Make sure you add Python to PATH (checkbox on the installation wizard).
To run Plans2 you need numpy
, pandas
, matplotlib
and scipy
. If you do not have it already installed, you can do that by using terminal or an IDE, like PyCharm.
On Windows terminal:
C:\Windows\System32\python -m pip install --upgrade pip
(this will update pip
)
then:
C:\Windows\System32\python -m pip install numpy
then:
C:\Windows\System32\python -m pip install pandas
then:
C:\Windows\System32\python -m pip install matplotlib
and then:
C:\Windows\System32\python -m pip install scipy
Download the ZIP file for the entire repository. Extract the files on any diretory of your machine.
Double-click on Run.py
and it will run the application.
Alternatively, you may create a python file on the same directory and write the following code:
from tui import main # this imports the main() function from module tui.py
main() # call the main() function
The frontend of Plans2 is handled by the tui.py
module. The interface is a simple terminal-based user interface that presents menus for the user.
The general backend tasks of Plans2 is handled by the plans2.py
module. It performs the silent routines of input, output and process execution.
This module holds the Dynammic Programming (DP) optimisation algorithm of Plans2. It also have the simulation costs models.
This module is responsible for projecting the observed datasets into the future.
This module holds all hydrolgy related models, incluing the model calibration routine.
This module holds all built-in functions for creating data visualisations.
This is a directory that works as a package of modules for very simple unit operations.
In the first time you run it, Plans2 automatically creates a directory in C:/Plans2
. This is the standard root directory for all Plans2 projetcs.
Projects are subdirectories inside the root folder, like C:/Plans2/myproject/
. Once a project is named by the user, Plans2 create the project strucutre, which includes:
- A directory for datasets in
C:/Plans2/myproject/datasets/
- A directory for storing execution files in
C:/Plans2/myproject/runbin
Datasets are divided in ./datasets/observed
and ./datasets/projected
.
./datasets/observed
stores all data files for the "present" time of the water system being modelled.
text
text
text