A C++ implementation of an analysis tool for water supply networks. The program models a water distribution network(reservoirs, pumping stations, cities, and pipes) as a directed graph and provides algorithms to compute maximum flow, find cities with flow deficits, and simulate network failures presenting the outcomes in a user-friendly manner.
This project was developed as the Programming Project I assignment for the Algorithm Design course at FEUP.
The WaterSupplyManager project is designed to analyze and manage water supply networks using graph theory and flow algorithms. The main functionalities include:
- Compute the maximum amount of water that can reach each city. Results can be shown on screen and written to a file.
- Verify whether the current configuration satisfies all city demands and list cities with flow deficits.
- Simulate a water reservoir being taken out of service and report affected cities.
- Simulate a pumping station being taken out of service and report affected cities.
- Simulate a pipe being taken out of service and report affected cities.
The project is structured as follows:
.
├── build/ # Compiled binaries (created after building)
├── data/ # Input datasets for testing
├── docs/
│ ├── LargeDataSetMap.pdf # Map of the large dataset
│ ├── ProjectDescription.pdf # Project description
│ └── SmallDataSetMap.pdf # Map of the small dataset
├── src/
│ ├── City.cpp
│ ├── City.h
│ ├── MaxFlow.cpp # Max Flow algorithm implementation
│ ├── Menu.cpp # Menu implementation
│ ├── Menu.h
│ ├── Network.cpp # Graph/Network implementation
│ ├── Network.h
│ ├── Node.cpp
│ ├── Node.h
│ ├── Parsing.cpp # Input parsing implementation
│ ├── Pipe.cpp
│ ├── Pipe.h
│ ├── Reservoir.cpp
│ ├── Reservoir.h
│ ├── Station.cpp
│ └── Station.h
├── .gitignore
├── LICENSE # Project license (MIT)
├── main.cpp # Entry point for the application
├── Makefile # Build instructions
├── README.md # Project overview and usage guide
└── WaterSupplyManager # Compiled executable (after building)
To run the WaterSupplyManager project, follow these steps:
- Prerequisites:
Ensure you have a C++ compiler (like g++) and make installed on your system.
- Clone the Repository:
git clone https://github.com/AFNeves/WaterSupplyManager.git- Navigate to the Project Directory:
cd WaterSupplyManager- Build and Run the Project:
make run- (Optional) Clean Build Files:
make cleanAll project documentation and dataset maps are available in the docs/ directory:
ProjectDescription.pdf— detailed project requirements, modeling decisions, and algorithm descriptions.ProjectPresentation.pdf— slide deck summarizing the project and results.SmallDataSetMap.pdf/LargeDataSetMap.pdf— visual maps of the example datasets.
Doxygen API reference has already been generated under docs/doxygen/index.html. Open that file in your browser to explore the full API documentation (classes, public methods, data members, call graphs and cross‑references).
- Afonso Neves (up202108884@up.pt)
- Lara Cunha (up202108876@up.pt)
This project is licensed under the terms of the MIT License.