Skip to main content
Solved

Properly using index domain with 3 indices and 2 subsets

  • 11 January 2023
  • 1 reply
  • 54 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.

View original

1 reply

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 150 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.