Я пытаюсь решить следующую проблему в python, используя execute_qp:
from qpsolvers import solve_qp
k = np.array(kernel)
f = np.array(f)
lb=np.array(lower_limit)
ub=np.array(upper_limit)
Aeq = np.array(Aeq)
xs = solve_qp(k, f,lb,ub,Aeq,beq)
print(xs)
, где
k= [[ 1. 1. 1. -1. -1. -1.]
[ 1. 1. 1. -1. -1. -1.]
[ 1. 1. 1. -1. -1. -1.]
[-1. -1. -1. 1. 1. 1.]
[-1. -1. -1. 1. 1. 1.]
[-1. -1. -1. 1. 1. 1.]]
f = [-0.5 -0.5 -0.5 1.5 1.5 1.5]
lb = [0. 0. 0. 0. 0. 0.]
ub = [100. 100. 100. 100. 100. 100.]
Aeq = [ 1. 1. 1. -1. -1. -1.]
beq = 0.0
, но я получаю следующую ошибку:
ValueError: The number of columns of C must match the length of b. Received C as (6, 2) and b as (7,)