how to use ord for an uncontrolled set (allias set)

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

how to use ord for an uncontrolled set (allias set)

Post by Archiver »


hi,
for example look at this:

set i /1*10/
allias (i,k)

eq(i)$(ord(i) ne ord(k))..etc

while compiling, i get this error "Uncontrolled set entered as constant"

any suggestions on how i can fix it?
thanks

--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

RE: how to use ord for an uncontrolled set (allias set)

Post by Archiver »


Hi Reza

It is not clear what you want to achieve as you don't show the complete equation.
If you use ord(i) ne ord(k) like you do, i and k should be part of the equation declaration (like eq(i,k)).
eq(i,k)$(ord(i) ne ord(k)) will drop all the equations with i equal to k.
Perhaps you should send more information on what you want to achieve.
Cheers
Renger


____________________

Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch
From: gamsworld@googlegroups.com [gamsworld@googlegroups.com] on behalf of Reza Bayani [reza.bayani@gmail.com]
Sent: Tuesday, February 16, 2016 08:32
To: gamsworld
Subject: how to use ord for an uncontrolled set (allias set)

hi,
for example look at this:

set i /1*10/
allias (i,k)

eq(i)$(ord(i) ne ord(k))..etc

while compiling, i get this error "Uncontrolled set entered as constant"

any suggestions on how i can fix it?
thanks

--
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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: how to use ord for an uncontrolled set (allias set)

Post by Archiver »


Dear Renger,
Thanks for your kind reply. i did the trick with changing the equation so that it includes the minus value of sentences when i=k.
Best wishes,
Reza.

--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Post Reply