SCIP列生成报错:定价终止但无法创建分支问题求助
SCIP列生成程序崩溃问题求助
我基于SCIP的定价回调实现了**松弛/连续多商品流(类似线上VRP示例)**的列生成程序:
- 当有新变量生成时,程序运行完全正常;
- 但当定价回调返回0个新变量时,求解器直接崩溃,核心报错为:
ERROR: pricing was aborted, but no branching could be created!
注:所有变量均为连续型,我未尝试任何分支操作。
每次调用scip_redcost函数时,我会在返回SCIP_OKAY前打印新增变量数,测试示例的运行日志如下:
time | node | left |LP iter|LP it/n|mem/heur|mdpt |vars |cons |rows |cuts |sepa|confs|strbr| dualbound | primalbound | gap | compl. t 0.0s| 1 | 0 | 0 | - | trivial| 0 | 23 | 43 | 0 | 0 | 0 | 0 | 0 | -- | 4.020402e+07 | Inf | unknown * 0.0s| 1 | 0 | 3 | - | LP | 0 | 23 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 4.020402e+02 | Inf | unknown Pricing ends with 3 new variable. 0.0s| 1 | 0 | 12 | - | 746k | 0 | 26 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 4.020402e+02 | Inf | unknown r 0.0s| 1 | 0 | 12 | - |simplero| 0 | 26 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 6.100000e+01 | Inf | unknown Pricing ends with 2 new variable. 0.0s| 1 | 0 | 18 | - | 748k | 0 | 28 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 6.100000e+01 | Inf | unknown r 0.0s| 1 | 0 | 18 | - |simplero| 0 | 28 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 1.500000e+01 | Inf | unknown Pricing ends with 1 new variable. 0.0s| 1 | 0 | 19 | - | 748k | 0 | 29 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 1.500000e+01 | Inf | unknown Pricing ends with 2 new variable. 0.0s| 1 | 0 | 20 | - | 749k | 0 | 31 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 1.500000e+01 | Inf | unknown r 0.0s| 1 | 0 | 20 | - |simplero| 0 | 31 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 1.450000e+01 | Inf | unknown Pricing ends with 0 new variable. 0.0s| 1 | 0 | 20 | - | 751k | 0 | 31 | 43 | 43 | 0 | 0 | 0 | 0 | -- | 1.450000e+01 | Inf | unknown [solve.c:4561] ERROR: pricing was aborted, but no branching could be created! [solve.c:4994] ERROR: Error <-10> in function call [scip_solve.c:2789] ERROR: Error <-10> in function call terminate called after throwing an instance of 'SCIPException' what(): method returned an invalid result code Aborted (core dumped)
目前已知:
- 对偶边界14.5是预期的最优最小值,已生成的列可以组合出最优解;
- 在定价回调中将当前问题导出为
.lp文件并单独求解,能正常得到预期结果。
现在因为问题出在SCIP内部不可见的代码区域,无法定位原因,求有相关经验或对SCIP列生成逻辑熟悉的人提供排查思路。
内容的提问来源于stack exchange,提问作者user2485450
相关产品推荐
相关产品推荐

