1. 程式人生 > >CVX求解二階錐規劃時提示約束非凸Invalid constraint: {convex}

CVX求解二階錐規劃時提示約束非凸Invalid constraint: {convex}

在利用CVX工具箱求解二階錐規劃時,加了一條不等式約束,結果報錯,在google搜到的結果是該約束非凸.
(1)首先對該約束的凸性存在疑惑
(2)如何修改可以把該約束由非凸轉凸?
code如下:

  1. %%%% Use CVX solve the SOPC problem
  2. % cvx version
  3. opt_n = 2*N_global + 1;
  4. e_b = 1e1;
  5. e_d = 1e-4;
  6. e_g = 800;
  7. cvx_begin
  8.     variable b(opt_n) complex
  9.     minimize( norm(Tb*b-ab))
  10.     subject to
  11.     norm(Td*b) <= sqrt(e_d);
  12.     norm(Tb*b) >= sqrt(e_b);
  13.     norm(b) <= sqrt(e_g);
  14.     
  15. cvx_end

報錯結果如下:

  1. Warning: A non-empty cvx problem already exists in this scope.
  2.    It is being overwritten. 
  3. > In cvxprob (line 28)
  4.   In cvx_begin (line 41)
  5.   In demostration_scatter_without_to_2D_8_27_dft_add_acc (line 59) 
  6. Error using cvxprob/newcnstr (line 192)
  7. Disciplined convex programming error:
  8.    Invalid constraint: {convex} >= {real constant}
  9.  
  10. Error in  >=  (line 21)
  11. b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '>=' );
  12.  
  13. Error in demostration_scatter_without_to_2D_8_27_dft_add_acc (line 64)
  14.     norm(Tb*b) >= sqrt(e_b);