Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Writing Disjunctive constraints in OPL CPLEX

  • 1.  Writing Disjunctive constraints in OPL CPLEX

    Posted Fri March 07, 2014 10:38 AM

    Originally posted by: Shawn1


    I have a scheduling optimization problem where available times for machines are between 8:00 AM and 5:00 PM Monday through Friday. I need to write union of following constraints as available time (in minutes) using OPL language but not sure if logical operator (||) does the job for me . Any guide is really appreciated.

    0<=t<=540   

    1440<=t<=1980

    2880<=t<=3420

    4320<=t<=4860

    5760<=t<=6300

     

     

     

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Writing Disjunctive constraints in OPL CPLEX

    Posted Sat March 08, 2014 06:41 AM

    Hi

     

    yes if t is a dvar you may write in the subject to block

     

    (0<=t<=540   ) ||

    (1440<=t<=1980) ||

    (2880<=t<=3420) ||

    (4320<=t<=4860) ||

    (5760<=t<=6300);

    But there may be a better linear way as t being the sum of a number between 0 and 540 and 1440 multiplied by a int between 0 and 4

    regards

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Writing Disjunctive constraints in OPL CPLEX

    Posted Wed July 09, 2014 10:20 PM

    Originally posted by: Shawn1


    Thanks Alex for your guide.

     


    #DecisionOptimization
    #MathematicalProgramming-General