Solved

# Problem in giving a min. value to my index

• 3 replies
• 67 views

• Explorer
• 0 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

icon

Best answer by mohansx 27 April 2022, 02:25

View original

### 3 replies

Userlevel 5
+7

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) ]

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
+5

`Index domain: (j, k) | ord(j) >= 2`
You can have many conditions after `|` using the keywords `and, or`