Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Define the start of a interval variable

    Posted 12/17/19 11:56 AM

    Originally posted by: RuiFig


    Hi, 

    I need help to define a specific moment to start an activity.

    I'm developing a scheduling model for a job shop, and i have certain products that dont need to be processed in certain machines.

    I thought that if i put that activities in to be "executed " in the instant zero with a duration of zero it would solve my problem. 

    Can someone help me to solve this problem or help me to find a better solution ? 

     


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Define the start of a interval variable

    Posted 12/18/19 04:02 AM

    Hi,

    why not relying on optional intervals ?

    See example in CPLEX_Studio1210\opl\examples\opl\sched_optional

     

    regards


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Define the start of a interval variable

    Posted 12/18/19 06:24 AM

    Originally posted by: RuiFig


    I will try that, i also have another doubt.

    I have two machines that can not work at the same time, how do i model that situation ? 

    I'm new to cplex, so sorry for any dumb question. 


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Define the start of a interval variable

    Posted 12/18/19 06:29 AM

    Hi,

    you may use noOverlap

    OPL constraint (scheduling) used to prevent intervals in a sequence from overlapping and (optionally) to enforce a minimal distance between consecutive intervals.

     

     


    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: Define the start of a interval variable

    Posted 12/18/19 06:38 AM

    Originally posted by: RuiFig


    i already use the nooverlap constrain within one machine like this 

    forall(m in mach)

    nooverlap(mchs[m],tt[m],1);

     

    but i dont wont machine 1 and 3 to work ate the same time for exemple.


    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: Define the start of a interval variable

    Posted 12/19/19 07:39 AM

    Hi,

    then a sequence could help:

    using CP;

    range r=1..3;

    dvar interval itvs[r] size 2;
    dvar sequence seq in    all(i in r:i!=2) itvs[i];

     

    minimize max(i in r) endOf(itvs[i]);
    subject to
    {
      noOverlap(seq);
    }

    execute
    {
      writeln(itvs);
    }

    which gives

     

    // solution with objective 4
     [<1 0 2 2> <1 0 2 2> <1 2 4 2>]

    regards

     

    https://www.linkedin.com/pulse/o-que-%C3%A9-otimiza%C3%A7%C3%A3o-e-como-isso-pode-ajud%C3%A1-lo-fazer-mais-fleischer/


    #CPOptimizer
    #DecisionOptimization