You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prioritizr package isn't compatible with the latest version of the highs package. When using the latest version of the highs package to solve a problem, we get an error about failed assertions. This is because the highs package now has more strict type checking of input values. See below for a reprex. I'll try and implement a bug fix ASAP.
# load packages
library(prioritizr)
library(highs)
# load data
sim_pu_raster <- get_sim_pu_raster()
sim_features <- get_sim_features()
# create problem
p <-
problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.1) %>%
add_binary_decisions() %>%
add_highs_solver(verbose = FALSE)
# try to solve problem
solve(p)
#> Error in (function (threads = 1L, time_limit = Inf, log_to_console = FALSE, :
#> Assertion on 'log_to_console' failed: Must be of type 'logical', not 'integer'.
#> Timing stopped at: 0.003 0 0.003
The text was updated successfully, but these errors were encountered:
The prioritizr package isn't compatible with the latest version of the highs package. When using the latest version of the highs package to solve a problem, we get an error about failed assertions. This is because the highs package now has more strict type checking of input values. See below for a reprex. I'll try and implement a bug fix ASAP.
The text was updated successfully, but these errors were encountered: