Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CP Optimizer Pulse function

    Posted Tue June 20, 2017 02:15 PM

    Originally posted by: Saumya_Bhatnagar


    Hi,
    I am implementing a variant of RCPSP, wherein to implement the capacity constraint, I add up the amount of resource k consumed by all activities. (Partial code below). Here, k is the index of a resource, task is an IloIntervalVariable and consumption[i][j][k] is the amount of resource k consumed by this task.

     cum_resource[k]=cp.sum(cum_resource[k],cp.pulse(task,consumption[i][j][k]));
    // capacity constraint
     for(int k=0;k<nbResources;k++){
           cp.add(cp.le(cum_resource[k],capacity[k]));                
     }
        
    But i get the following error when calling the IloCP solve() method:
    ilog.concert.IloException: Parameter 1 of function pulse is out of required range [0, 9007199254740991].

    Any insight on the root cause of this error or how to resolve this would be of great help. Thanks in advance.


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: CP Optimizer Pulse function

    Posted Thu June 22, 2017 07:54 AM

    Originally posted by: PhilippeLaborie


    Could you check what is the value of the consumption[i][j][k] quantities ? As the error says, the maximal allowed value is IntervalMax whose value is 9007199254740991.

    Philippe

     


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: CP Optimizer Pulse function

    Posted Thu June 22, 2017 08:21 AM

    Originally posted by: Petr Vilím


    I agree with Philippe. Isn't consumption[i][j][k] negative?

    Petr


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: CP Optimizer Pulse function

    Posted Sun July 30, 2017 06:34 AM

    Originally posted by: Saumya_Bhatnagar


    Hi Philippe,

    Thanks for your reply. On further examination, indeed, some of the values were going out of range. I modified the code accordingly and it worked.

    -Saumya


    #CPOptimizer
    #DecisionOptimization