# NOT RUN {
# create problem with semicontinuous decisions that have an upper bound of
# 50 % of the planning unit
p <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.1) %>%
add_semicontinuous_decisions(upper_limit = 0.5)
# }
# NOT RUN {
# solve problem
s <- solve(p)
# plot solutions
plot(s, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab