-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Addition of Social Aware Assignment Algorithm to NetworkX Library (Coalition Formation in Multi-agent Systems) #6364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
.../algorithms/approximation/tests/test_social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
.../algorithms/approximation/tests/test_social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
.../algorithms/approximation/tests/test_social_aware_assignment_of_passengers_in_ridesharing.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the name social_aware_assignment_of_passengers_in_ridesharing to coalition_formation as described in the article, performed all the changes as requested and added tests with random graphs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment fix
networkx/algorithms/approximation/tests/test_coalition_formation.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/tests/test_coalition_formation.py
Outdated
Show resolved
Hide resolved
networkx/algorithms/approximation/tests/test_coalition_formation.py
Outdated
Show resolved
Hide resolved
…nity_formation.py (requirement for networkx#6364)
Hi @dschult, I have made the changes you requested. Could you please review and let me know if it's possible to merge this pull request? |
Dear NetworkX 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". Link to Article.
The social aware assignment problem belongs to the field of coalition formation, which is an important research branch within multiagent systems. It analyzes 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 graphG = (V, E)
where(v_i, v_j) ∈ E
ifv_i
andv_j
are connected. The goal is to find an assignmentP
, which is a partition of the setV
, such that∀S ∈ P, |S|≤ k
, and the value ofP
,V_P = |{(v_i, v_j) ∈ E: ∃S ∈ P where v_i ∈ S and v_j ∈ S}|
is maximized.Implementation Details:
networkx/algorithms/approximation/coalition_formation.py
.networkx/algorithms/approximation/tests/test_coalition_formation.py
.The algorithm has been implemented in such a way that it can be easily integrated into the existing NetworkX library. It has completed all the tests, including both the tests I wrote and the existing library tests.
I would be happy to answer any questions or provide additional information about the implementation. Thank you for considering my pull request.
Best regards,
VictoKu1