Sensitivity analysis (GSA)

Global sensitivity analysis: MOAT, Sobol', and RBD-FAST.

ModelManager.MOATType
MOAT <: GSAMethod

Morris One-At-A-Time global sensitivity analysis.

Fields

  • lhs_variation::LHSVariation

Examples

MOAT()      # default 15 base points
MOAT(10)    # 10 base points
MOAT(10; add_noise=true)
source
ModelManager.RBDType
RBD <: GSAMethod

Random Balance Design global sensitivity analysis.

Fields

  • rbd_variation::RBDVariation
  • num_harmonics::Int

Examples

RBD(15)
RBD(15; num_harmonics=10)
RBD(15; use_sobol=false)
source
ModelManager.SobolʼType
Sobolʼ <: GSAMethod

Sobol' variance-based global sensitivity analysis.

The ʼ (rasp) symbol avoids conflict with the Sobol module. Type \rasp<tab> in VS Code. SobolMM is provided as a plain-ASCII alias.

Fields

  • sobol_variation::SobolVariation
  • sobol_index_methods::NamedTuple{(:first_order,:total_order),Tuple{Symbol,Symbol}}

Examples

Sobolʼ(15)
Sobolʼ(15; sobol_index_methods=(first_order=:Jansen1999, total_order=:Jansen1999))
Sobolʼ(15; skip_start=true)
source
Base.runMethod
run(method::GSAMethod, inputs::InputFolders, avs; functions, kwargs...)
run(method::GSAMethod, reference::AbstractMonad, avs; functions, kwargs...)

Run a global sensitivity analysis and return a GSASampling result.

kwargs are forwarded to run(::Sampling; ...) and from there to the simulator hooks — pass any simulator-specific options here.

source
ModelManager.calculateGSA!Method
calculateGSA!(gsa_sampling, functions; recompute=false)
calculateGSA!(gsa_sampling, f; recompute=false)

Calculate sensitivity indices for functions (or for the single measurement f) and file them in gsa_sampling.results under their labels — see gsaLabels.

A measurement whose results are already present is skipped, so adding a quantity to an analysis costs only the new one: run(method, spec; functions=[q1]) followed by calculateGSA!(gsa, [q1, q2]) reads each simulation's output for q2 alone.

Results accumulate. A measurement absent from functions keeps whatever it produced earlier — that is what makes adding a quantity cheap, and its indices are not stale, having been computed from this same sampling. What recompute replaces is the labels of the measurements you do name, so a reducer that drops or renames a key leaves nothing behind; it never prunes ones you do not name. empty!(gsa_sampling.results) is how you start over.

Keywords

  • recompute: evaluate even where results already exist, replacing every label that measurement owns rather than merging into them — so a reducer that drops or renames a key leaves nothing stale behind. Needed when the measurement itself has changed, because nothing can detect that — redefining a function's body in place leaves it indistinguishable from the one already evaluated, the same reason a QoI's stored defaults to :never.

Errors

Two entries of functions that produce the same label — most easily two QoIs with the same name — are refused, since one would silently replace the other. Nothing is filed when this happens; the whole call is rejected before any result is stored.

source
ModelManager.gsaLabelsMethod
gsaLabels(gsa_sampling::GSASampling)

The labels of the sensitivity analyses computed on gsa_sampling, sorted.

One label is not one functions= entry. A QoI whose reduce returns a Dict or NamedTuple yields one analysis per key, labelled "<qoi name>.<key>"; a Real yields one labelled with the QoI's name. Each label indexes gsa_sampling.results.

source
ModelManager.methodStringMethod
methodString(gsa_sampling::GSASampling)

Return a lowercase string identifier for the GSA method (e.g. "moat", "sobol").

source
ModelManager.monadIDsMethod
monadIDs(gsa_sampling::GSASampling)

Return the IDs of the monads evaluated in the sensitivity analysis.

These are the same monads that getMonadIDDataFrame reports, flattened and deduplicated: the data frame arranges them in the shape the method's design requires — one column per factor for MOAT, for instance — while this gives the flat set, which is what monadsTable and the deletion functions want.

source