This function returns the Gurobi log file (*.log) associated with solving an optimization problem.

logging.file(x, y)

# S3 method for RapResults
logging.file(x, y = 0)

# S3 method for RapSolved
logging.file(x, y = 0)

Arguments

x

RapResults() or RapSolved() object.

y

Available inputs include: NULL to return all values, integer number specifying the solution for which the log file should be returned, and 0 to return log file for the best solution.

Note

The term logging file was used due to collisions with the log function.

See also

Examples

# load data data(sim_rs) # log file for the best solution cat(logging.file(sim_rs, 0))
#> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:54:39 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30306 rows, 30100 columns and 120000 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 264 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 305 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.70s #> Presolved: 29946 rows, 30085 columns, 131504 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29879 rows, 30084 columns, 127194 nonzeros #> #> Presolve removed 29879 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 19s #> 2041 2.8872983e+01 0.000000e+00 2.680992e+03 20s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> #> Root relaxation: objective 2.000000e+01, 3691 iterations, 4.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 20.00000 0 4 100.00000 20.00000 80.0% - 21s #> H 0 0 20.0000000 20.00000 0.00% - 21s #> #> Explored 0 nodes (4876 simplex iterations) in 21.36 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0%
# log file for the second solution cat(logging.file(sim_rs, 2))
#> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:54:39 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30306 rows, 30100 columns and 120000 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 264 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 305 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.70s #> Presolved: 29946 rows, 30085 columns, 131504 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29879 rows, 30084 columns, 127194 nonzeros #> #> Presolve removed 29879 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 19s #> 2041 2.8872983e+01 0.000000e+00 2.680992e+03 20s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> #> Root relaxation: objective 2.000000e+01, 3691 iterations, 4.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 20.00000 0 4 100.00000 20.00000 80.0% - 21s #> H 0 0 20.0000000 20.00000 0.00% - 21s #> #> Explored 0 nodes (4876 simplex iterations) in 21.36 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:55:01 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30307 rows, 30100 columns and 120100 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 265 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 329 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.02s #> Presolved: 29947 rows, 30085 columns, 131606 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29880 rows, 30084 columns, 127295 nonzeros #> #> Presolve removed 29880 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 18s #> 2022 3.1353711e+01 0.000000e+00 4.457908e+03 20s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> #> Root relaxation: objective 2.000000e+01, 4508 iterations, 6.43 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> * 0 0 0 20.0000000 20.00000 0.00% - 22s #> #> Explored 0 nodes (4509 simplex iterations) in 22.61 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0%
# log files for all solutions cat(logging.file(sim_rs, NULL))
#> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:54:39 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30306 rows, 30100 columns and 120000 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 264 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 305 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.70s #> Presolved: 29946 rows, 30085 columns, 131504 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29879 rows, 30084 columns, 127194 nonzeros #> #> Presolve removed 29879 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 19s #> 2041 2.8872983e+01 0.000000e+00 2.680992e+03 20s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> #> Root relaxation: objective 2.000000e+01, 3691 iterations, 4.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 20.00000 0 4 100.00000 20.00000 80.0% - 21s #> H 0 0 20.0000000 20.00000 0.00% - 21s #> #> Explored 0 nodes (4876 simplex iterations) in 21.36 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:54:39 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30306 rows, 30100 columns and 120000 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 264 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 305 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.70s #> Presolved: 29946 rows, 30085 columns, 131504 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29879 rows, 30084 columns, 127194 nonzeros #> #> Presolve removed 29879 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 19s #> 2041 2.8872983e+01 0.000000e+00 2.680992e+03 20s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> #> Root relaxation: objective 2.000000e+01, 3691 iterations, 4.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 20.00000 0 4 100.00000 20.00000 80.0% - 21s #> H 0 0 20.0000000 20.00000 0.00% - 21s #> #> Explored 0 nodes (4876 simplex iterations) in 21.36 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:55:01 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30307 rows, 30100 columns and 120100 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 265 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 329 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.02s #> Presolved: 29947 rows, 30085 columns, 131606 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29880 rows, 30084 columns, 127295 nonzeros #> #> Presolve removed 29880 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 18s #> 2022 3.1353711e+01 0.000000e+00 4.457908e+03 20s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> #> Root relaxation: objective 2.000000e+01, 4508 iterations, 6.43 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> * 0 0 0 20.0000000 20.00000 0.00% - 22s #> #> Explored 0 nodes (4509 simplex iterations) in 22.61 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:54:39 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30306 rows, 30100 columns and 120000 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 264 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 305 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.70s #> Presolved: 29946 rows, 30085 columns, 131504 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29879 rows, 30084 columns, 127194 nonzeros #> #> Presolve removed 29879 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 19s #> 2041 2.8872983e+01 0.000000e+00 2.680992e+03 20s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> 3691 2.0000000e+01 0.000000e+00 0.000000e+00 21s #> #> Root relaxation: objective 2.000000e+01, 3691 iterations, 4.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 20.00000 0 4 100.00000 20.00000 80.0% - 21s #> H 0 0 20.0000000 20.00000 0.00% - 21s #> #> Explored 0 nodes (4876 simplex iterations) in 21.36 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:55:01 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30307 rows, 30100 columns and 120100 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 265 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 329 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 16.02s #> Presolved: 29947 rows, 30085 columns, 131606 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29880 rows, 30084 columns, 127295 nonzeros #> #> Presolve removed 29880 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 18s #> 2022 3.1353711e+01 0.000000e+00 4.457908e+03 20s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> 4508 2.0000000e+01 0.000000e+00 0.000000e+00 23s #> #> Root relaxation: objective 2.000000e+01, 4508 iterations, 6.43 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> * 0 0 0 20.0000000 20.00000 0.00% - 22s #> #> Explored 0 nodes (4509 simplex iterations) in 22.61 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0% #> #> Gurobi 6.5.1 (linux64) logging started Fri Jul 29 12:55:24 2016 #> #> Warning for adding variables: zero or small (< 1e-13) coefficients, ignored #> Optimize a model with 30308 rows, 30100 columns and 120200 nonzeros #> Coefficient statistics: #> Matrix range [7e-03, 9e+01] #> Objective range [1e+00, 1e+00] #> Bounds range [1e+00, 1e+00] #> RHS range [1e+00, 1e+02] #> Found heuristic solution: objective 100 #> Presolve removed 265 rows and 15 columns (presolve time = 5s) ... #> Presolve removed 329 rows and 15 columns (presolve time = 10s) ... #> Presolve removed 360 rows and 15 columns (presolve time = 15s) ... #> Presolve removed 360 rows and 15 columns #> Presolve time: 15.91s #> Presolved: 29948 rows, 30085 columns, 131708 nonzeros #> Variable types: 0 continuous, 30085 integer (30085 binary) #> Presolve removed 67 rows and 1 columns #> Presolved: 29881 rows, 30084 columns, 127396 nonzeros #> #> Presolve removed 29881 rows and 30084 columns #> #> Root simplex log... #> #> Iteration Objective Primal Inf. Dual Inf. Time #> 0 1.0000000e+02 0.000000e+00 1.000000e+02 18s #> 2854 2.4255096e+01 0.000000e+00 2.385716e+03 20s #> 4679 2.0000000e+01 0.000000e+00 0.000000e+00 22s #> 4679 2.0000000e+01 0.000000e+00 0.000000e+00 22s #> #> Root relaxation: objective 2.000000e+01, 4679 iterations, 6.10 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> * 0 0 0 20.0000000 20.00000 0.00% - 23s #> #> Explored 0 nodes (7085 simplex iterations) in 23.13 seconds #> Thread count was 1 (of 2 available processors) #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 2.000000000000e+01, best bound 2.000000000000e+01, gap 0.0%