荔枝的初琪 发表于 2020-11-3 23:08:01

求二次规划的问题

import pprint
from cvxopt import matrix, solvers
P = matrix([,,])
q = matrix()
G = matrix([[-1.0,0.0,0.0],,,[-0.1073,-0.0737,-0.0627]])
h = matrix()
A = matrix([,,])
b = matrix()
result = solvers.qp(P,q,G,h,A,b)

print('x\n',result['x'])

纯小白。。。做优化作业重复老师的例子,复现不出来,请问是哪里错了呀

荔枝的初琪 发表于 2020-11-3 23:44:23

解决啦。。。
页: [1]
查看完整版本: 求二次规划的问题