QP要求D在R中是对称正定的

QP要求D在R中是对称正定的,r,minimize,solver,R,Minimize,Solver,当我对我的问题运行solve.QP时,我从R得到以下错误: Error in solve.QP(sigma, rep(0, 5), t(Amat), bvec, meq = 2) : matrix D in quadratic function is not positive definite! 我的西格玛矩阵是对称的,但不是正定的。为什么需要这样做?如果我自己用拉格朗日函数来解,我就能得到解。那么R为什么要强加这个要求呢?Goldfarb-Idnani算法从计算 无约束解。因此,它要求

当我对我的问题运行solve.QP时,我从R得到以下错误:

Error in solve.QP(sigma, rep(0, 5), t(Amat), bvec, meq = 2) : 
  matrix D in quadratic function is not positive definite!

我的西格玛矩阵是对称的,但不是正定的。为什么需要这样做?如果我自己用拉格朗日函数来解,我就能得到解。那么R为什么要强加这个要求呢?

Goldfarb-Idnani算法从计算 无约束解。因此,它要求 目标函数是正定的

摘自Fortran源文件solve.QP.f:

c  this routine uses the Goldfarb/Idnani algorithm to solve the
c  following minimization problem:
c
c        minimize  -d^T x + 1/2 *  x^T D x
c        where   A1^T x  = b1
c                A2^T x >= b2
c
c  the matrix D is assumed to be positive definite.  Especially,
c  w.l.o.g. D is assumed to be symmetric.

阿拉巴马州软件包中的函数auglag为任何优化问题的解决方案提供拉格朗日乘数

R中是否有另一个函数没有此要求,并且使用拉格朗日乘子法?