% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCIS_helpers.R
\name{MC_IS_gsys}
\alias{MC_IS_gsys}
\title{Monte Carlo Importance Sampling using smooth system aggregation}
\usage{
MC_IS_gsys(
  sys_input,
  sys_structure = "serial",
  smooth_kappa = 20,
  cov_user = 0.05,
  n_batch = 5000,
  n_max = 1e+06,
  use_threads = 4,
  backend = "future",
  dataRecord = TRUE,
  densityType = "norm",
  dps = NULL,
  debug.level = 0,
  seed = NULL,
  adaptive_alpha = FALSE,
  alpha_update_rate = 0.1,
  adaptive_batch = FALSE,
  batch_control = list(),
  min_adapt_samples = 10000,
  alpha_min = 0.02,
  stability_mode = "robust"
)
}
\arguments{
\item{sys_input}{List of \code{SYS_LSF} objects defining the system.}

\item{sys_structure}{System aggregation type: \code{"serial"},
\code{"parallel"}, or a custom function.}

\item{smooth_kappa}{Smoothing parameter controlling the
approximation of min/max aggregation.}

\item{cov_user}{Target coefficient of variation (CoV) for the Monte Carlo
estimator. Simulation stops once this threshold is reached.}

\item{n_batch}{Number of samples generated per iteration.}

\item{n_max}{Maximum total number of samples (upper stopping limit).}

\item{use_threads}{Number of worker threads (for parallel execution).}

\item{backend}{Parallel backend, either \code{"future"} or \code{"parallel"}.}

\item{dataRecord}{Logical; if \code{TRUE}, intermediate results per iteration
are stored and returned.}

\item{densityType}{Sampling density type (currently \code{"norm"} supported).}

\item{dps}{Optional vector of design points in physical space; if supplied,
FORM analysis is skipped.}

\item{debug.level}{Integer verbosity level (0 = silent, 1 = summary, 2 = detailed).}

\item{seed}{Optional integer seed for reproducible random numbers.}

\item{adaptive_alpha}{Logical; if \code{TRUE}, adaptive mixture weights are used
(system case only).}

\item{alpha_update_rate}{Damping factor \eqn{\lambda \in [0,1]} controlling
adaptation speed of mixture weights.}

\item{adaptive_batch}{Logical; if TRUE, the batch size is adapted dynamically
based on the current effective sample size (ESS) and target RSE.}

\item{batch_control}{List controlling adaptive batch behaviour:
\describe{
  \item{n_min}{Minimum batch size}
  \item{n_max}{Maximum batch size}
  \item{K_future}{Desired number of remaining iterations}
}}

\item{min_adapt_samples}{Integer. Minimum total number of MC samples required before adaptive mixtures are updated.
The adaption mechanism is activated only after this threshold has been exceeded to ensure statistically stable estimates.}

\item{alpha_min}{Numeric scalar in \eqn{(0,1)}.
Lower bound for mixture weights \eqn{\alpha_i} during adaptive
updating. This prevents individual components of the importance
sampling density from collapsing to zero and ensures numerical
stability in multimodal system analyses.}

\item{stability_mode}{Character string specifying the numerical
  stabilization strategy used for importance sampling weight
  accumulation.

  \describe{
    \item{"robust"}{
      Default. Uses full log-domain accumulation of weights
      across Monte Carlo iterations. This improves numerical
      stability for high-dimensional systems and very small
      failure probabilities.
    }
    \item{"fast"}{
      Uses shifted exponentiation with batch-level scaling.
      Computationally equivalent under normal engineering
      conditions but may be slightly less stable in extreme
      rare-event scenarios.
    }
  }

  Both modes are mathematically equivalent for typical
  reliability problems. The \code{"robust"} mode is recommended
  for research applications and extreme reliability levels.}
}
\value{
Result object returned by \code{MC_IS_single()} with additional
metadata describing the system configuration.
}
\description{
Performs reliability estimation for systems of limit-state functions
by constructing a **smooth global system limit-state function**
and applying the existing single-LSF importance sampling algorithm.
}
\details{
The system limit-state function is built using \code{build_gsys()},
which aggregates component limit states via smooth min/max operators.

This approach converts a system reliability problem into a standard
single limit-state reliability problem.
}
\keyword{internal}
