Restriction for the number of positive Variable

hello all Pros,

in my Programm i have Parameter ParR(j,l), ParZ(i,j,t) is binary,ParG(l)
and Varibale X(i,j,l,t)
for the Equation sum((i,t),ParZ(i,j,t)*x(i,j,l,t)) =e= ParR(j,l) I would like put a additional Restriction,
that the number of x(i,j,l,t)>0 must be less than ParR(j,l)/ParG(l)+1.
But i dont know how to write this Restriction or Equation in GAMS.
Or more exactly how could i count the number of x(i,j,l,t)>0 under the Equation sum((i,t),ParZ(i,j,t)*x(i,j,l,t)) =e= ParR(j,l).Is it technically feasible in GAMS?

I’ll appreciate for every Feedback!

Doris





\

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 Doris,

If I understand correctly, your equation is sum((i,t),ParZ(i,j,t)*x(i,j,l,t)) =e= ParR(j,l) so, you are writing it for each of the members in the j and l sets. But, you also want to do, is to “check” whether if x(i,j,l,t) is >0 AND if it is less than ParR(j,l)/ParG(l)+1. If this is not the case, do you want to not write the equation for that t and l combination, or just not sum over that i and t combination ? Both of those things are technically feasible and easy, but require different conditional constructions.




On Thu, Jun 20, 2013 at 11:05 AM, Doris Do wrote:

hello all Pros,

in my Programm i have Parameter ParR(j,l), ParZ(i,j,t) is binary,ParG(l)
and Varibale X(i,j,l,t)
for the Equation sum((i,t),ParZ(i,j,t)*x(i,j,l,t)) =e= ParR(j,l) I would like put a additional Restriction,
that the number of x(i,j,l,t)>0 must be less than ParR(j,l)/ParG(l)+1.
But i dont know how to write this Restriction or Equation in GAMS.
Or more exactly how could i count the number of x(i,j,l,t)>0 under the Equation sum((i,t),ParZ(i,j,t)*x(i,j,l,t)) =e= ParR(j,l).Is it technically feasible in GAMS?

I’ll appreciate for every Feedback!

Doris





\

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.



\

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.

\