https://github.com/ptrvsrg/dream-team-optimizer
Dream Team Optimizer is an algorithm for forming development teams based on their preferences, in order to maximize harmony and satisfaction of participants
https://github.com/ptrvsrg/dream-team-optimizer
asp-net consul csharp dotnet ef-core event-driven masstransit microservice moq postgres rabbitmq xunit
Last synced: 7 months ago
JSON representation
Dream Team Optimizer is an algorithm for forming development teams based on their preferences, in order to maximize harmony and satisfaction of participants
- Host: GitHub
- URL: https://github.com/ptrvsrg/dream-team-optimizer
- Owner: ptrvsrg
- License: apache-2.0
- Created: 2024-09-03T10:01:47.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-23T06:24:19.000Z (over 1 year ago)
- Last Synced: 2025-09-11T12:55:27.175Z (7 months ago)
- Topics: asp-net, consul, csharp, dotnet, ef-core, event-driven, masstransit, microservice, moq, postgres, rabbitmq, xunit
- Language: C#
- Homepage:
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Dream Team Optimizer
The algorithm for forming development teams based on their preferences, in order to maximize harmony and satisfaction of participants.
Description
**The Dream Team Optimizer** project is designed to optimally form development teams based on their preferences gathered
during the hackathon. Each developer (Juniors or TeamLeads) makes a list of desirable colleagues with whom he would like
to work in a team. Based on this data, the project calculates the satisfaction index for each participant, and then
calculates the harmony of the team distribution. The main goal of the project is to maximize the harmony of team
formation in order to ensure the greatest satisfaction of the participants. This tool can be useful for HR professionals
to optimize the process of creating dream teams.
Strategies
Gale–Shapley algorithm
The strategy is based on the [Gale-Shapley algorithm](https://en.wikipedia.org/wiki/Gale%E2%80%93Shapley_algorithm)
(also known as the deferred acceptance algorithm, the offer and rejection algorithm, or the Boston Pool algorithm). This
algorithm solves the problem of stable matching, which consists in pairing an equal number of participants of two types
using the preferences of each participant.
Strategy based on bipartite graph
In order to form teams, a complete weighted bipartite graph is built, such that there are juniors in one share, team
leaders in the other, and the edges have a weight equal to the sum of the vertex satisfaction indices. Next, the edges
are sorted by weight and teams are formed sequentially from the edge with the highest weight (after creating the team,
the corresponding vertices and edges are removed from the rating)
Weighted preference strategy
It is a modification of Gale–Shapley algorithm. By introducing weights into preferences, it is possible to balance on
changing priorities in order to fairly take into account the interests of both sides. For example, if one side prefers
instinctively, its preferences may carry more weight.
Comparison
Machine parameters
+ **CPU:** AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
+ **RAM:** DDR4 8GB 3200 MHz * 2
Strategy
CPU, %
RAM, %
Time, s
Harmonicity
Gale–Shapley algorithm
209.667
0.367
91
13.907
Weighted preference strategy
317
0.367
120
14.157
Strategy based on bipartite graph
369.583
0.375
129
14.159
Technologies
+ .NET SDK 8.0
Architecture WEB application

Getting started
Prerequisites
- Git
- .NET SDK
- Docker
- Docker Compose
Installation
```shell
git clone https://github.com/ptrvsrg/dream-team-optimizer
```
Launch console application
Conduct hackathon:
```bash
make build.console
HACKATHON_CONFIG_PATH=./src/DreamTeamOptimizer.ConsoleApp/appsettings.json \
dotnet ./out/DreamTeamOptimizer.ConsoleApp.dll conduct
```
Print statistic after hackathon by ID:
```bash
make build.console
HACKATHON_CONFIG_PATH=./src/DreamTeamOptimizer.ConsoleApp/appsettings.json \
dotnet ./out/DreamTeamOptimizer.ConsoleApp.dll stat
```
Print average harmonicity:
```bash
make build.console
HACKATHON_CONFIG_PATH=./src/DreamTeamOptimizer.ConsoleApp/appsettings.json \
dotnet ./out/DreamTeamOptimizer.ConsoleApp.dll average-harmonic
```
Launch WEB application
1) Build applications
```bash
make build.ms-employee
make build.ms-hr-director
make build.ms-hr-manager
```
2) Run applications
```bash
docker compose up -d
```
After finishing execution, you can see the running containers:
+ PostgreSQL - for store data
+ Consul - for service discovery
+ Nginx - for reverse proxy
+ Microservices:
+ ms-employee-1 - WEB application for junior with ID 1
+ ms-employee-21 - WEB application for team lead with ID 21
+ ms-hr-director - WEB application for HR director
+ ms-hr-manager - WEB application for HR manager
3) Conduct hackathon:
```bash
curl -X 'POST' \
'http://localhost:20080/api/v1/hackathons' \
-H 'accept: application/json' \
-d ''
```
4) Get hackathon by ID:
```bash
HACKATHON_ID=1
curl -X 'GET' \
"http://localhost:20080/api/v1/hackathons/${HACKATHON_ID}" \
-H 'accept: application/json'
```
5) Get average harmonicity:
```bash
curl -X 'GET' \
'http://localhost:20080/api/v1/hackathons/average-harmonic' \
-H 'accept: application/json'
```
Contribute
See in the [CONTRIBUTING.md](CONTRIBUTING.md)
Code of conduct
See in the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
License
Distributed under the Apache License 2.0 License.
See [Apache License 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) for more information.