I need to implements a geometric mean for each row in a matrix

I used the following code:

n(j) =e= sum(i, x(i,j)); //calculate the number of active links at each row

prod((i,j), x(i,j))=g= 0; //discard the zeros at the product

rpower (prod(i, C(i,j)*x(i,j)), 1/n(j)) //implements the geometric mean

X(i,j) is a binary variable, that represents one link in a graph

C(i,j) is a matrix with a cost values

the error that appears is division by zero.

someone could help me?

–

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.