我正在寻找页面上的示例:
http://cvxopt.org/examples/book/maxent.html
问题陈述是:
# minimize p'*log p
# subject to -0.1 <= a'*p <= 0.1
# 0.5 <= (a**2)'*p <= 0.6
# -0.3 <= (3*a**3 - 2*a)'*p <= -0.2
# 0.3 <= sum_{k:ak < 0} pk <= 0.4
# sum(p) = 1
但最后一行
# sum(p) = 1
似乎从未实现过?
答案 0 :(得分:2)
它在行
中实现A, b = matrix(1.0, (1,n)), matrix(1.0)