Targets are used to specify the minimum amount or proportion of a feature's distribution that needs to be protected in the solution.

Details

Please note that most objectives require targets, and attempting to solve a problem that requires targets will throw an error.

The following functions can be used to specify targets for a conservation planning problem:

add_relative_targets

Set targets as a proportion (between 0 and 1) of the total amount of each feature in the the study area.

add_absolute_targets

Set targets that denote the minimum amount of each feature required in the prioritization.

add_loglinear_targets

Set targets as a proportion (between 0 and 1) that are calculated using log-linear interpolation.

add_manual_targets

Set targets manually.

See also

Examples

# load data data(sim_pu_raster, sim_features) # create base problem p <- problem(sim_pu_raster, sim_features) %>% add_min_set_objective() %>% add_binary_decisions() # create problem with added relative targets p1 <- p %>% add_relative_targets(0.1) # create problem with added absolute targets p2 <- p %>% add_absolute_targets(3) # create problem with added loglinear targets p3 <- p %>% add_loglinear_targets(10, 0.9, 100, 0.2) # create problem with manual targets that equate to 10% relative targets p4 <- p %>% add_manual_targets(data.frame(feature = names(sim_features), target = 0.1, type = "relative"))
# solve problem s <- stack(solve(p1), solve(p2), solve(p3), solve(p4))
#> Optimize a model with 5 rows, 90 columns and 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Coefficient statistics: #> Matrix range [2e-01, 9e-01] #> Objective range [2e+02, 2e+02] #> Bounds range [1e+00, 1e+00] #> RHS range [3e+00, 8e+00] #> Found heuristic solution: objective 2337.9617505 #> Presolve time: 0.00s #> Presolved: 5 rows, 90 columns, 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Presolved: 5 rows, 90 columns, 450 nonzeros #> #> #> Root relaxation: objective 1.931582e+03, 12 iterations, 0.00 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 1931.58191 0 4 2337.96175 1931.58191 17.4% - 0s #> H 0 0 1985.6818841 1931.58191 2.72% - 0s #> #> Explored 1 nodes (12 simplex iterations) in 0.00 seconds #> Thread count was 1 (of 4 available processors) #> #> Solution count 2: 1985.68 2337.96 #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 1.985681884076e+03, best bound 1.931581908865e+03, gap 2.7245% #> Optimize a model with 5 rows, 90 columns and 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Coefficient statistics: #> Matrix range [2e-01, 9e-01] #> Objective range [2e+02, 2e+02] #> Bounds range [1e+00, 1e+00] #> RHS range [3e+00, 3e+00] #> Found heuristic solution: objective 2145.2678910 #> Presolve removed 3 rows and 0 columns #> Presolve time: 0.00s #> Presolved: 2 rows, 90 columns, 180 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Presolved: 2 rows, 90 columns, 180 nonzeros #> #> #> Root relaxation: objective 1.589540e+03, 1 iterations, 0.00 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 1589.53964 0 1 2145.26789 1589.53964 25.9% - 0s #> H 0 0 1661.1365494 1589.53964 4.31% - 0s #> #> Explored 1 nodes (1 simplex iterations) in 0.00 seconds #> Thread count was 1 (of 4 available processors) #> #> Solution count 2: 1661.14 2145.27 #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 1.661136549371e+03, best bound 1.589539637535e+03, gap 4.3101% #> Optimize a model with 5 rows, 90 columns and 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Coefficient statistics: #> Matrix range [2e-01, 9e-01] #> Objective range [2e+02, 2e+02] #> Bounds range [1e+00, 1e+00] #> RHS range [2e+01, 2e+01] #> Found heuristic solution: objective 11939.016941 #> Presolve removed 4 rows and 0 columns #> Presolve time: 0.00s #> Presolved: 1 rows, 90 columns, 90 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Presolved: 1 rows, 90 columns, 90 nonzeros #> #> #> Root relaxation: objective 1.047148e+04, 1 iterations, 0.00 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 10471.4792 0 1 11939.0169 10471.4792 12.3% - 0s #> H 0 0 10532.505579 10471.4792 0.58% - 0s #> #> Explored 1 nodes (1 simplex iterations) in 0.00 seconds #> Thread count was 1 (of 4 available processors) #> #> Solution count 2: 10532.5 11939 #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 1.053250557899e+04, best bound 1.047147921397e+04, gap 0.5794% #> Optimize a model with 5 rows, 90 columns and 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Coefficient statistics: #> Matrix range [2e-01, 9e-01] #> Objective range [2e+02, 2e+02] #> Bounds range [1e+00, 1e+00] #> RHS range [3e+00, 8e+00] #> Found heuristic solution: objective 2337.9617505 #> Presolve time: 0.00s #> Presolved: 5 rows, 90 columns, 450 nonzeros #> Variable types: 0 continuous, 90 integer (90 binary) #> Presolved: 5 rows, 90 columns, 450 nonzeros #> #> #> Root relaxation: objective 1.931582e+03, 12 iterations, 0.00 seconds #> #> Nodes | Current Node | Objective Bounds | Work #> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time #> #> 0 0 1931.58191 0 4 2337.96175 1931.58191 17.4% - 0s #> H 0 0 1985.6818841 1931.58191 2.72% - 0s #> #> Explored 1 nodes (12 simplex iterations) in 0.00 seconds #> Thread count was 1 (of 4 available processors) #> #> Solution count 2: 1985.68 2337.96 #> #> Optimal solution found (tolerance 1.00e-01) #> Best objective 1.985681884076e+03, best bound 1.931581908865e+03, gap 2.7245%
# plot solution plot(s, axes = FALSE, box = FALSE, main = c("relative targets", "absolute targets", "loglinear targets", "manual targets"))