Skip to main content

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

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:

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


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


Hi @sachasbl,

Just wanted to check back - did you find the help you needed in this thread, or maybe you found another solution you could share with us? It might help others to know, and thank you so much! 🙂


Reply


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

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