Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  StateFunction

    Posted 03/16/16 06:49 AM

    Originally posted by: SatishKumarA


     

    Hi Team,

    I am using statefunction to process two activities on a resource in parallel

    dvar interval tb_task[t1 in Tyres, t2 in TBM] optional in 0..1000 size 10*t1;
    stateFunction DrumDimension[t2 in TBM];
    Constraint :
      forall(t1 in Tyres,t2 in TBM)
            alwaysEqual(DrumDimension[t2],tb_task[t1][t2],Tyre_Type[t1],1,0);
    

    The two activities say task1 (6) and task2 (8) start at the same time and end at different times on resource 2. As per the above declaration and constraint, both activities are getting started at 0 and ending at different times (60 and 80) as shown in following gantt chart (Refer [6][2] and [8][2]).

    Now, task 6 will be released to next operation only after time 80 as resource 2 will be done processing 6 and 8 only at time 80. That means, even though task 6 processing was completed, it was held by resource 2 till 80. I would like to write a precedence constraint on task 6 on a subsequent resource say 3. For ex.

    endBeforeStart([6][2], [6][3])

    Problem is that resource 3 is processing task 6 from time 60 which is wrong.

    How do I access/derive this 80 as end time of task 6 instead of 60?

     

    Thanks,

    Satish


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: StateFunction

    Posted 03/17/16 05:01 AM

    Originally posted by: rdumeur


    Dear Satish,

     

    I guess your model has other constraints that may affect the outcome of the solve .

    Could you please post a minimal model showing the problem? Other constraints involving DrumDimension could produce this result.

    Cheers,

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: StateFunction

    Posted 03/18/16 05:28 AM

    Originally posted by: PhilippeLaborie


    Hello Satish,

    If I understand your problem well, you would like to say that the "resource" is not available for executing other activities until it has finished the current batch of activities. So your model with only alignment of the start times of activity cannot work because indeed, the end time won't be synchronized and nothing prevent the successor of an activity that finishes before the end of the batch to be executed before the end of the batch, The most general way to model what you want is to use 2 interval variables for a given activity: 1 variable act that represents the actual activity and 1 variable act_batch that represents the activity in the batch, you have constraints like startsAtStart(act, act_batch), endsBeforeEnd(act, act_batch) and the state function works on the interval variables act_batch with an alignment of both start and end. Then if your precedence constraints hold on the end of batches rather than on the actual end time of activities, you should post them on the act_batch intervals too. Note that quite often, you do not really need the 'act' interval vars as all constraints will hold on the batches, in this case it is enough to just define act_batch intervals with a minimal size that is the duration of the activity and a large maximal size (in general, this is the max duration of batches, if this duration is not constrained, you can just use a large enough value).

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: StateFunction

    Posted 03/20/16 12:29 AM

    Originally posted by: SatishKumarA


    Hi Philippe,

     

    Thanks for tour answer. The idea you suggested should work for my case. I will try it out.

     

    Thanks,

    Satish


    #DecisionOptimization
    #OPLusingCPOptimizer