Topic
  • 2 replies
  • Latest Post - ‏2014-03-27T11:22:30Z by GGR
appleme
appleme
1 Post

Pinned topic write a constraint

‏2014-03-26T01:00:33Z |

Hi all.

I want to create a constraint in opl,but I do not know how to write?

int startTime=...;

int endTime=...;

int numbers=..;

tuple  JUP
{  
   string p;
   string u;  
} ;
{JUP} jup=...;

dvar interval TT[o in jup];

I want to create a constraint :the number of  the Overlapping in TT[o in jup] which is between startTime and endTime will not be greater than the special numbers?

waiting for your answer,Thank you!

  • AlexFleischer
    AlexFleischer
    23 Posts

    Re: write a constraint

    ‏2014-03-26T09:00:25Z  

    Hi,

    why do not you use a cumul function ?

    regards

  • GGR
    GGR
    40 Posts

    Re: write a constraint

    ‏2014-03-27T11:22:30Z  

    Hi appleme

     

    You have also posted your question in  ‎ OPL using CP Optimizer forum. Please refer to this thread.

     

    Cheer