Decision Optimization

 View Only
Expand all | Collapse all

How to model scheduling problem to pick stories (or tasks) from a large list whose story points sum up to given Team capacity using Cplex Python?

  • 1.  How to model scheduling problem to pick stories (or tasks) from a large list whose story points sum up to given Team capacity using Cplex Python?

    Posted Wed August 10, 2022 12:58 PM

    Hello Cplex developers, 

    I am a student and stuck on modelling problem with Docplex/Python. My model is based on house building scheduling tutorial but here it's PI Planning of stories in agile environment. There are 2 Sprints (Sprint is of 2 weeks) in one PI. So basically in my problem, There is a large list of stories (or tasks) having Story Point (here points are kind of hours it takes to  complete it), Team (for which team it belongs to). Stories also have dependencies, parallels constrains and given Team Capacity (It's Team wise and for each Sprints). So objective here is to choose only stories whose total is equal to the Given Team Capacity.

     

    I got the dependent stories (using end_before_start) and Parallels using my Model. But only thing I'm stuck into is Team Capacity since I'm making dependent stories as not optional but other standalone as optional, and need to take stories which are <= Team Capacity in that time Interval.

     

    To check for Team Capacity constrain for different Time Intervals, I am taking sum of step_at Function as cumul function (sCapacity). And then substracting the cumul Function (sCapacity) from sum of step_at_start fun (for all stories). I'm also adding constrain to become cumul function to be 0 in order to fill up the Team Capacity. But the problem here is Model not picking up the optional stories.

     

    So can you please suggest me any idea for maximizing the executed stories for each sprint (2 weeks Time interval) which would be same or less the Given Team Capacity. 

     

    I have attached my model and I would really appreciate help from Cplex experts. Thank you in advance!



    ------------------------------
    Jay
    ------------------------------

    #DecisionOptimization


  • 2.  RE: How to model scheduling problem to pick stories (or tasks) from a large list whose story points sum up to given Team capacity using Cplex Python?

    Posted Wed August 17, 2022 04:00 AM

    Hello Jay,

    Unfortunately, I cannot run your notebook as you did not include your data files, but from your description it sounds like you could be over-constraining the problem by insisting that all free capacity is used on the teams.  Depending on different factors, this may not be possible at all.  So, I would advise you to relax that constraint to a ensure *only that capacity is not exceeded*, and then use the objective function to get your model to approach the kind of solution that you would ideally like.

    From what you say, it seems like you want to maximize the (weighted) sum of the presenceOf statuses of the optional interval variables.  Maybe you want them done earlier too, so you could add a term which tries to reduce the start (or end) time of these present intervals.

    Regards,

    Paul



    ------------------------------
    Paul Shaw
    ------------------------------