Topic
  • 2 replies
  • Latest Post - ‏2014-07-10T02:19:55Z by Shawn1
Shawn1
Shawn1
3 Posts

Pinned topic Writing Disjunctive constraints in OPL CPLEX

‏2014-03-07T15:37:33Z |

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

 

 

 

 

  • AlexFleischer
    AlexFleischer
    59 Posts

    Re: Writing Disjunctive constraints in OPL CPLEX

    ‏2014-03-08T11:40:58Z  

    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

     

  • Shawn1
    Shawn1
    3 Posts

    Re: Writing Disjunctive constraints in OPL CPLEX

    ‏2014-07-10T02:19:55Z  

    Thanks Alex for your guide.