see_if_marxan_best_was_actually_best: Verify whether the solution marxan chose as best was actually...

see_if_marxan_best_was_actually_bestR Documentation

Verify whether the solution marxan chose as best was actually its best

Description

A comment in the marxan mailing list said that sometimes in the unix version of marxan, the solution that marxan marked as its best was not actually its best. This function looks at all of marxan's solutions and compares them to marxan's chosen best solution to verify that it really was the best.

Usage

see_if_marxan_best_was_actually_best(
  best_solution_ID_according_to_marxan,
  marxan_solution_scores_wrt_APP_reps_and_costs,
  marxan_output_dir
)

Arguments

best_solution_ID_according_to_marxan

integer

marxan_solution_scores_wrt_APP_reps_and_costs

data frame

marxan_output_dir

character string

Details

Writes an empty file in the marxan output directory and the name of the file indicates whether marxan really did return its best guess. This will make it easy to quickly search a bunch of runs to see whether any of them had a bad marxan choice for best run by just looking for the existance of any files whose names begin with "BAD__" or "HALF_BAD__. This should never happen, but this function is run to make sure.

The empty file that is written has one of the following names:

- OK__marxan_solution_IS_apparent_best_cost_and_best_rep: If marxan's chosen best cost solution really is its best cost solution

- BAD__marxan_solution_NEITHER_best_cost_nor_best_rep: If marxan's chosen best is also neither the best cost nor the best representation

- HALF_BAD__marxan_solution_NOT_apparent_best_cost_but_IS_apparent_best_rep: If marxan's chosen best is not best cost but is best representation

- HALF_BAD__marxan_solution_IS_apparent_best_cost_but_NOT_apparent_best_rep: If marxan's chosen best is best cost but is NOT best representation

Value

Returns nothing


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