1

Lets say I have a set:

{int} A ={1,2,3,4};

How can I get the number of elements in this set in CPLEX?

Thanks in advance!

Yan H.
  • 49
  • 4

1 Answers1

1
{int} A ={1,2,3,4};

int n=card(A);

execute
{
  writeln(n);
}

gives

4
Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15