# NOT RUN {
# load data
data(sim_pu_raster, sim_features)
# create problem using loglinear targets
p <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_loglinear_targets(10, 0.9, 100, 0.2) %>%
add_binary_decisions()
# }
# NOT RUN {
# solve problem
s <- solve(p)
# plot solution
plot(s, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab