Here is a tool that solves the following optimization problem. Given:
- A set of poeple and their teammate preferences
- A set of projects and the people's interest on each project
- A set of constraints: min / max number of people per project, couples that can't work together, minimum experience required for certain projects.... Find the group distribution and project assignments that maximizes overall welfare.
The two main blocks are an optimization engine built with ORTools, and a user interface to input the data and visualize results built with Streamlit.
The app is deployed on the Streamlit cloud service. Can be accessed on this URL: https://groups-and-projects.streamlit.app/
Project definition and min/max number of members: here we are asked to input the different projects and the min/max number of people that will work in project. Reset removes all the current projects.
Persons definition, experience, and gender: here we are asked to input all the people that will be assigned to projects. We are asked about the experience years (just a value that measures experience), and this is related to a constraint in the optimization engine that forces all groups to have a minimum of experience. We are also asked about the gender, and that's because there's a constrain that forces all groups to have diversity (not all males or all females).
Project preferences: Here we are asked to input, for each person, the project that they would like to work on (positive preferences) and projects wouln't like to work on (negative preferences). This has an impact on the objective function cost.
Personal preferences: Here we are asked to input, for each person, the persons that he/she would like to work with, and the persons he/she wouldn't. This has an impact on the objective function cost.
Optimization results: There's an option to predefine some poeple in groups (that is a hard constraint that the optimizer will respect). After clicking on Run (Fes els equips!), the optimization engine is called and the solution is displayed. There's a warning if the problem is infeasible (has no solution). The percentage of team contribution into the objective optimal cost is displayed on the Happiness score under each team.
If you want to contribute to the project or modify it for personal use, follow the next steps.
Clone the repository on a local environment. Install dependencies listed in requirements.txt.
Run the following Console commands:
cd group_and_projects_optimizer
(move to the base level of the repository)
streamlit run main.py
(deploy Streamlit app locally)
Data Transform: in charge of transforming the input provided by the user (tables) into the data model format required by the Optimizer (maps of constraint coefficients).
Optimizer: optimization engine that solves the optimization problem calling the ORTools cpmodel solver
Streamlit App: defines the UI using the Streamlit package dashboarding tools.