This class encodes for the solutions obtained when solving
multiple instances. This includes several methods
to obtain information about both the optimization process and the solution associated with
the planning units and conservation actions. It is created using the eval functions
(e.g. evalTarget()
or evalBudget()
).
No return value.
list
. Object containing data on the results of the optimization process.
character
. Label indicating the name of solutions.
Print basic information of the model solution.
Call print method.
# \donttest{
# set seed for reproducibility
set.seed(14)
## Create model and solve
port <- evalBlm(pu = sim_pu_data, features = sim_features_data,
dist_features = sim_dist_features_data,
threats = sim_threats_data,
dist_threats = sim_dist_threats_data,
sensitivity = sim_sensitivity_data,
boundary = sim_boundary_data,
values = c(0.0, 0.01, 0.02, 0.03),
model_type = "minimizeCosts",
time_limit = 50,
output_file = FALSE, cores = 2)
#> *********************************
#> Iteration 1 of 4: Blm0
#> *********************************
#> Warning: The blm argument was set to 0, so the boundary data has no effect
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases
#> Gurobi Optimizer version 10.0.0 build v10.0.0rc2 (linux64)
#>
#> CPU model: 12th Gen Intel(R) Core(TM) i5-1240P, instruction set [SSE2|AVX|AVX2]
#> Thread count: 16 physical cores, 16 logical processors, using up to 2 threads
#>
#> Optimize a model with 284 rows, 396 columns and 785 nonzeros
#> Model fingerprint: 0xff18a474
#> Variable types: 176 continuous, 220 integer (220 binary)
#> Coefficient statistics:
#> Matrix range [5e-01, 2e+00]
#> Objective range [1e+00, 1e+01]
#> Bounds range [1e+00, 1e+00]
#> RHS range [2e+01, 5e+01]
#> Found heuristic solution: objective 964.0000000
#> Found heuristic solution: objective 886.0000000
#> Presolve removed 251 rows and 294 columns
#> Presolve time: 0.00s
#> Presolved: 33 rows, 102 columns, 194 nonzeros
#> Variable types: 0 continuous, 102 integer (89 binary)
#> Found heuristic solution: objective 776.0000000
#>
#> Root relaxation: objective 7.345000e+02, 39 iterations, 0.00 seconds (0.00 work units)
#>
#> Nodes | Current Node | Objective Bounds | Work
#> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
#>
#> 0 0 734.50000 0 4 776.00000 734.50000 5.35% - 0s
#> H 0 0 742.0000000 734.50000 1.01% - 0s
#> 0 0 737.00000 0 2 742.00000 737.00000 0.67% - 0s
#> * 0 0 0 738.0000000 738.00000 0.00% - 0s
#>
#> Explored 1 nodes (82 simplex iterations) in 0.00 seconds (0.00 work units)
#> Thread count was 2 (of 16 available processors)
#>
#> Solution count 5: 738 742 776 ... 964
#>
#> Optimal solution found (tolerance 0.00e+00)
#> Best objective 7.380000000000e+02, best bound 7.380000000000e+02, gap 0.0000%
#> *********************************
#> Iteration 2 of 4: Blm0.01
#> *********************************
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases
#> Gurobi Optimizer version 10.0.0 build v10.0.0rc2 (linux64)
#>
#> CPU model: 12th Gen Intel(R) Core(TM) i5-1240P, instruction set [SSE2|AVX|AVX2]
#> Thread count: 16 physical cores, 16 logical processors, using up to 2 threads
#>
#> Optimize a model with 29984 rows, 10296 columns and 70085 nonzeros
#> Model fingerprint: 0x53d3645d
#> Variable types: 176 continuous, 10120 integer (10120 binary)
#> Coefficient statistics:
#> Matrix range [5e-01, 2e+00]
#> Objective range [1e-02, 2e+01]
#> Bounds range [1e+00, 1e+00]
#> RHS range [1e+00, 5e+01]
#> Found heuristic solution: objective 964.0000000
#> Presolve removed 19990 rows and 5131 columns
#> Presolve time: 0.13s
#> Presolved: 9994 rows, 5165 columns, 20209 nonzeros
#> Variable types: 0 continuous, 5165 integer (5160 binary)
#> Found heuristic solution: objective 857.7888800
#>
#> Root relaxation: objective 8.257523e+02, 3972 iterations, 0.14 seconds (0.26 work units)
#>
#> Nodes | Current Node | Objective Bounds | Work
#> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
#>
#> 0 0 825.75234 0 338 857.78888 825.75234 3.73% - 0s
#> H 0 0 828.3563400 825.75234 0.31% - 0s
#> * 0 0 0 827.3912600 827.39126 0.00% - 0s
#>
#> Cutting planes:
#> Cover: 4
#> Flow cover: 1
#> RLT: 1
#>
#> Explored 1 nodes (4033 simplex iterations) in 0.32 seconds (0.55 work units)
#> Thread count was 2 (of 16 available processors)
#>
#> Solution count 4: 827.391 828.356 857.789 964
#>
#> Optimal solution found (tolerance 0.00e+00)
#> Best objective 8.273912600000e+02, best bound 8.273912600000e+02, gap 0.0000%
#> *********************************
#> Iteration 3 of 4: Blm0.02
#> *********************************
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases
#> Gurobi Optimizer version 10.0.0 build v10.0.0rc2 (linux64)
#>
#> CPU model: 12th Gen Intel(R) Core(TM) i5-1240P, instruction set [SSE2|AVX|AVX2]
#> Thread count: 16 physical cores, 16 logical processors, using up to 2 threads
#>
#> Optimize a model with 29984 rows, 10296 columns and 70085 nonzeros
#> Model fingerprint: 0x4633ec81
#> Variable types: 176 continuous, 10120 integer (10120 binary)
#> Coefficient statistics:
#> Matrix range [5e-01, 2e+00]
#> Objective range [1e-02, 1e+01]
#> Bounds range [1e+00, 1e+00]
#> RHS range [1e+00, 5e+01]
#> Found heuristic solution: objective 479.0000000
#> Presolve removed 19990 rows and 5131 columns
#> Presolve time: 0.13s
#> Presolved: 9994 rows, 5165 columns, 20209 nonzeros
#> Variable types: 0 continuous, 5165 integer (5160 binary)
#> Found heuristic solution: objective 383.0000000
#>
#> Root relaxation: objective 3.770000e+02, 1089 iterations, 0.02 seconds (0.03 work units)
#>
#> Nodes | Current Node | Objective Bounds | Work
#> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
#>
#> 0 0 377.00000 0 1 383.00000 377.00000 1.57% - 0s
#> H 0 0 380.0000000 377.00000 0.79% - 0s
#> H 0 0 378.0000000 377.00000 0.26% - 0s
#> 0 0 cutoff 0 378.00000 378.00000 0.00% - 0s
#>
#> Cutting planes:
#> Gomory: 1
#> Cover: 1
#> Mod-K: 1
#> RLT: 1
#>
#> Explored 1 nodes (1263 simplex iterations) in 0.19 seconds (0.31 work units)
#> Thread count was 2 (of 16 available processors)
#>
#> Solution count 4: 378 380 383 479
#>
#> Optimal solution found (tolerance 0.00e+00)
#> Best objective 3.780000000000e+02, best bound 3.780000000000e+02, gap 0.0000%
#> *********************************
#> Iteration 4 of 4: Blm0.03
#> *********************************
#> Warning: Some blm_actions argument were set to 0, so the boundary data has no effect for these cases
#> Gurobi Optimizer version 10.0.0 build v10.0.0rc2 (linux64)
#>
#> CPU model: 12th Gen Intel(R) Core(TM) i5-1240P, instruction set [SSE2|AVX|AVX2]
#> Thread count: 16 physical cores, 16 logical processors, using up to 2 threads
#>
#> Optimize a model with 29984 rows, 10296 columns and 70085 nonzeros
#> Model fingerprint: 0x87596595
#> Variable types: 176 continuous, 10120 integer (10120 binary)
#> Coefficient statistics:
#> Matrix range [5e-01, 2e+00]
#> Objective range [1e-03, 1e+01]
#> Bounds range [1e+00, 1e+00]
#> RHS range [1e+00, 5e+01]
#> Found heuristic solution: objective -6.0000000
#> Presolve removed 29980 rows and 10263 columns
#> Presolve time: 0.12s
#> Presolved: 4 rows, 33 columns, 54 nonzeros
#> Variable types: 0 continuous, 33 integer (10 binary)
#> Found heuristic solution: objective -86.0000000
#>
#> Root relaxation: objective -1.080000e+02, 6 iterations, 0.00 seconds (0.00 work units)
#>
#> Nodes | Current Node | Objective Bounds | Work
#> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
#>
#> 0 0 -108.00000 0 1 -86.00000 -108.00000 25.6% - 0s
#> H 0 0 -104.0000000 -108.00000 3.85% - 0s
#> H 0 0 -107.0000000 -108.00000 0.93% - 0s
#> 0 0 -108.00000 0 1 -107.00000 -108.00000 0.93% - 0s
#>
#> Explored 1 nodes (6 simplex iterations) in 0.13 seconds (0.18 work units)
#> Thread count was 2 (of 16 available processors)
#>
#> Solution count 4: -107 -104 -86 -6
#> No other solutions better than -107
#>
#> Optimal solution found (tolerance 0.00e+00)
#> Best objective -1.070000000000e+02, best bound -1.070000000000e+02, gap 0.0000%
## Use class methods
port$getNames()
#> [1] "Blm0" "Blm0.01" "Blm0.02" "Blm0.03"
port$print()
#> Portfolio overview
#> solutions: 4
# }