Hi Kostas
You could use the smin function in Gams:
set r /r1r3/, c /c1c3/;
parameter tbl(r,c);
tbl(r,c) = uniform(0,10);
display tbl;
alias(r,ar);
tbl(r,c)$(smin(ar,tbl(ar,c)) < 1) = tbl(r,c)*1E-5;
display tbl;
with the following output:
---- 9 PARAMETER tbl
c1 c2 c3
r1 1.717 8.433 5.504
r2 3.011 2.922 2.241
r3 3.498 8.563 0.671
---- 16 PARAMETER tbl
c1 c2 c3
r1 1.717 8.433 5.503754E-5
r2 3.011 2.922 2.240529E-5
r3 3.498 8.563 6.711372E-6
Cheers
Renger
\
Modelworks
Gewerbestrasse 15
3600 Thun – Switzerland
+41 79 818 53 73
Info@modelworks.ch
blog.modelworks.ch
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of ???sta?t??? ?et??d??
Sent: Monday, November 24, 2014 22:05
To: gamsworld@googlegroups.com
Subject: Problem on parameter
Hello,
I have the following problem; I want to scan a table and if I find a value of less than 1, then all the elements of that collumn to be divided by a very small number.
I have done the following:
Data(j,r)$(Data(j,r)<1)=(Data(,jr))/(1E-5);
but it is not right as only some elements are divided by a very small number and not all the collumn.
Can you please provide me with some feedback?
Best regards,
Kostas
–
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.