Error in prod function in GP


#1

Hi,

I have the following GP problem which I have to write it in recursive form. I use CVX to solve it (with Mosek solver). The simplified problem is as follows
cvx_begin gp
variable X(10,20)
expression obj(20)
for j=1:20
obj(j)=1;
for i=1:10
obj(j)=obj(j)*X(i,j)^A(i,j); % A is a constant matrix, with some zero elements
end
end
minimize prod(obj)
subject to


cvx_end

after running the CVX, I get the following error:
Error using cvx/prod (line 89)
Shouldn’t be here.

Error in minimize (line 14)
x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );

Error in main (line 71)
minimize prod(obj)

Does anybody have any idea why I get such a message? I appreciate any help.
Thanks


#2

Hi,

I have the similar structure(product of a multiplication to the power of a constant) in my GP model but in its constraints

reshape(prod((P_BS./PBS_TS).^expon_BS),K,M,phi)==2.^(Q_BS_copy/(alphaT_sdelta_f))./snr0BS;

where P_BS is my non negative matrix of optimization variables and all other parameters are matrix of non negative constants.
and I received the same error for that line:

“Error using cvx/prod (line 90)
Shouldn’t be here.”

Sorry I do not know how to solve it. this error sometimes does not occur so there should be something wrong with the data being used.

I appreciate if someone help us on this issue.

Thanks


(Daniel Tweed) #3

Upon further investigation, this error message only crops up when the product is being taken over strictly cvx positive constant expressions.