YALMIP and nullspace #1291
-
Hi Johan, Back again with a different optimization problem. I believe this one should be easier. Here I have 31 decision variables. The trouble I'm having is the cost function involves the null space of the decision variables and I'm getting an error trying to use the I didn't see Problem Pseudo Code% Decision Variables
r = sdpvar(31,1);
% Constant Weights
J = rand(21,1); % Cost Function
Q = foo( r ); % Sparse [19 21] matrix
Objective = null( Q )'*diag( J )*null( Q ); % [2 21] x [21 21] x [21 2] TroubleshootingI verified Q is what I'd expect it to be:
Error Message
I tried using some other functions too
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Not sure what you expect to be returned from a null operator acting on a matrix involving decision variables Just randomly, if Q = [r1 r2 0;r2 r1 0] then for any point in the solver iteration process where r1=r2 the result would be a 3x2 vector, and when r1 and r2 are different it is a 3x1 vector. There is no way to work with such an operator in a standard optimization framework or represent in YALMIP, as everything has defined sizes when the model is set up |
Beta Was this translation helpful? Give feedback.
Not sure what you expect to be returned from a null operator acting on a matrix involving decision variables
Just randomly, if
Q = [r1 r2 0;r2 r1 0]
then for any point in the solver iteration process where r1=r2 the result would be a 3x2 vector, and when r1 and r2 are different it is a 3x1 vector. There is no way to work with such an operator in a standard optimization framework or represent in YALMIP, as everything has defined sizes when the model is set up