I'm new to CPlex Python. Actually I am modeling a scheduling problem where I have to select only activities or tasks (has specific points in terms of efforts requires) from a large list for different Time Intervals and that should sum up to the given capacity. So I am using Step_at (name it capacity) function and stepping up it according to the Given capacity first. For resource usage I use another step_at_start (name it workUsage) cumul function and stepping it when the interval variable start in the solution. And I substract step_at_start (workUsage) from step_at (capacity) function. i.e. capacity -= workUsage.
For exaplme,
- I have a list of tasks t = [t1, t2, ..., tn]
- Each Task has Points, p = [p1,p2,...,pn]
- There are 2 different time intervals as Spints (of 2 weeks), NB_Sprints = 2
- Given Capacity for 2 sprints, c1 = 20, c2 = 50
Goal: To select tasks from list where sum of points p is equal to the Given Capacity C1(=20) for first 2 weeks & C2(=50) for another 2 points
Constrain: Can't repeat tasks (or work) in the solution
Mu current problem is Step_at function adds on remaining capacity from first sprint1 to sprint2. For Example, If Model only selected tasks whose total is 15 out of 20 (Given Capacity), then remaining 5 points will add up to next Sprint. So in Sprint2, I will have Given Capacity = 5+50. Which I don't want as Given Capacity should not change.
So here How can I make step_at function to be at 0 after first Time Interval (Let's say after first week) or any other work-around? I using Cplex Python API in my jupyter notebook. Any suggestion would be appreciated.