本章来解读一下Gurobi的刷屏式输出,根本不需要cout,直接通过model.optimize();进行输出。
例如:
现在我们来逐行解读一下:
第一部分:版本型号
可以直接跳过
CPU model: 12th Gen Intel(R) Core(TM) i5-12500H, instruction set [SSE2|AVX|AVX2]
Thread count: 12 physical cores, 16 logical processors, using up to 16 threads
Optimize a model with 378 rows, 44109 columns and 3351 nonzeros
Model fingerprint: 0x4bb022c8
第二部分:模型规模
主要介绍模型中有多少约束条件,多少变量。
Variable types: 0 continuous, 44109 integer (44109 binary)
Coefficient statistics:
Matrix range [1e+00, 2e+04]
Objective range [2e+01, 2e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 2e+05]
第三部分:模型的persolve阶段
Found heuristic solution: objective 3800.0000000
Presolve removed 240 rows and 43803 columns
Presolve time: 0.04s
Presolved: 138 rows, 306 columns, 1842 nonzeros
Found heuristic solution: objective 3100.0000000
Variable types: 0 continuous, 306 integer (306 binary)