1

我有一个 python 代码来解决以下简单的半定程序:

输入:两个实数 4 x 4 矩阵,A 和 B

输出: 1 - q 其中 q = 所有 p 的最大值,这样:

  1. 0 < p < 1

  2. A - p B 是半正定的

当我以详细模式查看上述问题的实例时,Python 代码会生成以下消息。

10:Channel_Flow pavithran$ python stackoverflow_sdp.py 
*** Dualizing the problem...  ***
[ #################################################################### ] 100% 
[ #################################################################### ] 100% 
--------------------------
  cvxopt CONELP solver
--------------------------
     pcost       dcost       gap    pres   dres   k/t
 0:  5.5546e-01  5.5546e-01  2e+01  3e+00  2e+00  1e+00
 1: -4.3006e-01 -7.3065e-02  3e+00  6e-01  3e-01  6e-01
 2: -4.9751e+01  2.1091e+00  9e+03  2e+01  8e+00  6e+01
 3: -3.4525e+02  7.6511e-02  9e+03  2e+00  1e+00  3e+02
 4: -3.4496e+04  7.6337e-02  9e+05  2e+00  1e+00  3e+04
 5: -3.4496e+06  7.6337e-02  9e+07  2e+00  1e+00  3e+06
 6: -3.4496e+08  7.6337e-02  9e+09  2e+00  1e+00  3e+08
Certificate of dual infeasibility found.
cvxopt status: dual infeasible
*** Dual Solution not found
Traceback (most recent call last):
  File "stackoverflow_sdp.py", line 42, in <module>
    simple_sdp(A,B)
  File "stackoverflow_sdp.py", line 31, in simple_sdp
    prob.solve(verbose = 2)
  File "/Library/Python/2.7/site-packages/picos/problem.py", line 4246, in solve
    raise Exception("\033[1;31m no Primals retrieved from the dual problem \033[0m")
Exception:  no Primals retrieved from the dual problem 
10:Channel_Flow pavithran$

有几个参数。我想知道是否可以在任何参数上指定边界以终止 SDP,但指定最大迭代次数除外。例如,我们可以指定“gap”、“pres”、“dres”的限制吗?

4

0 回答 0