Problem in giving a min. value to my index

  • 22 April 2022
  • 2 replies


Hello everyone, 


In the problem that I have to solve, I have got two sets: j (=1, …, 5) and k (=1, …, 9). I also have a parameter: parameter(j,k) and I want that j begins from 2 (and not from 1) for this parameter. How do I put it in AIMMS?


Moreover, in my objective function I want to minimize the sum of my costs but for j >= 2. My current formula looks like this: sum[j, 200*W(j)]     with W(j) a variable

How do I specify that I want j to be larger or equal than 2?


Thank you

2 replies

Userlevel 4
Badge +2

The AIMMS functionailty you are looking for is domain conditions, which you can use with the | (or such that) operator.


For example, your sum can be done like:

sum[ j | ord(j) >= 2, 200*W(j) ]

which you can read as:

sum 200*W(j) for all j for which holds that the ordinal position of j in its set is greater or equal than 2 (i.e. everything except the first element)

Userlevel 5
Badge +2

To add to gdiepen’s answer, when declare your parameter(j, k) as below

Index domain: (j, k) | ord(j) >= 2

You can have many conditions after | using the keywords and, or


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

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