## Hi Bahman

You say that the sets i and h are equal. Have you used alias (the right way) or just defined two independent sets with the same content (the wrong way)?

Arne

\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Bahman Alipour

Sent: Wednesday, July 30, 2014 3:40 PM

To: gamsworld@googlegroups.com

Subject: Problem with summations

Hello there

I am writing a model with a nonlinear constraint,here is the model

cost… z =e= sum ( i, x(i) * fixed_costs(i))+ sum ( i, sum (j,g(i,j) * variable_costs(i))) ;

equilibrium(j)… sum(i,g(i,j)) =e= demand(j);

technical1(i,j)… g(i,j) =l= g(i,j-1)+ (ramp(i) * x(i) );

technical2(i,j)… g(i,j) =g= g(i,j-1)- (ramp(i) * x(i) );

capacity(i,j)… g(i,j) =l= x(i);

risk… sum(i,sum(h,x(i)*x(h)*correlation_total_fix(i,h)*risk_fix(i)*risk_fix(h)))=l=10;

In the risk constraint, I get this error : Domain Violation for set

It is because gams can not understand that the set i and the set h are equal,(and I defined risk_fix(i) and x(i) not risk_fix(h) and x(h))

how can I use summation in this situation

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.