Julia - 了解 JuMP Gurobi 输出
Julia - Understanding JuMP Gurobi outputs
我经常将 Gurobi 与 JuMP 结合使用,我注意到它的输出中仍有部分我不理解。除非它被记录在某处并且 link 是最受欢迎的,你能帮助理解以下内容吗? :)
Found heuristic solution: objective 5820.0000000
Presolve removed 33 rows and 11 columns
Presolve time: 0.00s
Presolved: 607 rows, 331 columns, 2445 nonzeros
Variable types: 111 continuous, 220 integer (220 binary)
Root relaxation: objective 1.157500e+03, 64 iterations, 0.00 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 1157.50000 0 25 5820.00000 1157.50000 80.1% - 0s
H 0 0 2535.0000000 1157.50000 54.3% - 0s
0 0 1236.00000 0 23 2535.00000 1236.00000 51.2% - 0s
0 0 1273.65351 0 41 2535.00000 1273.65351 49.8% - 0s
0 0 1274.59375 0 41 2535.00000 1274.59375 49.7% - 0s
0 0 1274.69841 0 42 2535.00000 1274.69841 49.7% - 0s
0 0 1309.98305 0 42 2535.00000 1309.98305 48.3% - 0s
0 0 1310.26027 0 42 2535.00000 1310.26027 48.3% - 0s
0 0 1340.01176 0 47 2535.00000 1340.01176 47.1% - 0s
0 0 1342.47826 0 49 2535.00000 1342.47826 47.0% - 0s
0 0 1342.60000 0 49 2535.00000 1342.60000 47.0% - 0s
0 0 1362.32468 0 50 2535.00000 1362.32468 46.3% - 0s
0 0 1363.08000 0 49 2535.00000 1363.08000 46.2% - 0s
0 0 1363.13077 0 49 2535.00000 1363.13077 46.2% - 0s
0 0 1370.79545 0 53 2535.00000 1370.79545 45.9% - 0s
0 0 1375.50000 0 52 2535.00000 1375.50000 45.7% - 0s
0 0 1375.50000 0 52 2535.00000 1375.50000 45.7% - 0s
0 0 1376.70025 0 52 2535.00000 1376.70025 45.7% - 0s
0 0 1376.70122 0 53 2535.00000 1376.70122 45.7% - 0s
0 0 1376.70122 0 53 2535.00000 1376.70122 45.7% - 0s
0 2 1376.98418 0 53 2535.00000 1376.98418 45.7% - 0s
* 255 157 14 2457.0000000 1473.00000 40.0% 22.5 0s
H 407 223 2397.0000000 1548.00000 35.4% 20.3 0s
* 1962 758 22 2355.0000000 1772.85714 24.7% 16.8 0s
*14326 2205 27 2343.0000000 2088.50000 10.9% 15.7 3s
据我所知,按出现顺序:
预求解
- 找到启发式解法:objective5820,Gurobi 启动了预求解,找到了一个值为 5820
的解法
- Presolve 移除 33 个多余或无用的变量以及 11 个约束?
- Presvoled: 预求解模型的大小
- 变量类型:有些是二元的,有些是连续的。
- 根弛豫: LP 弛豫的 objective 为 1 157.5
节点
- Expl (1): * empty or H, 我不知道有这些符号时的区别,但我注意到所有行都带有给定符号 (H, * , 或空) 将有相同的输出。
- Expl and Unexpl求解树中已探索节点和未探索节点的数量。
当前节点
- Obj: objective of current node being explored?
- 深度: 当前正在求解的树的深度
- IntInf:我不知道这个
Objective 界限
- Incumbent:找到的最佳有效解决方案的当前值
- BestBd: 当前找到的最佳下限
- 差距:这可能是当前最佳解决方案和最佳边界之间的差距,但我无法推断出它是如何计算的。
工作
- It/Node:这里需要找出什么是迭代
- 时间: 到那时为止解决问题的时间。
详情请见https://www.gurobi.com/documentation/9.1/refman/mip_logging.html。
让我只引用那些回答你问题的人:
The Nodes
section (the first two columns) provides general quantitative information on the progress of the search. The first column shows the number of branch-and-cut nodes that have been explored to that point, while the second shows the number of leaf nodes in the search tree that remain unexplored. At times, there will be an H or * character at the beginning of the output line. These indicate that a new feasible solution has been found, either by a MIP heuristic (H) or by branching (*).
The Current Node
section provides information on the specific node that was explored at that point in the branch-and-cut tree. It shows the objective of the associated relaxation, the depth of that node in the branch-and-cut tree, and the number of integer variables that have non-integral values in the associated relaxation.
The Objective Bounds
section provides information on the best known objective value for a feasible solution (i.e., the objective value of the current incumbent), and the current objective bound provided by leaf nodes of the search tree. The optimal objective value is always between these two values. The third column in this section (Gap
) shows the relative gap between the two objective bounds. When this gap is smaller than the MIPGap
parameter, optimization terminates.
The Work
section of the log provides information on how much work has been performed to that point. The first column shows the average number of simplex iterations performed per node in the branch-and-cut tree. The final column shows the elapsed time since the solve began.
查看您的日志,您正在非常快速地接近最优并且您在大概半分钟左右的时间内获得了 Gap=0.01% 的解决方案。
我经常将 Gurobi 与 JuMP 结合使用,我注意到它的输出中仍有部分我不理解。除非它被记录在某处并且 link 是最受欢迎的,你能帮助理解以下内容吗? :)
Found heuristic solution: objective 5820.0000000
Presolve removed 33 rows and 11 columns
Presolve time: 0.00s
Presolved: 607 rows, 331 columns, 2445 nonzeros
Variable types: 111 continuous, 220 integer (220 binary)
Root relaxation: objective 1.157500e+03, 64 iterations, 0.00 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 1157.50000 0 25 5820.00000 1157.50000 80.1% - 0s
H 0 0 2535.0000000 1157.50000 54.3% - 0s
0 0 1236.00000 0 23 2535.00000 1236.00000 51.2% - 0s
0 0 1273.65351 0 41 2535.00000 1273.65351 49.8% - 0s
0 0 1274.59375 0 41 2535.00000 1274.59375 49.7% - 0s
0 0 1274.69841 0 42 2535.00000 1274.69841 49.7% - 0s
0 0 1309.98305 0 42 2535.00000 1309.98305 48.3% - 0s
0 0 1310.26027 0 42 2535.00000 1310.26027 48.3% - 0s
0 0 1340.01176 0 47 2535.00000 1340.01176 47.1% - 0s
0 0 1342.47826 0 49 2535.00000 1342.47826 47.0% - 0s
0 0 1342.60000 0 49 2535.00000 1342.60000 47.0% - 0s
0 0 1362.32468 0 50 2535.00000 1362.32468 46.3% - 0s
0 0 1363.08000 0 49 2535.00000 1363.08000 46.2% - 0s
0 0 1363.13077 0 49 2535.00000 1363.13077 46.2% - 0s
0 0 1370.79545 0 53 2535.00000 1370.79545 45.9% - 0s
0 0 1375.50000 0 52 2535.00000 1375.50000 45.7% - 0s
0 0 1375.50000 0 52 2535.00000 1375.50000 45.7% - 0s
0 0 1376.70025 0 52 2535.00000 1376.70025 45.7% - 0s
0 0 1376.70122 0 53 2535.00000 1376.70122 45.7% - 0s
0 0 1376.70122 0 53 2535.00000 1376.70122 45.7% - 0s
0 2 1376.98418 0 53 2535.00000 1376.98418 45.7% - 0s
* 255 157 14 2457.0000000 1473.00000 40.0% 22.5 0s
H 407 223 2397.0000000 1548.00000 35.4% 20.3 0s
* 1962 758 22 2355.0000000 1772.85714 24.7% 16.8 0s
*14326 2205 27 2343.0000000 2088.50000 10.9% 15.7 3s
据我所知,按出现顺序:
预求解
- 找到启发式解法:objective5820,Gurobi 启动了预求解,找到了一个值为 5820 的解法
- Presolve 移除 33 个多余或无用的变量以及 11 个约束?
- Presvoled: 预求解模型的大小
- 变量类型:有些是二元的,有些是连续的。
- 根弛豫: LP 弛豫的 objective 为 1 157.5
节点
- Expl (1): * empty or H, 我不知道有这些符号时的区别,但我注意到所有行都带有给定符号 (H, * , 或空) 将有相同的输出。
- Expl and Unexpl求解树中已探索节点和未探索节点的数量。
当前节点
- Obj: objective of current node being explored?
- 深度: 当前正在求解的树的深度
- IntInf:我不知道这个
Objective 界限
- Incumbent:找到的最佳有效解决方案的当前值
- BestBd: 当前找到的最佳下限
- 差距:这可能是当前最佳解决方案和最佳边界之间的差距,但我无法推断出它是如何计算的。
工作
- It/Node:这里需要找出什么是迭代
- 时间: 到那时为止解决问题的时间。
详情请见https://www.gurobi.com/documentation/9.1/refman/mip_logging.html。
让我只引用那些回答你问题的人:
The
Nodes
section (the first two columns) provides general quantitative information on the progress of the search. The first column shows the number of branch-and-cut nodes that have been explored to that point, while the second shows the number of leaf nodes in the search tree that remain unexplored. At times, there will be an H or * character at the beginning of the output line. These indicate that a new feasible solution has been found, either by a MIP heuristic (H) or by branching (*).
The
Current Node
section provides information on the specific node that was explored at that point in the branch-and-cut tree. It shows the objective of the associated relaxation, the depth of that node in the branch-and-cut tree, and the number of integer variables that have non-integral values in the associated relaxation.
The
Objective Bounds
section provides information on the best known objective value for a feasible solution (i.e., the objective value of the current incumbent), and the current objective bound provided by leaf nodes of the search tree. The optimal objective value is always between these two values. The third column in this section (Gap
) shows the relative gap between the two objective bounds. When this gap is smaller than theMIPGap
parameter, optimization terminates.
The
Work
section of the log provides information on how much work has been performed to that point. The first column shows the average number of simplex iterations performed per node in the branch-and-cut tree. The final column shows the elapsed time since the solve began.
查看您的日志,您正在非常快速地接近最优并且您在大概半分钟左右的时间内获得了 Gap=0.01% 的解决方案。