Skip to content

Commit

Permalink
Update class_DispersalParams.R
Browse files Browse the repository at this point in the history
corrected bug for having sex dependent settlement rules
  • Loading branch information
JetteReeg authored Feb 7, 2024
1 parent 41e04c6 commit b2f81cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RangeShiftR/R/class_DispersalParams.R
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ setValidity("DispersalParams", function(object) {
msg <- c(msg, "Dispersal(): Settlement can only be density-dependent (DensDep = TRUE) if a movement process is used as transfer method!")
}
}else{
if (object@Settlement@MaxSteps<=0 && all(object@Transfer@StepMort<=0) ) {
if (any(object@Settlement@MaxSteps<=0) && all(object@Transfer@StepMort<=0) ) {
msg <- c(msg, "Dispersal(): At least one of the two options MaxSteps and StepMort must be set (>0) if a movement process is used as transfer method!")
}
}
Expand Down

0 comments on commit b2f81cf

Please sign in to comment.