Skip to main content

Part of a summation

  • April 14, 2021
  • 2 replies
  • 56 views

Forum|alt.badge.img

Hello,

Since I'm new to aims, I have (I think) a simple question;

How can I do a part of a summation?

So for example; I've got x1, x2, x3, x4 and x5 as my sets. In my mathematical model is one constraint:  x5 = 10*x1 + 18*x2. How do I get this in AIMMS?

2 replies

mohansx
Forum|alt.badge.img+5
  • Former AIMMSian
  • 223 replies
  • April 15, 2021

Hello @Lau, your question is not clear. 

 

If x1, x2, … x5 are sets, then how do you want to apply a constraint on sets ?

 

I suppose you mean x1, x2 .. x5 are elements in your set with index i, and you have a variable - say abc(i), and the constraint is 

 

abc(x5) = 10*abc(x1) + 18*abc(x2) 

 

You can write this constraint pretty much like above, just enclose the element names in single quotes. 

 

abc(‘x5’) = 10*abc(‘x1’) + 18*abc(‘x2’) 

 

Is this correct ? If not, can you clarify ? 


Andrew
  • Former AIMMSian
  • 50 replies
  • April 26, 2021

Hi @Lau 

Are you able to clarify your question? Or were you able to solve it yourself?

 

Thanks



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

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