run_gurobi | R Documentation |
Run gurobi linear programming optimizer
run_gurobi( num_spp, num_PUs, bpm, PU_costs, spp_rep_targets, use_gap_limit = FALSE, gap_limit = 0.005, use_given_time_as_limit = TRUE, time_limit = 60, use_marxan_time_as_limit = FALSE, marxan_elapsed_time = NA, rsrun = NULL, top_dir = NULL, save_inputs = FALSE, save_outputs = FALSE )
num_spp |
integer number of species in the problem |
num_PUs |
integer number of planning units |
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. |
PU_costs |
numeric vector of planning unit costs |
spp_rep_targets |
numeric vector with a target abundance for each species in the problem |
use_gap_limit |
boolean indicating whether to set a maximum gap allowed between the result of the optimization computation and the correct optimum value; TRUE implies set the gap value, FALSE implies no gap enforced |
gap_limit |
numeric value for gap, measured in same units as the objective function |
use_given_time_as_limit |
boolean indicating whether to set a time limit on the optimization computation; TRUE implies set the limit, FALSE implies no time limit |
time_limit |
numeric value for time limit measured in seconds |
use_marxan_time_as_limit |
boolean indicating whether reserve selector should use marxan's elapsed run time as the time limit for its own run |
marxan_elapsed_time |
numeric value containing elapsed time for running marxan (in seconds) |
rsrun |
an RSrun (reserve selection run) object, e.g., a marxan run |
top_dir |
character string giving the path to the top directory of the tree where the object is written out, usually something like the tzar output directory of the experiment followed by some object-specific information and the UUID of the object, e.g., ~/tzarout/RSprob-COR-Base.299140ae-3be2-4331-bb72-b24570902587 |
save_inputs |
boolean indicating whether input model and input params should be saved to disk |
save_outputs |
boolean indicating whether results and gurobi_controls_and_results params should be saved to disk |
Returns a gurobi model result list with named elements that contains, among other things, an element x which is the solution vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.