Skip to content

Latest commit

 

History

History
108 lines (77 loc) · 4.19 KB

File metadata and controls

108 lines (77 loc) · 4.19 KB

WaterSupplyManager

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.

📘 Overview

The WaterSupplyManager project is designed to analyze and manage water supply networks using graph theory and flow algorithms. The main functionalities include:

Basic Service Metrics

  • 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.

Reliability and Sensitivity to Failures

  • 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.

📁 Project Structure

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)

🚀 Running the Project

To run the WaterSupplyManager project, follow these steps:

  1. Prerequisites:

Ensure you have a C++ compiler (like g++) and make installed on your system.

  1. Clone the Repository:
git clone https://github.com/AFNeves/WaterSupplyManager.git
  1. Navigate to the Project Directory:
cd WaterSupplyManager
  1. Build and Run the Project:
make run
  1. (Optional) Clean Build Files:
make clean

📄 Documentation

All project documentation and dataset maps are available in the docs/ directory:

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).

👥 Author

📎 License

This project is licensed under the terms of the MIT License.