verify_that_generated_solution_really_is_a_solution: Verify that solution does cover all species

verify_that_generated_solution_really_is_a_solutionR Documentation

Verify that solution does cover all species

Description

Theoretically, this should not be necessary, but checking it here to make sure that the implementation is working correctly. Correct solutions will have every species attaining a representation fraction of their target of at least 1 (where 1 means exactly meeting their target).

Usage

verify_that_generated_solution_really_is_a_solution(
  bpm,
  dependent_node_IDs,
  num_spp,
  num_PUs,
  PU_costs
)

Arguments

bpm

bipartite matrix; integer matrix with one row for each species and one column for each planning unit. Each matrix entry specifies whether that species occupies that planning unit; 1 indicates the species does occupy the planning unit and 0 indicates it does not. Same as occ_matrix.

dependent_node_IDs

integer vector of IDs of planning units contained in a constructed correct solution to a Xu problem

num_spp

integer number of species in the problem

num_PUs

integer number of planning units

PU_costs

numeric vector of planning unit costs

Value

Returns TRUE if given solution does cover all species targets; quits otherwise


langfob/bdpg documentation built on Dec. 8, 2022, 5:33 a.m.