add_gurobi_solverto support the
node_file_startparameter for the Gurobi software. This functionality is useful solving large problems on systems with limited memory (#139).
write_problemfunction to save the mixed integer programming representation of a conservation planning problem to a file. This function is useful for manually executing optimization solvers.
rij_matrixfunction documentation (#189).
add_gurobi_solverto allow specification of a starting solution (#187). This functionality is useful for conducting a boundary penalty parameter calibration exercise. Specifically, users can specify the starting solution for a given penalty value based on the solution obtained using a smaller penalty value.
solvenow assigns layer names based on zone names for solutions in format.
add_cbc_solvernow work as expected.
add_gurobi_solverto report timings following the same methods as the other solvers.
add_cbc_solveris now preferred over all other open source solvers.
add_cbc_solverwould sometimes return incorrect solutions to problems with equality constraints.
add_cbc_solverfunction to generate solutions using the open source CBC solver via the rcbc R package (https://github.com/dirkschumacher/rcbc).
add_lpsymphony_solverfunctions to have a default
time_limitargument set as the maximum machine integer for consistency.
add_gurobi_solverfunctions to require
FALSE) arguments for the
add_default_solverfunction so that it prefers
add_cbc_solverover all open source solvers.
gapparameter for the
add_lpsymphony_solvercorresponded to the maximum absolute difference from the optimal objective value. This was an error due to misunderstanding the SYMPHONY documentation. Under previous versions of the package, the
gapparameter actually corresponded to a relative optimality gap expressed as a percentage (such that
gap = 10indicates that solutions must be at least 10% from optimality). We have now fixed this error and the documentation described for the
gapparameter is correct. We apologize for any inconvenience this may have caused.
eval_) to mention that the argument to
solutionshould only contain columns that correspond to the solution (#176).
sfdata to documentation for importance evaluation functions (#176).
solutionarguments are supplied to the evaluation functions (#176).
sfplanning unit data.
eval_costfunction to calculate the cost of a solution.
eval_boundaryfunction to calculate the exposed boundary length associated with a solution.
eval_connectivityfunction to calculate the connectivity associated with a solution.
feature_representationfunction. It is now superseded by the
eval_feature_representationfunction to assess how well each feature is represented by a solution. This function is similar to the deprecated
eval_feature_representationfunction, except that it follows conventions for other evaluation functions (e.g.
eval_target_representationfunction to assess how well each target is met by a solution. This function is similar to the
eval_feature_representation, except that it corresponds to the targets in a conservation planning problem.
eval_ferrier_importancefunction for consistency.
eval_replacement_importancefunction for consistency.
eval_rare_richness_importancefunction for consistency.
add_locked_out_constraintsfunction to enable a single planning unit from being locked out of multiple zones (when data are specified in raster format).
problemfunction to reduce memory consumption for sparse matrix arguments (#164).
add_cplex_solverfunction to generate solutions using IBM CPLEX (via the cplexAPI package).
add_gap_portfoliodocumentation to note that it only works for problems with binary decisions (#159).
loglinear_interpolationfunctions. Previously they used a natural logarithm for log-linear interpolation. To follow target setting approaches outlined by Rodrigues et al. (2004), they now use the decadic logarithm (i.e.
ferrier_scorefunction. It no longer incorrectly states that these scores can be calculated using CLUZ and now states that this functionality is experimental until the formulation can be double checked.
feature_representationbug incorrectly throwing error with vector planning unit data (e.g. sf-class data).
rij_matrixto throw an error for large raster data (#151).
add_linear_penaltiesto add penalties that penalize planning units according to a linear metric.
connectivity_matrixdocumentation to provide an example of how to generate connectivity matrices that account for functional connectivity.
solvefunction to the Salt Spring Island and Tasmania vignettes.
compileto throw warning when compiling problems that include feature weights and an objective function that does not use feature weights.
add_gurobi_solverfunction to provide more options for controlling the pre-solve step when solving a problem.
ferrier_scorefunction to compute irreplaceability scores following Ferrier et al (2000).
proximity_matrixfunction to generate matrices indicating which planning units are within a certain distance of each other (#6).
adjacency_matrixfunction to follow the naming conventions of other spatial association functions (#6).
add_gap_portfoliofunctions to provide specific options for generating portfolios (#134).
fast_extractfunctions to use the exactextractr and fasterize R packages to speed up raster data extraction (#130).
boundary_matrixfunction when handling
SpatialPolygonplanning unit data that contain multiple polygons (e.g. a single planning unit contains to two separate islands) (#132).
is.parallelfunctions since they are no longer used with new data extraction methods.
add_pool_portfoliofunction because the new
add_top_portfoliofunctions provide this functionality (#134).
add_lpsymphony_solverthrowing an an infeasible error message for feasible problems containing continuous or semi-continuous variables.
presolve_checkfunction more informative (#124).
rij_matrixso that amounts are calculated correctly for vector-based planning unit data.
add_locked_out_constraintsfunctions so that they no longer throw an unnecessary warning when when they are added to multi-zone problems using raster data with
add_locked_out_constraintsfunctions to provide recommended practices for raster data.
rarity_weighted_richnessreturning incorrect scores when the feature data contains one feature that has zeros amounts in all planning units (e.g. the
tas_featuresobject in the prioritizrdata R package; #120).
add_gurobi_solverreturning solution statuses that are slightly larger than one (e.g. 1+1.0e-10) when solving problems with proportion-type decisions (#118).
add_rsymphony_solverfunctions so that they will not return solutions with values less than zero or greater than one when solving problems with proportion-type decisions. This issue is the result of inconsistent precision when performing floating point arithmetic (#117).
add_locked_out_constraintsfunctions to provide a more helpful error message the
locked_outargument refers to a column with data that are not logical (i.e.
solvefunction to throw a more accurate and helpful error message when no solutions are found (e.g. due to problem infeasibility or solver time limits).
add_max_phylo_end_objectivefunction to maximize the phylogenetic endemism of species adequately represented in a prioritization (#113).
rarity_weighted_richnessfunctions to the Prioritizr vignette.
irreplaceabilitymanual entry to document functions for calculating irreproducibility scores.
replacement_costfunction to calculate irreproducibility scores for each planning unit in a solution using the replacement cost method (#26).
rarity_weighted_richnessfunction to calculate irreproducibility scores for each planning unit in a solution using rarity weighted richness scores (#26).
add_min_shortfall_objectivefunction to find solutions that minimize target shortfalls.
add_min_shortfall_objectivefunction to main vignette.
problemtests so that they work when no solvers are installed.
feature_representationfunction now requires missing (
NA) values for planning unit statuses in a solution for planning units that have missing (
NA) cost data.
presolve_checkfunction to investigate potential sources of numerical instability before trying to solve a problem. The manual entry for this function discusses common sources of numerical instability and approaches for fixing them.
solvefunction will now use the
presolve_checkfunction to verify that problems do not have obvious sources of numerical instability before trying to solve them. If a problem is likely to have numerical instability issues then this function will now throw an error (unless the
solve(x, force = TRUE)).
add_rsymphony_solverfunction now uses sparse matrix formats so that attempts can be made to solve large problems with SYMPHONY—though it is unlikely that SYMPHONY will be able to solve such problems in a feasible period of time.
ConservationProblem-classobjects. These methods were implemented to be used in future interactive applications and are not currently used in the package. As a consequence, these bugs do not affect the correctness of any results.
bad error messageerror being thrown when input rasters are not comparable (i.e. same coordinate reference system, extent, resolutions, and dimensionality) (#104).
solveprinting annoying text about
add_contiguity_constraintsfunctions used more memory than they actually needed (#102). This is because the argument validation code converted sparse matrix objects (i.e.
dgCMatrix) to base objects (i.e.
matrix) class temporarily. This bug only meant inefficient utilization of computer resources—it did not affect the correctness of any results.
add_mandatory_allocation_constraintsfunction. This function can be used to ensure that every planning unit is allocated to a management zone in the solution. It is useful when developing land-use plans where every single parcel of land must be assigned to a specific land-use zone.
add_mandatory_allocation_constraintsto the Management Zones and Prioritizr vignettes.
Collectionprototypes that caused it to throw an error incorrectly. This method was not used in earlier versions of this package.
feature_representationfunction that caused the “amount_held” column to have NA values instead of the correct values. This bug only affected problems with multiple zones.
category_layerfunction that it this function to incorrectly throw an error claiming that the input argument to
xwas invalid when it was in fact valid. This bug is encountered when different layers the argument to
xhave non-NA values in different cells.
add_contiguity_constraintsfunction now uses sparse matrix formats internally for single-zone problems. This means that the constraints can be applied to single-zoned problem with many more planning units.
add_connectivity_penaltiesfunction now uses sparse matrix formats internally for single-zone problems. This means that connectivity penalties can be applied to single-zoned problem with many more planning units.
add_locked_out_constraintsthat incorrectly threw an error when using
logicallocked data (i.e.
FALSE) because it incorrectly thought that valid inputs were invalid.
add_manual_locked_constraintswhere solving the same problem object twice resulted in incorrect planning units being locked in or out of the solution (#92).
feature_abundancesthat caused the solve function to throw an error when attempting to solve problems with a single feature.
add_cuts_portfoliothat caused the portfolio to return solutions that were not within the specified optimality gap when using the Gurobi solver.
feature_representationfunction now allows
numericsolutions with attributes (e.g. when output by the
solvefunction) when calculating representation statistics for problems with
numericplanning unit data (#91).
add_manual_targetsfunction threw a warning when some features had targets equal to zero. This resulted in an excessive amount of warnings. Now, warnings are thrown for targets that are less then zero.
problemfunction sometimes incorrectly threw a warning that feature data had negative values when the data actually did not contain negative values. This has now been addressed.
problemfunction now allows negative values in the cost and feature data (and throws a warning if such data are detected).
add_manual_targetsfunctions now allow negative targets (but throw a warning if such targets are specified).
compilefunction throws an error if a problem is compiled using the expanded formulation with negative feature data.
add_absolute_targetsfunction now throws an warning—instead of an error—if the specified targets are greater than the feature abundances in planning units to accommodate negative values in feature data.
add_max_cover_objectivein prioritizr vignette (#90).
add_relative_targetsdocumentation now makes it clear that locked out planning units are included in the calculations for setting targets (#89).
add_loglinear_targetsfunction now includes a
feature_abundancesparameter for specifying the total amount of each feature to use when calculating the targets (#89).
feature_abundancesfunction to calculate the total amount of each feature in the planning units (#86).
add_cuts_portfoliofunction uses the Gurobi solution pool to generate unique solutions within a specified gap of optimality when tasked with solving problems with Gurobi (version 8.0.0+; #80).
add_pool_portfoliofunction to generate a portfolio of solutions using the Gurobi solution pool (#77).
boundary_matrixfunction now has the experimental functionality to use GEOS STR trees to speed up processing (#74).
feature_representationfunction to how well features are represented in solutions (#73).
solvefunction printing superfluous text (#75).
sim_features_zonesfor exploring conservation problems with multiple management zones.
Zonesclass to organize data with multiple zones.
problemfunction now accepts
Zoneobjects as arguments for
featureto create problems with multiple zones.
add_absolute_targetsfunctions for adding targets to problems can be used to specify targets for each feature in each zone.
add_manual_targetsfunction for creating targets that pertain to multiple management zones.
solvefunction now returns a
listof solutions when generating a portfolio of solutions.
add_locked_out_constraintsfunctions for specifying which planning units are locked in or out now accept
matrixarguments for specifying which zones are locked in or out.
add_manual_locked_constraintsfunction to manually specify which planning units should or shouldn’t be allocated to specific zones in solutions.
zonesparameter) and specify how they they should be applied (using the
dataparameter. All of these functions have default arguments that mean that problems with a single zone should have the same optimal solution as problems created in the earlier version of the package.
add_feature_weightsfunction can be used to weight different the representation of each feature in each zone.
category_vectorfunctions have been provided to help work with data for multiple management zones.
?prioritizr), and README.
marxan_problemhas been updated with more comprehensive documentation and to provide more helpful error messages. For clarity, it will now only work with tabular data in the standard Marxan format.
add_locked_out_constraintsthrow an exception when used with semi-continuous-type decisions (#59).
compilethrown when the same planning unit is locked in and locked out now prints the planning unit indices in a readable format.
add_locked_out_constraintsare ignored when using proportion-type decisions (#58).
predefined_optimization_problemwhich incorrectly recognized some inputs as invalid when they were in fact valid.
R CMD checkrelated to proto in Depends.
add_lpsymphony_solvernow throws warnings to alert users to potentially incorrect solutions (partially addressing #40).
add_max_cover_objectivefunction has been renamed to the
add_max_utility_objective, because the formulation does not follow the historical formulation of the maximum coverage reserve selection problem (#38).
add_max_cover_objectivefunction now follows the historical maximum coverage objective. This fundamentally changes
add_max_cover_objectivefunction and breaks compatibility with previous version of prioritizr (#38).
add_lpsymphony_solvercausing error when attempting to solve problems.
numericvector data that caused an error.
numericvector input with rij data containing NA values.
add_connectivity_penaltiescausing the function to throw an error when the number of boundaries/edges is less than the number of planning units.
ArrayParameterprototypes to check t that functions for generating widgets have their dependencies installed.
numericplanning unit data and portfolios that caused the
solveto throw an error.
marxan_problemwould always use the first column in the attribute table for the cost data. This bug is serious so analysis that used
marxan_problemshould be rerun.
Spatial*DataFrameobjects are now stored in columns named “solution_*" (e.g. “solution_1”) to store multiple solutions.
verboseargument to all solvers. This replaces the
ConservationProblem$print()now only prints the first three species names and a count of the total number of features. This update means that
ConservationProblemobjects with lots of features can now safely be printed without polluting the R console.
devtools::build_vignettes(). Earlier versions needed the vignettes to be compiled using the Makefile to copy files around to avoid tangled R code causing failures during R CMD CHECK. Although no longer needed, the vignettes can still be compiled using the shell command
make vignsif desired.
rmarkdown::render("README.Rmd")or using the shell command
make readme. Note that the figures for
README.mdcan be found in the directory
prshinywill now only be run if executed during an interactive R session. Prior to this R CMD CHECK would hang.
problem.data.framethat meant that it did not check for missing values in
add_absolute_targetsand add_relative_targets` related to their standardGeneric being incorrectly defined
list. The elements in the list are assumed to be
dsCMatrixobjects (aka symmetric sparse matrices in a compressed format) and are coerced to
dgCMatrixobjects to reduce computational burden. There was a typo, however, and so the objects were coerced to
dgCMatrix. This evidently was ok in earlier versions of the RcppArmadillo and/or Matrix packages but not in the most recent versions.
NAon some systems preventing users from using the Gurobi solver–even when one thread is specified.
add_default_solverto own help file
add_corridor_constraintsthat fails to actually add the constraints with argument to
connectivityis a list.
make installcommand so that it now actually installs the package.