% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/engine-selection-v0965.R
\name{pick_engine}
\alias{pick_engine}
\title{Choose the best diagnostic engine for a single pedon}
\usage{
pick_engine(pedon, min_score = 3L)
}
\arguments{
\item{pedon}{A \code{\link{PedonRecord}}.}

\item{min_score}{Integer (1-5). Minimum completeness score for
\code{"aqp"} engine to fire (default 3).}
}
\value{
Character: \code{"aqp"} or \code{"soilkey"}.
}
\description{
Per-pedon heuristic: returns \code{"aqp"} if the pedon's horizon
table has the morphological richness that makes aqp's canonical
NRCS dispatch reliable, otherwise returns \code{"soilkey"} (the
more permissive hand-coded path).
}
\section{Heuristic}{


We score each pedon on a 0-5 morphology-completeness scale; aqp
fires when score \\>= \code{min_score} (default 3). The five
axes:
\enumerate{
  \item \strong{Designation present} (any layer has a non-blank
        \code{designation}, e.g. "A1", "Bt2", "Bw").
  \item \strong{Texture quantitative} (any layer has both
        \code{clay_pct} and \code{sand_pct} populated).
  \item \strong{Munsell complete} (any layer has all three of
        \code{munsell_hue_moist}, \code{munsell_value_moist},
        \code{munsell_chroma_moist} populated).
  \item \strong{Structure recorded} (any layer has a non-blank
        \code{structure_grade}).
  \item \strong{Clay films / argic evidence} (any layer has
        a non-blank \code{clay_films_amount} or designation
        pattern matching \code{Bt}).
}
}

\section{Why this matters}{


On BDsolos RJ (data-rich), the heuristic recommends aqp for
~99% of pedons (their full morphology + chemistry justifies the
canonical thresholds). On LUCAS topsoil-only (data-sparse), it
recommends aqp for ~0% of pedons, because the structure /
clay-films / designation axes are unfilled. Calling
\code{classify_*(pedon)} routed through the heuristic gives the
correct engine per pedon, recovering both the BDsolos RJ lift
AND the LUCAS robustness.
}

\seealso{
\code{\link{argic}}, \code{\link{cambic}}.
}
