% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_parse.R
\name{write_settings_json}
\alias{write_settings_json}
\title{Write run configuration to settings.json}
\usage{
write_settings_json(
  path,
  param_ranges,
  error_models,
  algorithm,
  cycles,
  idelta,
  tad,
  prior,
  points,
  seed
)
}
\arguments{
\item{path}{Full path (including filename) to write the \code{settings.json} file.}

\item{param_ranges}{A named list mapping parameter names to \code{c(min, max)}
ranges, in parameter order.}

\item{error_models}{A list of \code{PM_err} objects, each carrying \code{type},
\code{initial}, \code{coeff}, \code{fixed}, and \code{outeq}.}

\item{algorithm}{The fitting algorithm (e.g. "NPAG").}

\item{cycles}{Maximum number of cycles.}

\item{idelta}{Prediction interval used when writing outputs.}

\item{tad}{Additional time after the last event used when writing outputs.}

\item{prior}{The prior specification ("sobol" or "prior.csv").}

\item{points}{Number of Sobol grid points.}

\item{seed}{Random seed used to generate the Sobol grid.}
}
\value{
Invisibly returns the path written.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}}

Writes a \code{settings.json} file describing a fit's configuration. The Rust
backend writes the estimation artifacts (theta.csv, posterior.csv, pred.csv,
covs.csv, cycles.csv, result.json) but not the configuration file that the
Pmetrics output parsers (\link{PM_op}, \link{PM_final}, \link{PM_cycle}, etc.) expect. This
helper reconstructs that file from the model and fit settings.
}
\keyword{internal}
