CVXPY 和 CPLEX - 这个属性错误是关于什么的?
CVXPY and CPLEX - What is this attribute error about?
我正在尝试使用 CVXPY 框架对问题建模并使用 CPLEX 解决问题。
当我 运行 我的代码时,我得到一个
AttributeError: 'Problem' 对象没有属性 '_compute_once_is_mixed_integer'
这是我主要得到的错误:
AttributeError: 'Problem' 对象没有属性 '_compute_once_is_mixed_integer'
这似乎不是特定于 CPLEX 的问题。 github here 中报告了类似的 cvxpy 问题。简而言之:
The stack trace makes it seem like the issue is with your code, not
CVXPY. In particular, it indicates that one of your constraints in
constrlist is a NumPy object.
如果注释掉以下约束:
# Spinning Reserve Constraint
sum(isOn[:, k] * P_MAX) >= Load[k] + SR[k]
那么,求解成功
我正在尝试使用 CVXPY 框架对问题建模并使用 CPLEX 解决问题。
当我 运行 我的代码时,我得到一个 AttributeError: 'Problem' 对象没有属性 '_compute_once_is_mixed_integer'
这是我主要得到的错误:
AttributeError: 'Problem' 对象没有属性 '_compute_once_is_mixed_integer'
这似乎不是特定于 CPLEX 的问题。 github here 中报告了类似的 cvxpy 问题。简而言之:
The stack trace makes it seem like the issue is with your code, not CVXPY. In particular, it indicates that one of your constraints in constrlist is a NumPy object.
如果注释掉以下约束:
# Spinning Reserve Constraint
sum(isOn[:, k] * P_MAX) >= Load[k] + SR[k]
那么,求解成功