Skip to main content
Solved

Properly using index domain with 3 indices and 2 subsets

  • January 11, 2023
  • 1 reply
  • 58 views

Forum|alt.badge.img+4

Hi all, 

I  try to implement the following index domain in a constraint but I get the error “,)” is expected. 

OperationsPOforJ(i) and OperationsPOforK(i) are two subsets of set OperationPOs. Am i making a typo or is it not possible to use two “in” functions in an index domain?

 

Best answer by gdiepen

You would need to formulate this slightly different:

(i,j,k) | j in OperationsPOForJ(i) and k in operationsPOForK(i) and ord(j) < ord(k)

So on the left side of the | operator you only have the index names and on the right hand side you do all the restrictions.

1 reply

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • Answer
  • January 11, 2023

You would need to formulate this slightly different:

(i,j,k) | j in OperationsPOForJ(i) and k in operationsPOForK(i) and ord(j) < ord(k)

So on the left side of the | operator you only have the index names and on the right hand side you do all the restrictions.



Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator