-
-
Notifications
You must be signed in to change notification settings - Fork 377
GSoC 2022 Implementing hawick_circuits algorithm from Boost Graph Library to pgRouting
- Proposal
- Participants
- Timeline
- Log of Pull Requests
- Slides
- Final Report
- Weekly Reports
- References
The project aims at implementing Boost Graph Library Algorithm Hawick_circuits in pgRouting. Hawick circuit is an algorithm used for searching circuits in a graph. It can be used to enumerate all the circuits in a directed multigraph. Specifically, it can also enumerate self-loops and redundant circuits caused by parallel edges which is not detected by other available algorithm for circuits.It enumerates the circuits in linear order of vertex.This algorithm is an extension of johnson’s algorithm for circuits and presents a memory efficient and high-performance implementation.
Currently, there is no algorithm implemented in pgRouting for searching or enumerating circuits in pgRouting. Detecting and enumerating circuits in graphs is of fundamental importance for analyzing graphs.
-
Hawick_circuit function can help solve various real-world problems. Circuits occur as a natural data-mining pattern in several real-world applications. They appear naturally in food webs, where circuits highlight cyclic dependencies, often revealing the fragile parts of an ecosystem. In financial transaction data, a circuit could be an indication of a money-laundering scheme. In biological and complex networks, a circuit is an indication of a feedback mechanism. Despite the wide range of use cases, circuits, although not extensively studied, is thus a problem of considerable importance.
-
So, depending on different domains, suitable interesting properties can be extracted from the circuits. For Example: For a Road network domain the connectivity of nodes in the graph is an important feature that can be extracted using vertex contribution to the circuit. Similarly for a Delivery agency knowing all the circuits can help them manage their resources more efficiently. They can select a good warehouse location on knowing how much that location contributes to the overall network of circuits.
-
Different functionality using hawick_circuit and hawick_circuit_unique function such as counting the total no. of circuits, vertex popularity in circuits, or vertex contribution to the connectivity of the graph , length of the available longest circuit, distribution of circuits length,maximum mean weight cycle, etc can be implemented.
-
These properties are important for analyzing various networks. If you want to know more about how these properties are useful. Please refer to the publication Node Importance Ranking and Scaling Properties of some Complex Road Networks. This publication consists of the analysis of trunk road networks for Scotland and the North and South New Zealand islands.
-
There are various other applications such as social graphs, workflow tasks, Kauffman networks, trade networks etc where circuits represent important properties.
-
Also implementing Boost::hawick_circuits in pgRouting will add more functionality to pgRouting. It will help future users and developers to use it and integrate it with other pgRouting algorithms.
The deliverables for the proposal would be:
- Implementation of Boost::hawick_circuits , Boost::hawick_unique_circuits function
- SQL Queries to run the implemented function with self-documentation
- Users' Documentation of the function
- pgTap test cases
- Wiki page of the function
Detailed Proposal in PDF format
| Title | GitHub Handle | Name |
|---|---|---|
| 1st Mentor | @Veenits123 | Veenit Kumar |
| 2nd Mentor | @dkastl | Daniel Kastl |
| Student Developer | @nitishchauhan0022 | Nitish Chauhan |
- Setting up the Development Environment
- Implementing dummy functions for better understanding.
- Introduce myself to the community and active involvement in healthy discussions
- Learning pgTap, BGL, and understanding the standard process in developing pgRouting.
- Wiki page for tracking the progress of the project.
- Basic Skeleton for documentation and tests
- Code skeleton Of SQL, C, and C++ code
- Design
pgr_hawick_circuit( )function - Design
pgr_hawick_circuit_unique( )function - Necessary class wrappers for the Boost function
- Reading data from user
- SQL query
- Pipeline to process data from SQL query to C function
- C driver to use the c++ boost function
- Implementing
pgr_hawick_circuit()&pgr_hawick_unique_circuit() - Helper Functions
- Finalizing the proposed function to get the solution
- Preparing the First coding report
- Work on the feedback as provided from the First Evaluation
- Bug fixing
- Preparing second coding period Synopsis
- Internal tests for pgr_hawick_circuits and pgr_hawick_unique_circuits
- No server crash test
- pgTap Unit tests.
- Developer and User’s Documentation
- Suitable Query using sample data on pgRouting documentation.
- Fixing remaining bugs, tests and documentation details
- Wiki page
- Preparing for Final Delivery
- Integrating to develop branch in the main repository
- Preparation of the final report
To be added.
To be added.
To be added.
To be added.
- Request writing access to the OSGeo wiki, for editing all info related to my project.
- Set up the development environment.
- Interact with mentors, introduce myself to the community, and actively get involved in the discussion.
- Set up a wiki page to keep track of weekly progress.
- Add a wiki link to OSGeo's accepted student's wiki page.
- Studied GSoC students guide and the OSGeo recommendations for students.
- Introduce myself and my project on OSGeo's SOC and pgrouting-dev mailing list.
- Get familiar with pgRouting’s development style. Understand expected coding, documentation, and testing standards set by pgRouting.
- Develop a better understanding of PostgreSQL, PostGIS, Pl/pgSQL, and how they interact with pgRouting.
- Learn to create unit tests using pgTAP.
- Created a public repository
GSoC-pgRoutingwhere all my works are reflected in the GSoC period. - Learned how and where to create Pull Request, merge and how to commit, etc.
- Created a new branch named [
to be made] in the GSoC-pgRouting repository, where I will be merging all the Pull Requests.
To be added.
- Task 1: Intent of application
- Task 2: Experience with GitHub & Git
- Task 3: Build locally pgRouting
- Task 4: Get familiar with C++
- Task 5: Get familiar with pgRouting
- https://www.boost.org/doc/libs/1_78_0/libs/graph/doc/hawick_circuits.html
- https://www.boost.org/doc/libs/1_61_0/boost/graph/hawick_circuits.hpp
- https://www.researchgate.net/publication/221440635_Enumerating_Circuits_and_Loops_in_Graphs_with_Self-Arcs_and_Multiple-Arcs
- DOI:10.1137/0204007 Finding All the Elementary Circuits of a Directed Graph - Donald B. Johnson
- https://www.baeldung.com/cs/path-vs-cycle-vs-circuit
- Enumeration of the Elementary Circuits of a Directed Graph (cornell.edu)
- Node importance ranking and scaling properties of some complex road networks
- DOI:10.1145/362814.362819 An efficient search algorithm to find the elementary circuits of a graph
- https://docs.pgrouting.org/2.4/en/sampledata.html
- https://github.com/pgRouting/pgrouting