0

我正在查看页面上的示例:

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

似乎从未实施过?

4

1 回答 1

2

它在行中实现

A, b = matrix(1.0, (1,n)), matrix(1.0)
于 2016-01-23T01:03:52.960 回答