Julia 为什么不考虑cplex中解决方案数量的限制?
我正在用Julia JuMP软件包中的CPLEX解决MILP问题。 在CPLEX日志中,解决方案的数量显示为3000多个,但参数CPXPARAM_MIP_Limits_solutions设置为55,因此当解决方案的数量超过55时,解算器应返回。 解决方案数量的激增会导致内存不足错误,因此Linux内核会终止进程 这是日志:Julia 为什么不考虑cplex中解决方案数量的限制?,julia,linear-programming,cplex,mixed-integer-programming,Julia,Linear Programming,Cplex,Mixed Integer Programming,我正在用Julia JuMP软件包中的CPLEX解决MILP问题。 在CPLEX日志中,解决方案的数量显示为3000多个,但参数CPXPARAM_MIP_Limits_solutions设置为55,因此当解决方案的数量超过55时,解算器应返回。 解决方案数量的激增会导致内存不足错误,因此Linux内核会终止进程 这是日志: CPXPARAM_Emphasis_Memory 1 CPXPARAM_Emphasis_MIP
CPXPARAM_Emphasis_Memory 1
CPXPARAM_Emphasis_MIP 2
CPXPARAM_MIP_Limits_Solutions 55
CPXPARAM_TimeLimit 60
Warning: Non-integral bounds for integer variables rounded.
2 of 3 MIP starts provided solutions.
MIP start 'm1' defined initial solution with objective 0.0000.
Warning: Non-integral bounds for integer variables rounded.
Tried aggregator 2 times.
MIP Presolve eliminated 12094 rows and 182224 columns.
MIP Presolve added 26 rows and 0 columns.
MIP Presolve modified 17428 coefficients.
Aggregator did 1 substitutions.
Reduced MIP has 5863 rows, 4313 columns, and 28322 nonzeros.
Reduced MIP has 4132 binaries, 175 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.35 sec. (311.81 ticks)
Probing fixed 3059 vars, tightened 200 bounds.
Probing changed sense of 57 constraints.
Probing time = 0.45 sec. (324.14 ticks)
Cover probing fixed 0 vars, tightened 286 bounds.
Tried aggregator 2 times.
MIP Presolve eliminated 4435 rows and 3257 columns.
MIP Presolve modified 923 coefficients.
Aggregator did 2 substitutions.
Reduced MIP has 1426 rows, 1054 columns, and 7403 nonzeros.
Reduced MIP has 929 binaries, 122 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.02 sec. (19.58 ticks)
Probing time = 0.03 sec. (18.90 ticks)
Tried aggregator 1 time.
MIP Presolve eliminated 5 rows and 3 columns.
MIP Presolve modified 1 coefficients.
Reduced MIP has 1421 rows, 1051 columns, and 7378 nonzeros.
Reduced MIP has 927 binaries, 121 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.01 sec. (7.48 ticks)
Probing time = 0.08 sec. (52.47 ticks)
Clique table members: 6451.
MIP emphasis: optimality.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 32 threads.
Root relaxation solution time = 0.02 sec. (14.70 ticks)
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
* 0+ 0 0.0000 -106269.5431 ---
0 0 -463.9717 61 0.0000 -463.9717 480 ---
0 0 -454.9015 109 0.0000 Cuts: 86 537 ---
0 0 -434.5372 112 0.0000 Cuts: 87 592 ---
0 0 -426.6747 113 0.0000 Cuts: 97 622 ---
0 0 -418.6204 136 0.0000 Cuts: 62 660 ---
0 0 -413.7867 132 0.0000 Cuts: 55 698 ---
0 0 -409.6387 140 0.0000 Cuts: 16 721 ---
0 0 -407.9923 135 0.0000 Cuts: 39 739 ---
0 0 -407.0012 148 0.0000 Cuts: 34 760 ---
0 0 -406.3034 149 0.0000 Cuts: 11 775 ---
0 0 -405.7757 134 0.0000 Cuts: 17 784 ---
0 0 -405.4831 148 0.0000 Cuts: 59 804 ---
0 2 -405.4831 145 0.0000 -118.6877 804 ---
Elapsed time = 2.12 sec. (1148.70 ticks, tree = 0.02 MB, solutions = 2)
* 282 17 integral 0 0.0000 -118.6877 3889 ---
6415 1365 -0.0974 1 0.0000 -0.1947 20809 ---
11118 1933 -348.8038 138 0.0000 -0.1947 37285 ---
* 11185 11 integral 0 0.0000 -0.1947 37522 ---
* 11206 16 integral 0 -0.0000 -0.1947 37594 ---
12049 384 -0.0974 1 -0.0000 -0.1947 39994 ---
13976 1504 -0.0974 1 -0.0000 -0.1947 44560 ---
15081 1894 -0.0974 1 -0.0000 -0.1947 47408 ---
16098 2205 -0.0000 0 -0.0000 -0.1947 49781 ---
17468 2844 -0.0974 1 -0.0000 -0.1947 52969 ---
18578 3322 -0.0000 0 -0.0000 -0.1947 56013 ---
19990 1939 -0.0000 0 -0.0000 -0.1947 61970 ---
Elapsed time = 14.88 sec. (4728.96 ticks, tree = 2.14 MB, solutions = 3127)
21354 555 cutoff -0.0000 -0.1947 67537 ---
26500 824 -0.0974 1 -0.0000 -0.1431 79682 ---
Killed
版本:
CPLEX 12.9.0
朱莉娅1.2.0
跳跃0.20.1
编辑:
参数控制停止优化之前要找到的现有解决方案的最大数量。但是,该数字不足以控制解算器保存在内存中的解的数量,因为可能存在多个解在其目标函数值方面相等的情况,在这种情况下,它们仅计算一个解。因此,为了避免由解算器存储的解决方案导致的内存消耗,正确的参数是(控制解算器探索的解决方案数量)我将其设置为0(因为我不想返回CPLEX探索的所有解决方案,而只是最好的一个)。
在此配置之后,程序在没有被内核终止的情况下终止其运行。解决方案的数量很可能不是内存不足错误的原因。它是分支和绑定树的大小以及需要存储和处理的节点数。您应该尝试限制用于减少内存占用的线程数量 此外,还没有找到那么多合适的解决方案。对于每个新任职者,您会在相应行的开头看到一个标记(
*
或H
),例如
* 282 17 integral 0 0.0000 -118.6877 3889 ---
6415 1365 -0.0974 1 0.0000 -0.1947 20809 ---
11118 1933 -348.8038 138 0.0000 -0.1947 37285 ---
* 11185 11 integral 0 0.0000 -0.1947 37522 ---
* 11206 16 integral 0 -0.0000 -0.1947 37594 ---
12049 384 -0.0974 1 -0.0000 -0.1947 39994 ---
我不知道日志中报告的解决方案数量是多少。这些可能是无法改善目标的其他解决方案
请注意参数CPXPARAM\u MIP\u Limits\u Solutions的说明,请参见:
设置停止前要找到的MIP解决方案数
此整数解决方案限制不适用于生成要存储在解决方案池中的解决方案的填充过程。有关通过“填充”生成的解决方案数量的限制,请参见“填充限制”参数:通过“填充”为解决方案池生成的最大解决方案数量
您可能还想检查一下