Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Scheduling Shifts to fill demand curve

    Posted Thu March 22, 2012 08:18 AM

    Originally posted by: SystemAdmin


    I'm just starting out with CP Optimization. Can CP be used to solve a problem like this:

    I have a number of skill demand curves which define how many of a particular skill is needed for each hour (or minute) of a day. I have a set of resources which may fulfil a number of skills at certain proficiencies. These resources have preferences for which days and times can be worked. There are additioanl woring time directives which say (for example) a person cannot work more than 5 days in a row, a shift must be more than 4 hours but not more than 8 hours, a 1 hour break is required in a shift between hours 3 and 5, etc. I need a solution which works out resource schedules so that as much demand as possible is fulfilled, while also minimising idle time and satisfying as many of the personal and global preferences as possible.

    I started reading the docs and it starts off by listing the building blocks for scheduling problems, the first being the set of time intervals for tasks to be completed. But in the above problem tasks can't really be expressed like this. Take the simplest example possible of a shop which requires 1 assistant all day 8am-8pm, but 2 at the busy time of 1pm-2pm, and the constraint that a shift cannot exceed 7 hours. The solution is obvious: schedule resource 1 from 8am-2pm and resource 2 from 1pm-8pm, the overlap providing the 2 resources at the busy time. But how to specify the demand curve in terms of time intervals?
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Scheduling Shifts to fill demand curve

    Posted Thu March 22, 2012 12:45 PM

    Originally posted by: ol


    Hello

    you can combine elementary cumul function expressions. For example, in OPL:

    Let W[i] be the interval representing the worker i,

    cumulFunction workers = sum(i in 1..2) pulse(W[i],1);
    cumulFunction needed = pulse(8,20,1)+pulse(13,14,1);
    subject to {
    alwaysIn(workers-needed, 0, 0);
    }

    The above constraint forces to have exactly 2 workers between 1pm and 2pm, eand exactly 1 elsewhere.
    To allow more workers, you can use instead:
    alwaysIn(workers-needed, 0, maxAdditionalWorkersAllowed);
    Regards,
    Olivier
    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Scheduling Shifts to fill demand curve

    Posted Fri March 23, 2012 06:32 AM

    Originally posted by: SystemAdmin


    Thanks, that starts me off on the right direction anyway.
    #ConstraintProgramming-General
    #DecisionOptimization