Checking for variables with a specific index, whether the value is equal to a certain value.

  • 3 June 2023
  • 1 reply

Hello, I have a problem.

I created two sets i and j for the variable X_i,j.

Now I want to add a constraint to see if the sum of all X_i,j with i="specific value” is equal to 10.

My guess would be something like:

sum[ ("Specific value”,j), variable(i,j) ] = 10;

But this obviously doesn't work, otherwise I wouldn't be asking.


Best answer by Chris Kuip 5 June 2023, 07:51

View original

1 reply

Userlevel 5
Badge +7

Please substitute 'specific value’ for i as in:

sum( j, x('specific value', j ) = 10 




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

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