Reputation: 75
I am using the latest version of Gurobi to optimize a MIP model with Python.
The optimizer solves the model and gives the following message:
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%
When looking in the m.getVars() I see the following variables:
C624 1.97984
C625 1.82252
...
C718 5.47093
C719 3.97195
Needless to say they it goes from C624 to C719 continuously, and they only assume positive values (I don't know if it has something to do with the parameters and the model I am using).
What do they mean?
Upvotes: 0
Views: 25
Reputation: 593
While adding variables to your model, if you define name parameter, you can see them with given name. Such as
Var_y = model.addVar(vtype=GRB.INTEGER, name="Var_y")
Upvotes: 1