Skip to main content

Hello all,

I am trying to create a subset of a main set for a constraint. See the attached figure of the constraint*. The index k should be a subset of its set. The main set consists for example of three classes {1,2,3}, then its subset should consist be{1,2}, so the main (ordered) set minus the last element, as it is used in the constraint by (k+1) on the right-hand side. Can anybody help me out how to formulate this?

* I am aware on the non-linearity

Hi Thijs,

 

what you are looking for is the | operator (such-that operator), which allows you to limit the range of an index.

In your constraint, you could set the domain condition to:

(k,t) | ord(k) < card(k)

(In plain english: all combinations of k,t  such that the ordinal value (position in the set) of index k is strictly smaller than the cardinality of the total set (the total size of the set that k belongs to).


Reply


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

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