Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  minimize the distance between tasks in a sequence

    Posted 08/23/16 10:48 PM

    Originally posted by: qtbgo


    Hi, guys, could you help me on the following problem?

    Suppose we have the following varaibles:

    dvar interval task[i in 1..100]  in 0..10000 size 10..20;
    dvar sequence seq in all(i in 1..100)task[i];

    and we have constraints:

    noOverlap(seq);
    other constraints on task.

    Now, I want to minimize the distance between tasks in the sequence, how to do it?

    Thank you in advance.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: minimize the distance between tasks in a sequence

    Posted 08/24/16 02:58 AM

    Hi,

    what about minimizing the max of the endOf of the tasks ?

    Or do you mean distances are not time ?

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: minimize the distance between tasks in a sequence

    Posted 08/24/16 07:37 PM

    Originally posted by: qtbgo


    I mean time. If I  minimizing the max of the endOf of the tasks, it will also minimize the length of the tasks. I don't want this side effect. I just want to minimize the time distance between the tasks.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: minimize the distance between tasks in a sequence

    Posted 08/24/16 10:21 PM

    Originally posted by: isczg


    Hi,

    You can try as follow:

     

    dvar interval root;

    dvar interval task[i in 1..100]  in 0..10000 size 10..20;

    dvar sequence seq in all(i in 1..100)task[i];

     

    span(root, task);

    noOverlap(seq);
    other constraints on task.

     

    minimize lengthOf(root) - sum(i in 1..100)lengthOf(task[i]);

    // because the sum of distance between consecutive tasks = the length of root(which starts at the first task and ends at the last task) - the sum of the lengths of the tasks

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: minimize the distance between tasks in a sequence

    Posted 08/25/16 12:35 AM

    Originally posted by: qtbgo


    thank you very much


    #DecisionOptimization
    #OPLusingCPOptimizer