Check if a given entry in a dynamic array has been created.
Array reference (e.g. t(1))
true if the entry exists, false otherwise.
The following, a dynamic array of decision variables only has its even elements created, which is checked by displaying the
x: dynamic array(S) of mpvar
forall(i in S| not isodd(i)) create(x(i))
forall(i in S| exists(x(i)))
writeln("x(", i, ") exists")
1. If an array is declared dynamic (or indexed
by a dynamic set) its elements are not created at its declaration.
This function indicates if a given element has been created.
Under certain conditions,
the exists function call is optimized by the compiler when
used for filtering an aggregate operator: the loop is
only performed for the existing entries instead of enumerating all
possible tuples of indices for finding the relevant ones.
If you have any comments or suggestions about these pages,
please send mail to email@example.com.
© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.