试图在cplex中读取二次程序,得到错误 [英] trying to read quadratic program in cplex, get error
问题描述
我正在尝试使用"read"命令将CPLEX LP文件加载到CPLEX中.我相信在这个问题上,我有一组二次约束.但是,据我了解,CPLEX仍将尝试解决二次编程问题.
I am trying to load a CPLEX LP file in to CPLEX using the "read" command. I believe that in this problem, I have a set of constraints that are quadratic. But, from what I understand CPLEX will still attempt to solve quadratic programming problems.
但是,当我尝试阅读它时,出现此错误:
However, when I try to read it in, I get this error:
CPLEX Error 1437: Line 284: Illegal quadratic constraint sense.
要解决二次编程问题,我需要做些特别的事情吗?
Is there something special I need to do to read in a quadratic programming problem?
注意:我可以将此LP文件加载到scip并使用:scip -f
NOTE: I am able to load this LP file in to scip and solve it using: scip -f
推荐答案
二次约束必须是凸的.您只能从上方约束凸函数或从下方约束凹函数.二次等式约束永远不会凸出.这可能是您的问题.
The quadratic constraints must be convex. You can only constrain a convex function from above or a concave function from below. Quadratic equality constraints are never convex. That's likely your problem.
这篇关于试图在cplex中读取二次程序,得到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!