Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Scheduling problem with time-dependent resource requirement

    Posted 04/24/17 11:45 PM

    Originally posted by: Jaymi_Liu


    I was trying to model a scheduling problem. The resource usage for tasks varies with time. For example, Task A lasts for 10 days. It requires one labor for the first two days, five labors for the following five days, and three labors for the remaining days (3 days).  How to model this using OPL?

    I know I can use pulse(interval, quantity) to model the fixed resource usage, but have no idea for the time-dependent resource usage. 

    Thanks!


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Scheduling problem with time-dependent resource requirement

    Posted 04/25/17 01:58 AM

    Hi,

    you could use pulse on sub intervals.

    using CP;

    dvar interval A size 10;

    dvar interval A1 size 2;
    dvar interval A2 size 5;
    dvar interval A3 size 3;

    subject to
    {
    startAtStart(A,A1);
    endAtEnd(A,A3);
    startAtEnd(A2,A1);


    }

    and then you would use pulse over A1, A2 and A3

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Scheduling problem with time-dependent resource requirement

    Posted 04/25/17 11:24 AM

    Originally posted by: Jaymi_Liu


    Thanks for your reply.

    But what if there are multiple alternative modes with different resource usage (all varies with time) for one activity? For example, one alternative execution mode for Task A lasts for 10 days. It requires one labor for the first two days, five labors for the following five days, and three labors for the remaining days (3 days). Another alternative execution mode for Task A lasts for 8 days. It requires two labors for the first three days and six labors for the remaining six days. Maybe there are more than two alternatives for other tasks. Maybe I can define sub-tasks tuple for each task based on your suggestion? Or Is there any way to pulse a step function when the task starts?

    Another problem is how to model the resource limits which also change with times. For instance, Day 1~ Day 5, there are 5 labors available, Day 6 ~ Day 10, 8 labors are available.

    Thanks,


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Scheduling problem with time-dependent resource requirement

    Posted 04/25/17 06:46 PM

    Originally posted by: Jaymi_Liu


    Hi Alex, 

    I have modified the code based on your advice. But it still doesn't work. I attached the mod and dat. Can you help me to check what is going wrong? Thanks.

    Thanks,


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: Scheduling problem with time-dependent resource requirement

    Posted 04/26/17 03:30 AM

    Originally posted by: PhilippeLaborie


    I think that what you are still missing in your model is a set of constraints saying that the presence status of subprof[sub] of a macro-mode is the same as the presence status of the macro-mode itself (macromode[m]), so some constraints presenceOf(macromode[m])==presenceOf(subprof[sub]).

    Concerning your last question on resource availability profiles, instead of using Q_UsedRsrc[r] <= K that limits the maximal value of the function over the complete horizon, you can use a set of constraints alwaysIn(Q_UsedRsrc[r] , T1, T2, 0, K) that will constrain the maximal value of the function to be less than K only on the time-window [T1,T2). 

    Philippe

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 6.  Re: Scheduling problem with time-dependent resource requirement

    Posted 04/26/17 06:41 PM

    Originally posted by: Jaymi_Liu


    Thanks Philippe!! It works.

    Regards


    #DecisionOptimization
    #OPLusingCPOptimizer