Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Resource allocation basic question

    Posted Tue February 26, 2013 05:29 PM

    Originally posted by: SystemAdmin


    Hi guys and girls
    Can someone advise on best practice to manage resources in a schedule. If I have various resource identified by numbers 0,1,2,... and a task can use one of several of them, but not all of them can be used for this task; say the task requires resource 1,4 or 5. The optimizer should chose exactly one of them for the task. I have for the task an IntervalVar to determine the time duration (the task is fixed length) and a IntVar to determine which of the resources. How can I model that no other task can overlap this task if it the optimizer chose to use the same resource for both, but can overlap if two different resources were allocated?
    Thanks all for any help.
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Resource allocation basic question

    Posted Tue February 26, 2013 07:07 PM

    Originally posted by: SystemAdmin


    Can't you just use different cumulResources with NoOverlap constraints and make use of the many isPresent/isNotPresent-style arguments that are provided by CP Optimizer's functions?
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Resource allocation basic question

    Posted Wed February 27, 2013 11:42 AM

    Originally posted by: SystemAdmin


    Thanks.
    I'm not sure how to follow up on your advise. I'm relatively new to CP. I don't see cumulResources. Do you mean IloCumulFunctionExpr and IloCumulFunctionExprArray?

    Looking for information I came across IloAlternative. Looks like I can solve the problem I described by having a matrix (array of array) or Interval Vars, with number of rows equal to the number of tasks and number of columns equals to the number of resources. Each row is constrained to the task interval with IloAlternative so exactly one of them is present and that specific one has the same start/end as the task. That represents selection of specific resource which becomes unavailable for other tasks. Each column is constrained using IloNoOverlap. Is that an efficient solution?
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Resource allocation basic question

    Posted Fri March 01, 2013 10:21 AM

    Originally posted by: ChrisBr


    Hello,

    Yes your solution is the right way to model your problem.
    You might have a look at the distributed sample sched_optional.
    Regards,

    Chris.
    #CPOptimizer
    #DecisionOptimization