admin管理员组文章数量:1122826
I am trying to solve an SOCP problem using mosek.
objective = cp.Minimize(cp.power(cp.norm(beta, 2), 2)/2 + cp.power(lambda_var, 2)/2 - beta @ y_train)
# Constraints
constraints = [
cp.quad_form(beta, K_1) / cp.power(rho_g, 2) <= cp.power(lambda_var, 2),
cp.quad_form(beta, K_2) / cp.power(rho_g, 2) <= cp.power(lambda_var, 2)
]
# Define the problem
problem = cp.Problem(objective, constraints)
problem.solve(solver = cp.MOSEK)
I keep running into the issue that my problem is not DCP, even though I wrapped the K matrices as PSD using cp.psd_wrap
and all my terms in the objective function are convex or linear, as well as the terms in my constraints.
I could really use some help as I have found nothing in hours of scouring the internet.
The error message shows:
DCPError: Problem does not follow DCP rules. Specifically:
The following constraints are not DCP:
QuadForm(var303, psd_wrap([[1.00 0.96 ... 0.94 0.91]
[0.96 1.00 ... 0.92 0.85]
...
[0.94 0.92 ... 1.00 0.98]
[0.91 0.85 ... 0.98 1.00]])) / power(40.0, 2.0) <= power(var304, 2.0) , because the following subexpressions are not:
|-- QuadForm(var303, psd_wrap([[1.00 0.96 ... 0.94 0.91]
[0.96 1.00 ... 0.92 0.85]
...
[0.94 0.92 ... 1.00 0.98]
[0.91 0.85 ... 0.98 1.00]])) / power(40.0, 2.0) <= power(var304, 2.0)
QuadForm(var303, psd_wrap([[6.61 0.37 ... 7.94 6.49]
[0.37 1.93 ... 0.04 1.83]
...
[7.94 0.04 ... 90.47 17.66]
[6.49 1.83 ... 17.66 470.43]])) / power(40.0, 2.0) <= power(var304, 2.0) , because the following subexpressions are not:
|-- QuadForm(var303, psd_wrap([[6.61 0.37 ... 7.94 6.49]
[0.37 1.93 ... 0.04 1.83]
...
[7.94 0.04 ... 90.47 17.66]
[6.49 1.83 ... 17.66 470.43]])) / power(40.0, 2.0) <= power(var304, 2.0)
本文标签: convex optimizationMy problem does not follow DCP rules in cvxpyStack Overflow
版权声明:本文标题:convex optimization - My problem does not follow DCP rules in cvxpy - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310629a1934446.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论