Skip to main content
Solved

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

  • June 3, 2023
  • 1 reply
  • 40 views

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

Please substitute 'specific value’ for i as in:

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

 

 

1 reply

Chris Kuip
AIMMSian
Forum|alt.badge.img+7
  • AIMMSian
  • 125 replies
  • Answer
  • June 5, 2023

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