Open michelledayusfs opened 1 year ago
I’ve simplified this a bit and updated the descriptions. Both are now between 0 and 1 with a default of 0.5. The scale is 10x. So 0 = no distance cost and 1 = 10x distance cost. I removed the negative values to avoid confusion.
#' @field sdw Get/set spatial distance weight between 0 and 1. Default 0.5. At 0, patches are highly constrained by distance, resulting in compact shapes. At 1, patches are less unconstrained by distance and seek out areas with higher objectives.
#' @field epw Get/set exclusion penalty weight between 0 and 1. Default 0.5. Values closer to 1 enact a greater cost on projects spanning areas excluded by the project stand threshold.
For reference, this is where the magic happens in the code where the pairwise distance between any two adjacent polygons is increased if the objective is at/near its minimum, and/or one of the stands is excluded because of the threshold.
# modify distance based on objective
el$dist_adj <- el$dist * (2 - el$objective)^(10^sdw)
# modify distance based on exclusion status
el$dist_adj <- el$dist_adj * ifelse(el$exclude, 10^epw, 1)
On Jan 5, 2023 at 10:06 AM -0600, Michelle Day @.***>, wrote:
Assigned #20 to @codyevers. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.Message ID: @.***>
Okay, I'm trying to document updates to patchmax in a word doc. This is just a start. Patchmax_Version_0.2.0.docx
I found this comment in the patchmax code; this is no longer true, correct? It is between 0 and 1? Where zero allows patchmax to go anywhere, and jump over any unavailable stands to find high objective stands, and 1 forces patchmax to go around unavailable stands?
"#' @field epw Get/set exclusion penality weight between -1 and 1. Default 0. At 0, patches neither privilege or penalize excluded ares. Values closer to 1 enact a greater cost on projects spanning areas excluded by the project stand threshold. Values less than 0 readily search out excluded areas." [line 682, patchmax_r6.R]