Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Add time restrictions

    Posted 02/13/15 10:15 AM

    Originally posted by: JuanCarlosPego


    Hello, continuing with my early CP OPTIMIZER and I have the following questions:
     

    I am 10 activities and need to check that when the amount of time exceeds 60 minutes, the next activity will not begin until after 120 minutes, that is, that after working 60 minutes has to descarsar 120 minutes before starting the following activity.

    I tried the next shape but not right:

    #include <ilcp/cp.h>
    #include <vector>
    #include <iostream>
    #include <fstream>
    ...
    ..

    IloInt     nSeq    = 10;
    IloInt    nbTask    = 50;
    IloInt    i;
    IloIntVarArray vloActivity(env, nSeq, 0, nbTask);

    for(i = 1; i < nSeq; i++){
        model.add(IloIfThen(env,(TimeStart[vloActivity[i-1]]+TimeEnd[vloActivity[i]]>60),(TimeEnd[vloActivity[i-1]]+120<TimeStart[vloActivity[i]])));
    }

    ....

    No how, anyone can help me please.


    #CPOptimizer
    #DecisionOptimization