As part of the first project of Algorithm Design, the goal was to develop a tool to aid in making informed decisions regarding the management of a water supply network. The tool provides insights on the amount of water that can be supplied to each city, identifies sensitive sections of the network that are prone to failures, and more.
This project was carried out by students from group 163:
- Maria Rabelo (up202000130@up.pt)
- Guilherme Matos (up202208755@up.pt)
- João Ferreira (up202208393@up.pt)
The project was developed in C++ and uses the CMake tool to compile the source code and this documentation.
This program takes as input a path to a directory containing 4 csv files with the following names:
Cities.csvPipes.csvReservoir.csvStations.csv
Make sure that the csv files are in the correct format and that the directory path is correct before executing.
Note: The csv files can have different names, for example:
Reservoir.csvcan be namedReservoirs_Madeira.csv. Despite this, it is recommended to keep the original names.
- Make sure that the C / C++ dependencies are installed on your system.
- Execute the script
run.sh(located in the directory of the project) in the terminal, giving the path to the directory containing the csv files as an argument.
For example:./run.sh dataset/LargeDataSet
Warning: Make sure the script has the correct permissions to be executed and the package
rlwrapis installed. Note: Feel free to change the script to suit your needs.
cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
make -j$(nproc)
./DA2324_PRJ1_G163 dataset/LargeDataSet
Warning: Don't forget to check the location and name of the csv files.
The commands above assume that the csv files are inside thedataset/LargeDataSetfolder.
- Open the project folder in CLion.
- Create a CMake profile with the build type set to
Release. - Select the configuration
SmallDataSetorLargeDataSetalready created.
or
Create a new configuration with the correct program arguments and working directory.
For example:- Program arguments:
dataset/LargeDataSet - Working directory:
$ProjectFileDir$
- Program arguments:
- Run the configuration.
- Certain commands may require extended execution time in
Debugbuild mode. Ensure the build mode is set toReleaseprior to running the program. - The integrated terminal in CLion may exhibit different behavior compared to the system terminal. It is recommended to use the system terminal for running the program when feasible.