Gurobi给出了一组C###类型的解法
Gurobi gives a set of solutions of type C###
我正在使用最新版本的 Gurobi 来优化具有 Python 的 MIP 模型。
优化器求解模型并给出以下消息:
Optimize a model with 804 rows, 848 columns and 2004 nonzeros
Model has 192 quadratic constraints
Variable types: 720 continuous, 128 integer (124 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+06]
QMatrix range [1e+00, 1e+00]
QLMatrix range [2e-03, 1e+00]
Objective range [9e-02, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [5e-01, 1e+06]
Presolve removed 796 rows and 648 columns
Presolve time: 0.00s
Presolved: 200 rows, 200 columns, 556 nonzeros
Variable types: 192 continuous, 8 integer (4 binary)
Found heuristic solution: objective 4676.0580000
Root relaxation: objective 4.675492e+03, 96 iterations, 0.00 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 4675.49199 0 3 4676.05800 4675.49199 0.01% - 0s
H 0 0 4675.4995720 4675.49199 0.00% - 0s
Explored 1 nodes (96 simplex iterations) in 0.03 seconds
Thread count was 8 (of 8 available processors)
Solution count 2: 4675.5 4676.06
Optimal solution found (tolerance 1.00e-04)
Best objective 4.675499571970e+03, best bound 4.675491987015e+03, gap 0.0002%
查看 m.getVars() 时,我看到以下变量:
C624 1.97984
C625 1.82252
...
C718 5.47093
C719 3.97195
C624到C719就不用说了,而且都是正值(不知道是不是跟我用的参数和型号有关系)
它们是什么意思?
在向模型添加变量时,如果您定义了名称参数,您可以看到具有给定名称的变量。比如
Var_y = model.addVar(vtype=GRB.INTEGER, name="Var_y")
我正在使用最新版本的 Gurobi 来优化具有 Python 的 MIP 模型。
优化器求解模型并给出以下消息:
Optimize a model with 804 rows, 848 columns and 2004 nonzeros
Model has 192 quadratic constraints
Variable types: 720 continuous, 128 integer (124 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+06]
QMatrix range [1e+00, 1e+00]
QLMatrix range [2e-03, 1e+00]
Objective range [9e-02, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [5e-01, 1e+06]
Presolve removed 796 rows and 648 columns
Presolve time: 0.00s
Presolved: 200 rows, 200 columns, 556 nonzeros
Variable types: 192 continuous, 8 integer (4 binary)
Found heuristic solution: objective 4676.0580000
Root relaxation: objective 4.675492e+03, 96 iterations, 0.00 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 4675.49199 0 3 4676.05800 4675.49199 0.01% - 0s
H 0 0 4675.4995720 4675.49199 0.00% - 0s
Explored 1 nodes (96 simplex iterations) in 0.03 seconds
Thread count was 8 (of 8 available processors)
Solution count 2: 4675.5 4676.06
Optimal solution found (tolerance 1.00e-04)
Best objective 4.675499571970e+03, best bound 4.675491987015e+03, gap 0.0002%
查看 m.getVars() 时,我看到以下变量:
C624 1.97984
C625 1.82252
...
C718 5.47093
C719 3.97195
C624到C719就不用说了,而且都是正值(不知道是不是跟我用的参数和型号有关系)
它们是什么意思?
在向模型添加变量时,如果您定义了名称参数,您可以看到具有给定名称的变量。比如
Var_y = model.addVar(vtype=GRB.INTEGER, name="Var_y")