【C++/Cplex/Benders】bug:2000,2002,2004

本文针对CPLEX求解过程中出现的几种常见错误进行了解析,包括2002、2004及2000错误,并提供了可能的解决办法。如在Benders分解中变量类型不当或约束设置不合理等问题。
【CPLEX Error  2002: Invalid Benders decomposition.】
CPXERR_BAD_DECOMPOSITION 2002

Benders decomposition is invalid. No master or worker variables specified, or worker variables contain noncontinuous variables. This error can also occur if a given variable is annotated with a value strictly less than zero.

可能是问题太简单


【CPLEX Error  2004: problem not compatible with Benders.】
CPXERR_NOT_FOR_BENDERS 2004
Benders algorithm is incompatible with the problem at hand: Ranged constraints, SOS, indicators or other general constraints present.


情景1,主问题中存在类似“x1+x2<=2”的约束,可以修改成“x1+x2+c = 0”和“0<=c<=2”

情景1说明,当利用命令行直接读入保存的.lp和.ann文件,所保存的.lp文件中很可能已经有cplex自行添加的作用同“c”的变量


【CPLEX Error 2000】
CPXERR_NO_DECOMPOSITION 2000
Benders algorithm needs a decomposition of the variables to function.


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值