I have an assignment problem where I have
M projects to be completed in
N time periods. Each project has it's own team requirement and each time period can only accommodate a maximum number of teams. The projects also have precedence constraints. I have pasted some sample data below:
Project Data:
| Project |
Priority |
Teams Needed |
| A001 |
1 |
4 |
| A002 |
1 |
2 |
| A003 |
2 |
2 |
| A004 |
2 |
3 |
Time Period Data:
| Time Period |
Teams Allowed |
| PI01 |
3 |
| PI02 |
4 |
| PI03 |
6 |
Here are my constraints that need to be satisfied:
1) All the projects should be completed - The required number of teams should be assigned to the projects across the 3 time periods
2) The 3 time periods cannot have more teams than their respective
Teams Allowed3) Projects with priority 1 should start before projects with priority 2
How do I model this in docplex.cp in Python? I have thought about using interval variables, but how do I code the constraint where each time period can only the maximum number of teams allowed in that time period? A skeleton code snippet in Python would be amazing. Thanks in advance!
------------------------------
Keerthivasan C
------------------------------
#DecisionOptimization