如何在 IBM CPLEX MILP 文件中乘以约束变量?
How to multiply constraint variables in a IBM CPLEX MILP file?
使用 IBM CPLEX,我正在努力 运行 一个 MILP 文件,关于约束,我想添加以下行:
Subject to
a_1 P_1 + 22.62 b_2 + a_2 P_2 + 24.87 b_2 - P_3 + A = 0
对于这种情况,CPLEX 运行s,但在某些情况下,某些变量是 "glued" (t运行cated),例如:
<variable name "a_1P_1" index="63" value"0" reducedCost="3.71741848184e-06"/>
试图解决"stuck variables"这个问题,我决定用星号(*)来表示两个未知变量的乘积,如:
Subject to
a_1*P_1 + 22.62 b_2 + a_2*P_2 + 24.87 b_2 - P_3 + A = 0
但在这种情况下,CPLEX returns 出现错误:
CPLEX Error 1608: Line 7:Expected '+','-' or sense, found '*'.
有人知道如何解决这个问题吗?
听起来您正在尝试解决 MIQCP。
在 LP file format: algebraic representation 的文档中,我们有以下内容:
Quadratic constraints are allowed in this section. Quadratic terms are
specified inside square brackets [] ....
在关于二次项的部分中,它说您可以在方括号内使用星号 (*) 和插入符号 (^)。
使用 IBM CPLEX,我正在努力 运行 一个 MILP 文件,关于约束,我想添加以下行:
Subject to
a_1 P_1 + 22.62 b_2 + a_2 P_2 + 24.87 b_2 - P_3 + A = 0
对于这种情况,CPLEX 运行s,但在某些情况下,某些变量是 "glued" (t运行cated),例如:
<variable name "a_1P_1" index="63" value"0" reducedCost="3.71741848184e-06"/>
试图解决"stuck variables"这个问题,我决定用星号(*)来表示两个未知变量的乘积,如:
Subject to
a_1*P_1 + 22.62 b_2 + a_2*P_2 + 24.87 b_2 - P_3 + A = 0
但在这种情况下,CPLEX returns 出现错误:
CPLEX Error 1608: Line 7:Expected '+','-' or sense, found '*'.
有人知道如何解决这个问题吗?
听起来您正在尝试解决 MIQCP。
在 LP file format: algebraic representation 的文档中,我们有以下内容:
Quadratic constraints are allowed in this section. Quadratic terms are specified inside square brackets [] ....
在关于二次项的部分中,它说您可以在方括号内使用星号 (*) 和插入符号 (^)。