Using the Logical iterative operator Exists to verify a SET in the domain

  • 3 December 2023
  • 3 replies

Badge +1

Is it possible to use an indexed set inside the domain of Exists?

For instance:

  1. I have an indexed set IS with index domain (a,b) and subset of c
  2. I want to define a new set NS which is a subset of b and c
  3. Is it possible to use in the definition of this new set NS the following expression:
    { (b,c) | Exists[ a | c in IS(a,b) ] }


Thank you



Best answer by gdiepen 4 December 2023, 20:52

View original

3 replies

Userlevel 5
Badge +7

Instead of index sets, I typically try to use just binary parameters that indicate the relations instead.

Badge +1

Thank you @gdiepen 

Could you provide me an example or reference to understand what you are suggesting?



Userlevel 5
Badge +7

Instead of seeing the items as set elements, you can just define them as a relation using a binary parameter.


In your case you could create a binary parameter pIsPartOfIS(a,b,c) which gets a value 1 if c ‘is an element of the indexed set IS(a,b)’ and 0 otherwise.

Then your pIsPartOfNS(b,c) is just a new binary parameter with the definition exists(a | pIsPartOfIS(a,b,c)


Hope this is clear enough


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

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