hello,everyone

could anybody tell me how to type the expression as below using the

GAMS language

dP(i) =e= P(i)-sum(j,V(j)*(G(i,j)*cos(theta(i)-theta(j))

+B(i,j)*sin(theta(i)-theta(j) ) ) )

error:$171 Domain violation for set

thanks!

\

hello,everyone

could anybody tell me how to type the expression as below using the

GAMS language

dP(i) =e= P(i)-sum(j,V(j)*(G(i,j)*cos(theta(i)-theta(j))

+B(i,j)*sin(theta(i)-theta(j) ) ) )

error:$171 Domain violation for set

thanks!

\

Hi,

Violation is caused by wrong definition of sets. If dimension of i and j is equal,you must define one of them in alias. Or you may control other constraints and you may found another error about sets.

\

Date: Mon, 19 Mar 2012 20:10:23 -0700

Subject: how to type this expression

From: youyaxiong@gmail.com

To: gamsworld@googlegroups.comhello,everyone

could anybody tell me how to type the expression as below using the

GAMS languagedP(i) =e= P(i)-sum(j,V(j)*(G(i,j)*cos(theta(i)-theta(j))

+B(i,j)*sin(theta(i)-theta(j) ) ) )error:$171 Domain violation for set

thanks!

–

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

–

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi

I agree with Nazmi

I think your problem rise from "sin(theta(i)-theta(j) ) ".

you have to use alias statement as follow:

Alias(I,J);

On Tue, Mar 20, 2012 at 6:40 AM, YouYaxiong wrote:

hello,everyone

could anybody tell me how to type the expression as below using the

GAMS language

dP(i) =e= P(i)-sum(j,V(j)*(G(i,j)*cos(theta(i)-theta(j))

+B(i,j)*sin(theta(i)-theta(j) ) ) )

error:$171 Domain violation for set

thanks!

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

yeahï¼ŒI have solved it using the alias. Thank you very much.

On 3æœˆ20æ—¥, ä¸‹åˆ3æ—¶30åˆ†, Nazmi Åžener wrote:

Hi,

Violation is caused by wrong definition of sets. If dimension of i and j is equal,you must define one of them in alias. Or you may control other constraints and you may found another error about sets.

Date: Mon, 19 Mar 2012 20:10:23 -0700

Subject: how to type this expression

From: youyaxi...@gmail.com

To: gamsworld@googlegroups.comhello,everyone

could anybody tell me how to type the expression as below using the

GAMS languagedP(i) =e= P(i)-sum(j,V(j)*(G(i,j)*cos(theta(i)-theta(j))

+B(i,j)*sin(theta(i)-theta(j) ) ) )error:$171 Domain violation for set

thanks!

–

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

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group athttp://groups.google.com/group/gamsworld?hl=en.- éšè—è¢«å¼•ç”¨æ–‡å— -

- æ˜¾ç¤ºå¼•ç”¨çš„æ–‡å— -

\