当我运行以下CVX代码时,收到一条我不明白的警告。我只有警告,然后代码返回了解决方案。而且,如果我重新运行代码,就不会再有警告了。
警告是
Warning: A non-empty cvx problem already exists in this scope.
It is being overwritten.
代码是
v = [1;0;1];
efms = [1, 1, 0; 0, 1, -1 ; 1, 0, 1];
irrev = [1 2 3];
cvx_begin
nefms = size(efms,2);
nreac = length(v);
variable lambda(nefms,1);
minimize(norm(lambda,2));
subject to
v == efms*lambda; %v = sum(li*efmi)
for i = irrev
lambda(i)>=0;
end
cvx_end