OR-Tools求解器(CBC(Coin-or branch and cut))日志解度

2024-06-08 10:20

本文主要是介绍OR-Tools求解器(CBC(Coin-or branch and cut))日志解度,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

使用OR-Tools的CBC求解器,解决混合整数规划问题,solver.EnableOutput() 打印日志输出如下:

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1717640012.742815   19876 linear_solver.cc:2128] SetSolverSpecificParametersAsString() not supported by Cbc 2.10.7
W0000 00:00:1717640012.743008   19876 linear_solver.cc:2128] SetSolverSpecificParametersAsString() not supported by Cbc 2.10.7
W0000 00:00:1717640012.743045   19876 linear_solver.cc:2128] SetSolverSpecificParametersAsString() not supported by Cbc 2.10.7
Welcome to the CBC MILP Solver 
Version: 2.10.7 
Build Date: May  6 2024 

第一部分报了警告:是应为我在程序中使用SetSolverSpecificParametersAsString()设施求解参数,而CBC求解器不支持此语法。

command line - cbc -solve -quit (default strategy 1)

这些信息是求解器在运行时输出的命令行参数和策略,具体解释如下:

  • command line:表示求解器正在解析命令行参数。
  • cbc:表示使用的是 CBC 求解器。CBC 是一个开源的混合整数线性规划(MILP)求解器。
  • solve:表示求解器将开始求解问题。
  • quit:表示求解器在完成求解后将退出。
  • (default strategy 1):表示求解器正在使用默认的策略 1 来求解问题。
Presolve 83 (-306) rows, 144 (-161) columns and 408 (-496) elements

求解器在预处理(presolve)阶段输出的:

  • 83 (-306) rows:表示预处理后问题中剩余的约束行数为 83 行,原始问题中有 83 + 306 = 389 行。括号中的数字表示预处理阶段减少的行数。
  • 144 (-161) columns:表示预处理后问题中剩余的变量列数为 144 列,原始问题中有 144 + 161 = 305 列。括号中的数字表示预处理阶段减少的列数。
  • 408 (-496) elements:表示预处理后问题中剩余的非零元素数为 408 个,原始问题中有 408 + 496 = 904 个非零元素。括号中的数字表示预处理阶段减少的非零元素数。

这些信息表明,预处理阶段成功地简化了问题,减少了约束行数、变量列数和非零元素数,从而可能加快求解速度。

Perturbing problem by 0.001% of 9826.062 - largest nonzero change 0.010255166 ( 0.00011093296%) - largest zero change 0.0096304316

Perturbing problem:表示求解器正在对问题进行扰动。扰动是求解器在处理数值稳定性问题时常用的一种技术,通过对问题的系数进行微小的调整来避免数值不稳定性。

  • 0.001% of 9826.062:表示扰动的幅度是原问题某个值(通常是目标函数值或某个约束的系数)的 0.001%。在这个例子中,原问题的某个值是 9826.062。
  • largest nonzero change 0.010255166 ( 0.00011093296%):表示在扰动过程中,非零系数的最大变化是 0.010255166,对应的百分比变化是 0.00011093296%。
  • largest zero change 0.0096304316:表示在扰动过程中,零系数的最大变化是 0.0096304316。
0  Obj 10803.123 Primal inf 205784.52 (24)
  • 0 和 37:这些数字表示迭代次数。0 表示初始迭代,37 表示第 37 次迭代。
  • Obj 10803.123 和 Obj 24135562:这些表示当前迭代的目标函数值。Obj 10803.123 表示在第 0 次迭代时的目标函数值为 10803.123,Obj 24135562 表示在第 37 次迭代时的目标函数值为 24135562。
  • Primal inf 205784.52 (24):这表示当前迭代的原始可行性(Primal Infeasibility)。Primal inf 205784.52 表示原始可行性为 205784.52,(24) 表示有 24 个约束不满足。
    37 Obj 24135562
    Optimal - objective value 24123912
After Postsolve, objective 24123912, infeasibilities - dual 0 (0), primal 0 (0)

表示在后处理阶段之后,目标函数值仍然是 24123912。双重可行性和原始可行性都没有不满足的约束。括号中的数字表示不满足的约束数量。

Optimal objective 24123912.4 - 37 iterations time 0.002, Presolve 0.00

表示最优目标函数值为 24123912.4。 37 次迭代。求解器花费了 0.002 秒来找到最优解。预处理阶段花费了 0.00 秒。

Continuous objective value is 2.41239e+07 - 0.00 seconds

表示连续优化问题的目标函数值为 2.41239e+07(即 24123900)。0.00 seconds:求解器花费了 0.00 秒来解决连续优化问题。

Optimal - objective value 24123912
Optimal - objective value 24123912

表示求解器找到了一个最优解,目标函数值为 24123912。

Presolve is modifying 112 integer bounds and re-presolving
Presolve 83 (-306) rows, 144 (-161) columns and 408 (-496) elements
Perturbing problem by 0.001% of 9490.9748 - largest nonzero change 0.092517803 ( 0.0013972213%) - largest zero change 0.0090802042
0 Obj 24123828 Primal inf 1650.3013 (8)
Optimal - objective value 24135729
Presolve 82 (-1) rows, 136 (-8) columns and 384 (-24) elements
0 Obj 24135729
Optimal - objective value 24135729

2 fixed, 22 tightened bounds, 15 strengthened rows, 0 substitutions
0 fixed, 0 tightened bounds, 11 strengthened rows, 0 substitutions

2 fixed:表示有 2 个变量的值被固定。22 tightened bounds:表示有 22 个变量的上下界被收紧。15 strengthened rows:表示有 15 个约束被加强。0 substitutions:表示没有进行变量替换。

Perturbing problem by 0.001% of 50200.744 - largest nonzero change 0.52348981 ( 0.0018249885%) - largest zero change 0
0  Obj 8.7999294e+08 Primal inf 0.94600478 (1)
Optimal - objective value 8.7998479e+08
Presolve 55 (-27) rows, 118 (-18) columns and 324 (-55) elements
0  Obj 8.7998479e+08 Dual inf 25838.845 (26)
End of values pass after 8 iterations
8  Obj 8.7998479e+08
Optimal - objective value 8.7998479e+08
0 fixed, 0 tightened bounds, 7 strengthened rows, 0 substitutions
Optimal - objective value 8.7998479e+08
Presolve 55 (0) rows, 118 (0) columns and 324 (0) elements
0  Obj 8.7998479e+08
Optimal - objective value 8.7998479e+08
Optimal - objective value 8.7998479e+08
processed model has 55 rows, 118 columns (103 integer (15 of which binary)) and 324 elements
0  Obj 8.7998479e+08
Optimal - objective value 8.7998479e+08
Optimal - objective value 8.7998479e+08
Optimal - objective value 8.7998479e+08
Perturbing problem by 0.001% of 45179.542 - largest nonzero change 0.4004851 ( 0.0014261159%) - largest zero change 0
0  Obj 8.7999298e+08 Primal inf 0.010064455 (1)
Optimal - objective value 8.8120111e+08
Perturbing problem by 0.001% of 16079.946 - largest nonzero change 0.1578917 ( 0.0057692749%) - largest zero change 0
0  Obj 8.8121544e+08 Primal inf 0.042442964 (1)
Optimal - objective value 8.8632631e+08
Perturbing problem by 0.001% of 14837.307 - largest nonzero change 0.14595076 ( 0.0042784222%) - largest zero change 0
0  Obj 8.8633695e+08 Primal inf 0.044032345 (1)
Optimal - objective value 8.9093847e+08
Perturbing problem by 0.001% of 2588.2686 - largest nonzero change 0.027219616 ( 0.0013344975%) - largest zero change 0
0  Obj 8.9094367e+08 Primal inf 0.056128932 (1)
Primal infeasible - objective value 8.9625252e+08
0  Obj 8.9093847e+08 Primal inf 0.056128932 (1)
Optimal - objective value 8.9577102e+08
Perturbing problem by 0.001% of 3943.0556 - largest nonzero change 0.023950599 ( 0.001923448%) - largest zero change 0
0  Obj 8.9577605e+08 Primal inf 0.08153115 (1)
Primal infeasible - objective value 9.0412493e+08
0  Obj 8.9577102e+08 Primal inf 0.08153115 (1)
Optimal - objective value 9.012743e+08
Perturbing problem by 0.001% of 3952.6997 - largest nonzero change 0.031573503 ( 0.0025204829%) - largest zero change 0
0  Obj 9.012794e+08 Primal inf 0.10634911 (1)
Primal infeasible - objective value 9.1199952e+08
0  Obj 9.012743e+08 Primal inf 0.10634911 (1)
10  Obj 9.0766207e+08 Primal inf 625.5749 (3)
Primal infeasible - objective value 9.0766207e+08
0  Obj 9.012743e+08 Primal inf 0.89365069 (1)
Optimal - objective value 9.063143e+08
Perturbing problem by 0.001% of 3952.6997 - largest nonzero change 0.031573503 ( 0.0022356794%) - largest zero change 0
0  Obj 9.0631798e+08 Primal inf 0.13491793 (1)
Primal infeasible - objective value 9.1948609e+08
0  Obj 9.063143e+08 Primal inf 0.13491793 (1)
8  Obj 9.1744844e+08 Primal inf 2375.7886 (2)
Primal infeasible - objective value 9.1744844e+08
0  Obj 9.063143e+08 Primal inf 0.86508187 (1)
Optimal - objective value 9.111943e+08
Perturbing problem by 0.001% of 3952.6997 - largest nonzero change 0.031573503 ( 0.0020079014%) - largest zero change 0
0  Obj 9.1119687e+08 Primal inf 0.52219779 (1)
Optimal - objective value 9.111943e+08
Perturbing problem by 0.001% of 3877.3191 - largest nonzero change 0.0016191669 ( 0.0019209201%) - largest zero change 0
0  Obj 9.1119677e+08 Primal inf 5.9666267 (1)
Optimal - objective value 9.1119527e+08
Perturbing problem by 0.001% of 1041.3649 - largest nonzero change 0.00072607783 ( 0.00086139208%) - largest zero change 0
0  Obj 9.1119637e+08 Primal inf 69.33954 (1)
Primal infeasible - objective value 9.1120174e+08
Perturbing problem by 0.001% of 3877.3191 - largest nonzero change 0.034124995 ( 0.0019209201%) - largest zero change 0
0  Obj 9.1119772e+08 Primal inf 19.032206 (1)
Primal infeasible - objective value 9.1120309e+08
Perturbing problem by 0.001% of 3877.3191 - largest nonzero change 0.034124995 ( 0.0019209201%) - largest zero change 0
0  Obj 9.1119772e+08 Primal inf 6.0976944 (1)
Optimal - objective value 9.112184e+08
Perturbing problem by 0.001% of 82.182157 - largest nonzero change 8.7260408e-05 ( 0.00037716099%) - largest zero change 0
0  Obj 9.1121888e+08 Primal inf 0.057053553 (1)
Optimal - objective value 9.112184e+08
Perturbing problem by 0.001% of 1963064.5 - largest nonzero change 0.015666646 ( 0.078219213%) - largest zero change 0
0  Obj 9.1126378e+08 Primal inf 0.018767964 (1)
Primal infeasible - objective value 9.1126378e+08
Perturbing problem by 0.001% of 82.182157 - largest nonzero change 8.7260408e-05 ( 0.00037716099%) - largest zero change 6.5628788e-05
0  Obj 9.1121917e+08 Primal inf 0.018767964 (1)
Primal infeasible - objective value 9.1121917e+08
Perturbing problem by 0.001% of 82.182157 - largest nonzero change 8.7260408e-05 ( 0.00037716099%) - largest zero change 6.5628788e-05
0  Obj 9.1121917e+08 Primal inf 0.020169728 (1)
Optimal - objective value 9.112184e+08
0  Obj 8.6103248e+08 Primal inf 16623810 (9)
Optimal - objective value 9.112184e+08

和上面的一样。

Integer solution of 9.112184e+08 found by DiveCoefficient after 0 iterations and 0 nodes (0.01 seconds)

表示求解器找到了一个整数解,目标函数值为 9.1208831e+08(即 912088310)。找到整数解的策略是 DiveCoefficient(种启发式方法,用于在分支定界算法中快速找到可行解)。0 iterations:表示求解器在找到整数解之前没有进行任何迭代。0 nodes:表示求解器在找到整数解之前没有探索任何节点。

Presolve 30 (-25) rows, 32 (-86) columns and 71 (-253) elements
Presolve 30 (-25) rows, 32 (-86) columns and 71 (-253) elements
Presolve 26 (-4) rows, 28 (-4) columns and 63 (-8) elements
processed model has 26 rows, 28 columns (18 integer (5 of which binary)) and 63 elements
Full problem 55 rows 118 columns, reduced to 26 rows 28 columns
Exiting on maximum solutions
Partial search - best objective 1e+50 (best possible 8.8990479e+08), took 0 iterations and 0 nodes (0.02 seconds)
Maximum depth 0, 0 variables fixed on reduced cost
Optimal - objective value 8.7998479e+08
Perturbing problem by 0.001% of 18299.794 - largest nonzero change 0.60002465 ( 0.021224685%) - largest zero change 0
0  Obj 8.8003794e+08 Primal inf 41723.835 (27)
42  Obj 8.9654007e+08 Primal inf 96.468602 (3)
Optimal - objective value 8.965096e+08
Optimal - objective value 8.965096e+08
Perturbing problem by 0.001% of 626813.98 - largest nonzero change 0.79621452 ( 0.0095952248%) - largest zero change 0
0  Obj 8.9650894e+08 Primal inf 147331.73 (36)
36  Obj 9.0916019e+08
Optimal - objective value 9.0916037e+08
Optimal - objective value 9.0916037e+08
Perturbing problem by 0.001% of 730088.61 - largest nonzero change 0.77766175 ( 0.0040636189%) - largest zero change 0
0  Obj 9.0916015e+08 Primal inf 17777.811 (19)
18  Obj 9.1058984e+08 Dual inf 0.080854872 (1)
19  Obj 9.1058984e+08
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 248911.25 - largest nonzero change 0.75970928 ( 0.82579228%) - largest zero change 0
0  Obj 9.1057041e+08 Primal inf 0.99493945 (13)
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 297548.55 - largest nonzero change 0.28994923 ( 0.82578863%) - largest zero change 0
0  Obj 9.1058031e+08 Primal inf 1.3621969 (5)
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 280965.61 - largest nonzero change 0.36464889 ( 0.42667669%) - largest zero change 0
0  Obj 9.1057553e+08 Primal inf 0.0006394539 (2)
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 280965.61 - largest nonzero change 0.36464889 ( 0.42667669%) - largest zero change 0
0  Obj 9.1057553e+08 Primal inf 0.0010588266 (1)
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 286491.66 - largest nonzero change 0.61230549 ( 0.6445745%) - largest zero change 0
0  Obj 9.1057443e+08 Primal inf 7.4716279e-08 (1)
Optimal - objective value 9.1058984e+08
Perturbing problem by 0.001% of 283794.29 - largest nonzero change 0.62536667 ( 0.091800681%) - largest zero change 0
0  Obj 9.1058749e+08 Primal inf 2.2824658e-07 (1)
Optimal - objective value 9.1058988e+08
Perturbing problem by 0.001% of 211815.68 - largest nonzero change 0.30098052 ( 0.0896939%) - largest zero change 0
0  Obj 9.1058781e+08 Primal inf 2.6658051e-07 (1)
Optimal - objective value 9.1058988e+08
Perturbing problem by 0.001% of 207388.32 - largest nonzero change 0.090636653 ( 0.00013149838%) - largest zero change 0
0  Obj 9.1058988e+08 Primal inf 3.9552527e-07 (1)
Optimal - objective value 9.1058989e+08
Perturbing problem by 0.001% of 51812.943 - largest nonzero change 0.00053109911 ( 8.7888576e-05%) - largest zero change 0
0  Obj 9.1058989e+08 Primal inf 4.2547754e-07 (1)
Optimal - objective value 9.1058993e+08
0  Obj 9.1058993e+08 Primal inf 4.8127331e-07 (1)
Optimal - objective value 9.1058997e+08
0  Obj 9.1058997e+08 Primal inf 0.0082739516 (1)
Optimal - objective value 9.1058998e+08
0  Obj 9.1058998e+08 Primal inf 0.61623498 (1)
Primal infeasible - objective value 9.1058998e+08
0  Obj 9.1058998e+08 Primal inf 0.61623498 (1)
Primal infeasible - objective value 9.1058998e+08
0  Obj 9.1058998e+08 Primal inf 0.81197869 (1)
Optimal - objective value 9.1059336e+08
Perturbing problem by 0.001% of 5664520.9 - largest nonzero change 0.056310113 ( 0.011045629%) - largest zero change 0
0  Obj 9.1059336e+08 Primal inf 0.87522586 (1)
Primal infeasible - objective value 9.1059336e+08
Perturbing problem by 0.001% of 5152718.3 - largest nonzero change 0.051222373 ( 0.010048127%) - largest zero change 0
0  Obj 9.1059336e+08 Primal inf 0.87522586 (1)
Primal infeasible - objective value 9.1059336e+08
Perturbing problem by 0.001% of 5152718.3 - largest nonzero change 0.051222373 ( 0.010048127%) - largest zero change 0
0  Obj 9.1059336e+08 Primal inf 0.84804365 (1)
Optimal - objective value 9.1067422e+08
Perturbing problem by 0.001% of 5664520.9 - largest nonzero change 0.056310113 ( 0.011045629%) - largest zero change 0
0  Obj 9.1067422e+08 Primal inf 5.744537 (1)
Primal infeasible - objective value 9.1067422e+08
Perturbing problem by 0.001% of 5152718.3 - largest nonzero change 0.051222373 ( 0.010048127%) - largest zero change 0
0  Obj 9.1067422e+08 Primal inf 5.744537 (1)
Primal infeasible - objective value 9.1067422e+08
Perturbing problem by 0.001% of 5152718.3 - largest nonzero change 0.051222373 ( 0.010048127%) - largest zero change 0
0  Obj 9.1067422e+08 Primal inf 0.0026365485 (1)
Optimal - objective value 9.1067447e+08
0  Obj 8.6099296e+08 Primal inf 16659683 (10)
Optimal - objective value 9.1067447e+08
Integer solution of 9.1067447e+08 found by DiveCoefficient after 116 iterations and 0 nodes (0.04 seconds)
26 added rows had average density of 10.807692
At root node, 26 cuts changed objective from 8.7998479e+08 to 9.1058984e+08 in 8 passes
Cut generator 0 (Probing) - 32 row cuts average 7.3 elements, 2 column cuts (2 active)  in 0.006 seconds - new frequency is 1
Cut generator 1 (Gomory) - 33 row cuts average 15.3 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is 1
Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
Cut generator 3 (Clique) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is -100
Cut generator 4 (MixedIntegerRounding2) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.001 seconds - new frequency is -100
Cut generator 5 (FlowCover) - 0 row cuts average 0.0 elements, 0 column cuts (0 active)  in 0.002 seconds - new frequency is -100
Cut generator 6 (TwoMirCuts) - 33 row cuts average 19.2 elements, 0 column cuts (0 active)  in 0.000 seconds - new frequency is 1
Optimal - objective value 9.1058984e+08
Optimal - objective value 9.1058984e+08
Exiting as integer gap of 84629.782 less than 1e-10 or 0.01%

Exiting:表示求解器正在退出求解过程。
integer gap of 84629.782:表示整数间隙(integer gap)为 84629.782。整数间隙是当前最优整数解和当前最优松弛解(通常是线性松弛解)之间的差距。
less than 1e-10 or 0.01%:表示整数间隙小于 1e-10 或 0.01%(相对MIP间隙)。求解器通常会在整数间隙小于某个阈值时停止求解,因为此时认为已经找到了足够接近最优解的解。

Search completed - best objective 910674469.96, took 116 iterations and 0 nodes (0.04 seconds)
Maximum depth 0, 0 variables fixed on reduced cost
0  Obj 8.6099296e+08 Primal inf 16659683 (10)
Optimal - objective value 9.1067447e+08
Perturbing problem by 0.001% of 3828.9168 - largest nonzero change 5.0210043e-05 ( 2.0875811e-05%) - largest zero change 0
0  Obj 8.8639928e+08 Primal inf 35240.692 (12)
11  Obj 9.1067448e+08 Primal inf 0.090200173 (2)
Optimal - objective value 9.1067447e+08
Cuts at root node changed objective from 8.79985e+08 to 9.1059e+08
Probing was tried 8 times and created 34 cuts of which 0 were active after adding rounds of cuts (0.006 seconds)
Gomory was tried 8 times and created 33 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 8 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 8 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 8 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.001 seconds)
FlowCover was tried 8 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.002 seconds)
TwoMirCuts was tried 8 times and created 33 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 1 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Optimal - objective value 9.1067447e+08
Optimal - objective value 9.1067447e+08
Perturbing problem by 0.001% of 2462.7962 - largest nonzero change 0.019792733 ( 0.015754388%) - largest zero change 0
0  Obj 5.6154927e+08 Primal inf 74100000 (3) Dual inf 9.3399997 (3)
6  Obj 9.1071151e+08
Optimal - objective value 9.1067447e+08
Optimal - objective value 9.1067447e+08
Presolve 0 (-389) rows, 0 (-305) columns and 0 (-904) elements
Crash put 135 variables in basis, 0 dual infeasibilities
Optimal - objective value 9.1067447e+08
After Postsolve, objective 9.1067447e+08, infeasibilities - dual 0 (0), primal 0 (0)
Optimal - objective value 9.1067447e+08
Perturbing problem by 0.001% of 21924.896 - largest nonzero change 0.01840472 ( 0.079455288%) - largest zero change 0.017904698
0  Obj 1.04e+08 Primal inf 39014022 (51)
51  Obj 9.1070059e+08
Optimal - objective value 9.1067447e+08
Presolve determined that the problem was infeasible with tolerance of 1e-08
Optimal - objective value 9.1067447e+08Result - Optimal solution found (within gap tolerance)
Objective value:                910674469.96000004
Lower bound:                    910589840.178
Gap:                            0.00
Enumerated nodes:               0
Total iterations:               116
Time (CPU seconds):             0.05
Time (Wallclock seconds):       0.05Total time (CPU seconds):       0.05   (Wallclock seconds):       0.05
  • Objective value: 910674469.96000004,这是求解器找到的目标函数的值,也就是优化问题的解。这个值表示在当前解下,目标函数的值是 910674469.96000004。
  • Lower bound: 910589840.178,对于某些类型的优化问题(如整数规划),求解器会计算一个下界来帮助评估当前解的质量。
  • Gap: 0.00,间隙:这是目标值和下界之间的相对差距,通常表示为百分比。间隙为 0.00 表示求解器找到了一个最优解,或者当前解与下界之间的差距非常小,可以认为是最优解。
  • Enumerated nodes: 0,枚举的节点数:这是求解器在搜索过程中枚举的节点数。对于某些类型的优化问题(如分支定界法),求解器会枚举不同的节点来找到最优解。在这个例子中,枚举的节点数为 0,可能表示求解器在初始节点就找到了最优解。
  • Total iterations: 116,总迭代次数:这是求解器在求解过程中进行的迭代次数。迭代次数为 116 表示求解器在找到最优解之前进行了 116 次迭代。
  • Time (CPU seconds): 0.05,CPU 时间:这是求解器在求解过程中使用的 CPU 时间,单位是秒。在这个例子中,求解器使用了 0.05 秒的 CPU 时间。
  • Time (Wallclock seconds): 0.05,墙钟时间:这是求解器在求解过程中使用的实际时间,单位是秒。墙钟时间为 0.05 秒表示求解器在实际时间中用了 0.05 秒来找到解。

这篇关于OR-Tools求解器(CBC(Coin-or branch and cut))日志解度的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1041912

相关文章

pip-tools:打造可重复、可控的 Python 开发环境,解决依赖关系,让代码更稳定

在 Python 开发中,管理依赖关系是一项繁琐且容易出错的任务。手动更新依赖版本、处理冲突、确保一致性等等,都可能让开发者感到头疼。而 pip-tools 为开发者提供了一套稳定可靠的解决方案。 什么是 pip-tools? pip-tools 是一组命令行工具,旨在简化 Python 依赖关系的管理,确保项目环境的稳定性和可重复性。它主要包含两个核心工具:pip-compile 和 pip

flume系列之:查看flume系统日志、查看统计flume日志类型、查看flume日志

遍历指定目录下多个文件查找指定内容 服务器系统日志会记录flume相关日志 cat /var/log/messages |grep -i oom 查找系统日志中关于flume的指定日志 import osdef search_string_in_files(directory, search_string):count = 0

我在移动打工的日志

客户:给我搞一下录音 我:不会。不在服务范围。 客户:是不想吧 我:笑嘻嘻(气笑) 客户:小姑娘明明会,却欺负老人 我:笑嘻嘻 客户:那我交话费 我:手机号 客户:给我搞录音 我:不会。不懂。没搞过。 客户:那我交话费 我:手机号。这是电信的啊!!我这是中国移动!! 客户:我不管,我要充话费,充话费是你们的 我:可是这是移动!!中国移动!! 客户:我这是手机号 我:那又如何,这是移动!你是电信!!

【Tools】大模型中的自注意力机制

摇来摇去摇碎点点的金黄 伸手牵来一片梦的霞光 南方的小巷推开多情的门窗 年轻和我们歌唱 摇来摇去摇着温柔的阳光 轻轻托起一件梦的衣裳 古老的都市每天都改变模样                      🎵 方芳《摇太阳》 自注意力机制(Self-Attention)是一种在Transformer等大模型中经常使用的注意力机制。该机制通过对输入序列中的每个元素计算与其他元素之间的相似性,

【Tools】AutoML简介

摇来摇去摇碎点点的金黄 伸手牵来一片梦的霞光 南方的小巷推开多情的门窗 年轻和我们歌唱 摇来摇去摇着温柔的阳光 轻轻托起一件梦的衣裳 古老的都市每天都改变模样                      🎵 方芳《摇太阳》 AutoML(自动机器学习)是一种使用机器学习技术来自动化机器学习任务的方法。在大模型中的AutoML是指在大型数据集上使用自动化机器学习技术进行模型训练和优化。

【Tools】大模型中的注意力机制

摇来摇去摇碎点点的金黄 伸手牵来一片梦的霞光 南方的小巷推开多情的门窗 年轻和我们歌唱 摇来摇去摇着温柔的阳光 轻轻托起一件梦的衣裳 古老的都市每天都改变模样                      🎵 方芳《摇太阳》 在大模型中,注意力机制是一种重要的技术,它被广泛应用于自然语言处理领域,特别是在机器翻译和语言模型中。 注意力机制的基本思想是通过计算输入序列中各个位置的权重,以确

Detectorn2预训练模型复现:数据准备、训练命令、日志分析与输出目录

Detectorn2预训练模型复现:数据准备、训练命令、日志分析与输出目录 在深度学习项目中,目标检测是一项重要的任务。本文将详细介绍如何使用Detectron2进行目标检测模型的复现训练,涵盖训练数据准备、训练命令、训练日志分析、训练指标以及训练输出目录的各个文件及其作用。特别地,我们将演示在训练过程中出现中断后,如何使用 resume 功能继续训练,并将我们复现的模型与Model Zoo中的

SSM项目使用AOP技术进行日志记录

本步骤只记录完成切面所需的必要代码 本人开发中遇到的问题: 切面一直切不进去,最后发现需要在springMVC的核心配置文件中中开启注解驱动才可以,只在spring的核心配置文件中开启是不会在web项目中生效的。 之后按照下面的代码进行配置,然后前端在访问controller层中的路径时即可观察到日志已经被正常记录到数据库,代码中有部分注释,看不懂的可以参照注释。接下来进入正题 1、导入m

多数据源的事务处理总是打印很多无用的log日志

之前做了一个项目,需要用到多数据源以及事务处理,在使用事务处理,服务器总是打印很多关于事务处理的log日志(com.atomikos.logging.Slf4jLogger),但是我们根本不会用到这些log日志,反而使得查询一些有用的log日志变得困难。那要如何屏蔽这些log日志呢? 之前的项目是提高项目打印log日志的级别,后来觉得这样治标不治本。 现在有一个更好的方法: 我使用的是log

android两种日志获取log4j

android   log4j 加载日志使用方法; 先上图: 有两种方式: 1:直接使用架包 加载(两个都要使用); 架包:android-logging-log4j-1.0.3.jar 、log4j-1.2.15.jar  (说明:也可以使用架包:log4j-1.2.17.jar)  2:对架包输入日志的二次封装使用; 1:直接使用 log4j 日志框架获取日志信息: A:配置 日志 文