Hello,
how can I calculate a euclidean distance in Gams?
d(i,j) = ((x(i)-x(j))^2+(y(i)-y(j))^2)^1/2 doesn’t work.
Gams won’t work with ^2.
Can somebody help me?
Greetings,
Paul
–
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/groups/opt_out.
Hi Paul: Why is ^2 (**2) bringing you trouble ?
You are probably better off with d(i,j) = (power(x(i)-x(j),2)+power(y(i)-y(j),2))^(1/2)
Regards
Claudio
On Tue, Oct 1, 2013 at 12:48 PM, Paul wrote:
Hello,
how can I calculate a euclidean distance in Gams?
d(i,j) = ((x(i)-x(j))^2+(y(i)-y(j))^2)^1/2 doesn’t work.
Gams won’t work with ^2.
Can somebody help me?
Greetings,
Paul
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/groups/opt_out.
Problem solved.
** instead of ^ works.
Am Dienstag, 1. Oktober 2013 20:33:17 UTC+2 schrieb Claudio Delpino:
Hi Paul: Why is ^2 (**2) bringing you trouble ?
You are probably better off with d(i,j) = (power(x(i)-x(j),2)+power(y(i)-y(j),2))^(1/2)
Regards
Claudio
On Tue, Oct 1, 2013 at 12:48 PM, Paul wrote:
Hello,
how can I calculate a euclidean distance in Gams?
d(i,j) = ((x(i)-x(j))^2+(y(i)-y(j))^2)^1/2 doesn’t work.
Gams won’t work with ^2.
Can somebody help me?
Greetings,
Paul
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/groups/opt_out.