Defining tuple in CPLEX

in the main block you should use thisOplModel to get anything from the model.

tuple minandmax
{
int m;
int M;
}

{minandmax} singletonMinAndMax={<1,5>};

dvar int X;
subject to
{
  
}

main
{
  writeln("give me ",Opl.first(thisOplModel.singletonMinAndMax).M);
}

gives

give me 5

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top