how to type this expression

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.com

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.

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.com

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 athttp://groups.google.com/group/gamsworld?hl=en.- 隐藏被引用文字 -

  • 显示引用的文字 -

    \