This optimization model leverages operations research techniques to identify the most suitable scheduling arrangement between developers and managers for reviewing their products within available timeslots. By systematically evaluating constraints and preferences, this approach ensures an efficient and balanced schedule, optimizing both time utilization and collaboration.
- Python 3.8 or higher
- openpyxl 3.1
- pyomo 6.8
-
Set Up Virtual Environment in CONDA
It is recommended to execute installation using
conda
due topyomo
module. Go to your anaconda prompt and set up your virtual environment.# Create conda virtual environment conda create --name <env-name> python=<3.9 or higher> conda activate <env-name> # Change directory to or-projects cd path/to/or-projects
-
Install Dependencies
# Install required dependencies pip install -r requirements.txt # Install open-source optimization solver if you do not have any conda install -c conda-forge ipopt glpk
-
Adjust Input Data
-
Modify
input.xlsx
Data:Open
src/data/input.xlsx
and make the following adjustments:-
Sheet "Ownership Products": This sheet defines the ownership relationships between managers and products.
- Each column header represents a manager.
- Each row header represents a product.
- Fill in the matrix to indicate which managers are responsible for which products.
-
Sheet "Work Relation": This sheet represents collaboration between managers and developers.
- Columns represent managers.
- Rows represent developers.
- Fill in the matrix cells to indicate whether a manager and a developer work together.
-
-
Modify
availability.xlsx
Data:Open
src/data/availability.xlsx
and adjust the schedules with the following guidelines:- Sheet Name: Set each sheet name to the date for which the schedule needs to be assigned.
- Table Y-Axis: List timestamps representing the times for scheduled assignments.
- Header Row: Include the names of the developers and managers whose schedules need to be aligned.
-
-
Run the Program
Execute the following command to run the program:
python src/main.py
-
$p \in P$ : set of products to be reviewed -
$d \in D$ : set of product developers to review the products -
$m \in M$ : set of product managers to review the products -
$t \in T$ : set of time slots for product review to occur
-
$O_{p}^{m} \in {0,1}$ : Binary matrix representing the ownership of product$p$ to the product manager$m$ . If$O_{p}^{m} = 1$ , product$p$ is owned by product manager$m$ , otheriwse$O_{p}^{m} = 0$ . -
$B^{d,m} \in {0,1}$ : Binary matrix reflecting whether product developer$d$ belongs to the same team of product manager$m$ $(B^{d,m} = 1)$ or not$(B^{d,m} = 0)$ . -
$A^i_t \in {0,1}$ : Binary matrix indicating whether developer or manager$(i\in {D \cup P})$ schedule in period$t$ is blocked$(A^i_t=1)$ or not$(A^i_t=0)$ .
-
$y_{p,t} \in {0,1}$ : Binary variable to represent whether product$p$ has been reviewed in timeslot$t$ $(y_{p,t} = 1)$ or not$(y_{p,t} = 0)$ . -
$x_{p,t}^{d,m} \in {0,1}$ : Binary variable to represent whether product$p$ is going to be reviewed by product developer$d$ and manager$m$ in the given timeslot$t$ $(x_{p,t}^{d,m} = 1)$
Maximizing number of products
- Products
$p$ can only be reviewed maximum once within the available timeslots.
- Product manager
$m$ can only review the product belonging to him/her.
- Product manager
$m$ can only review the product together with the developer belonging to the same team.
- Linking constraint between
$x_{p,t}^{d,m}$ and$y_{p,t}$ .
- Each product developer
$d$ can only review one product at a timeslot$t$ .
- Each product manager
$m$ can only review one product at a timeslot$t$ .
- When a manager
$m$ or developer$d$ is scheduled to review a product$p$ at time$t$ , then they should not be blocked in their schedule at that period.
- Non-negativity constraints for the variables.