hi
i am beginner student in GAMS software
i have 2 problems in my codes please help me if you have idea about follow problems:
-
when i want to use condition of " if " i see the some of the errors in program run
i want add this condition : if(x(t,i)=0) then p(t,i)=0 please help me to add this condition -
I dont know why the limited condition with name cons(t,i) in my codes never can run true!!! if i use l replace g in (p(t,i)*x(t,i)=l=sum(c$(ord(i) ord(c)),p(t,c)*x(t,c)*SINRth) with every p the condition true. but i want to Gams assign p(t,i) greater than sum p(t,ic) i~c . ( p(t,i) is my variables in this codes p.lo(t,i)=10; p.up(t,i)=100)
my code:
sets
i /12/
t /110/
alias(i,c);
variables
x
z
x(t,c)
p(t,i);
p.lo(t,i)=10;
p.up(t,i)=100;
binary variables x;
equations
cost
cons2(i)
cons(t,i);
cost… z=e=sum((t,i),p(t,i)x(t,i));
cons2(i)… sum(t,2x(t,i))=e=4;
********************************************i want add the condition if(x(t,i)=0) then p(t,i)=0 in this place{ ************************************
cons(t,i)… p(t,i)*x(t,i)=g=sum(c$(ord(i) ord(c)),p(t,c)*x(t,c)*SINRth);
}
model test /all/;
solve test using minlp minimizing z;
display p.l,z.l,x.l,cons.l;
\
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\