Addition of Coalition Formation in Multi-agent Systems implementation, which is specifically a Social Aware Assignment Algorithm to NetworkY Library #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear NetworkY team,
I am writing to submit a pull request to add the "Social Aware Assignment of Passengers in Ridesharing" algorithm to the NetworkX library. The algorithm is based on the article "Levinger, C., Hazon, N., & Azaria, A. (2022). Social Aware Assignment of Passengers in Ridesharing". https://github.com/VictoKu1/ResearchAlgorithmsCourse1/raw/main/Article/2022%2C%20Chaya%20Amos%20Noam%2C%20Socially%20aware%20assignment%20of%20passengers%20in%20ride%20sharing.pdf.
The following Pull request is parallel to #6364 in the NetworkX library (networkx/networkx#6364).
The social aware assignment problem belongs to the field of coalition formation, which is an important research branch
within multiagent systems. It analyses the outcome that results when a set of agents is partitioned into coalitions.
Social aware assignment definition:
Given a number k and an undirected friendship graph G = (V, E) where (v_i , v_j) ∈ E if v_i and v_j are connected.
The goal is to find an assignment P, which is a partition of the set V , such that ∀S ∈ P, |S|≤ k, and the value of P,
V_P = |{(v_i , v_j) ∈ E: ∃S ∈ P where v_i ∈ S and v_j ∈ S}| is maximized.
I have implemented the algorithm in the file "networky/networky/algorithms/approximation/coalition_formation.py" and included test cases in the file "networky/networky/algorithms/approximation/tests/test_coalition_formation.py" to ensure its correctness. The algorithm has been implemented in such a way that it can be easily integrated into the existing NetworkY library.
Actually, Match_And_Merge model is a special case of simple Additively Separable Hedonic Games (ASHGs).
It has completed all the tests, those which I wrote as well as all the included library tests.
I have also included an online flask web page that allows users to run the algorithm using a web interface. The URL for the website is provided in the comments of the code: https://victoku1.pythonanywhere.com/ .
I would be happy to answer any questions or provide additional information about the implementation. Thank you for considering my pull request.
VictoKu1.