Microsoft Solver Foundation 的 InteriorPointSolver 最小化了哪些函数?
我正在尝试使用 InteriorPointSolver 用于解决具有线性约束的标准二次规划问题(根据可以找到的定义此处)。我的问题没有线性项(定义中的“c”向量)。我正在使用 设置“Q”矩阵SetCoefficient(Int32, Rational, Int32, Int32) 跨越我的所有变量(将“目标”行作为 vidRow 传递)。我假设 InteriorPointSolver 最小化二次规划问题标准定义中定义的目标函数是否正确?
我问这个问题是因为当我自己计算 x^T * Q * x 时(使用从求解器获得的 x 的最优解),我得到的值与求解器声称的最优目标函数值有很大不同(通过Statistics.Primal 或GetValue(目标))。我的计算和求解器的最优值唯一一致的时候是当我使用 Q 的单位矩阵时。我猜测我设置错误或者不准确理解正在最小化什么函数。
我已经查阅了我能找到的所有文档,但找不到关于内点求解器正在最小化的函数的良好解释。谁能引导我朝正确的方向前进?
I am attempting to use InteriorPointSolver to solve a standard Quadratic Programming problem with linear constraints (per the definition that can be found here). My problem has no linear term (the "c" vector in the definition). I am setting up the "Q" matrix by using SetCoefficient(Int32, Rational, Int32, Int32) across all my variables (passing the "goal" row as the vidRow). Am I correct in assuming that the InteriorPointSolver is minimizing the objective function as defined in the standard definition of the quadratic programming problem?
I ask this because when I calculate x^T * Q * x myself (using the optimal solution for x that I get from the solver), I get a value that is substantially different than what the solver claims the optimal objective function value is (via Statistics.Primal or GetValue(goal)). The only time my calculation and the solver's optimal value agree is when I use an identity matrix for Q. I am guessing that I am setting something up wrong or am not understanding exactly what function is being minimized.
I have consulted all the documentation I can find and cannot find a good explanation of exactly what function the interior point solver is minimizing. Can anyone guide me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,
与两次调用的效果完全相同,
都是在目标函数中设置 x*y 项的系数,第二次调用只是覆盖您在第一次调用中设置的系数。求解器不将 xy 项与 yx 项区别对待,并且不添加系数(正如我所预期的那样)。因此,如果您的目标是在目标函数中包含 4xy 项,则必须进行以下调用:
而不是上面列出的两个调用。
As it turns out,
Has exactly the same effect as
The effect of both calls is to set the coefficient of the x*y term in your objective function, and the second call simply overwrites the coefficient that you set in the first call. The solver does not treat the xy term as distinct from the yx term, and does not add the coefficients (as I had expected). So, if your goal is to have a 4xy term in your objective function, you must make the following call:
instead of the two calls listed above.