MorrisReporter

Compute global sensitivities using the Morris method.

Overview

This object computes the Morris sensitivity quantities following the procedure defined by Saltelli et al. (2008). The MorrisReporter object only operates on result data generated from Morris-based sampling strategy, which is provided by the Morris.

Elementary Effects

Much of the following information is taken directly from the GSA module, see this documentation for more details.

Given a model with DD parameters defined by the vector x\vec{x} and a model with response function f(x)f(\vec{x}) the elementary effect for a given parameter kk is defined as Morris (1991):

EEk=f(x+Δd)f(x)Δd,k=1,...,D,EE_k = \frac{f(\vec{x} + \vec{\Delta_d}) - f(\vec{x})}{\Delta_d}\,, k=1,...,D ,

where Δk\Delta_k is a perturbation of parameter xkx_k and Δk\vec{\Delta_k} is a vector of length DD of all zeros except the kkth entry equal to Δk\Delta_k. Given a one-at-a-time (OAT) sampling strategy, detailed in Morris, with NN replicates, or trajectories, there will be a total of N×DN\times D elementary effects. The purpose of computing these elementary effects is to evaluate a local sensitivity over these random trajectories, the global sensitivity can then be gleaned by accumulating these local effects. As such, this reporter computes the following statistics of this elementary effect matrix:

μd=1Ni=1NEEi,d,\mu_d = \frac{1}{N}\sum_{i=1}^{N}EE_{i,d},μd=1Ni=1NEEi,d,\mu_d^{*} = \frac{1}{N}\sum_{i=1}^{N}|EE_{i,d}|,σd=1N1i=1N(EEi,dμd)2.\sigma_d = \sqrt{\frac{1}{N-1}\sum_{i=1}^{N}\left(EE_{i,d} - \mu_d\right)^2} .

The μ\mu^{*} statistic is typically preferred over μ\mu because it is agnostic to negative effects that could cancel out positive ones when sampling. These statistics can be interpreted as the effect of the parameters on the response in the following ways:

  1. μ0,σ0\mu^{*} \approx 0, \sigma \approx 0: parameter has no influential impact on the response.

  2. μ>>0\mu^{*} >> 0: parameter has a significant impact on the response.

  3. σ>>0\sigma >> 0: parameter has nonlinear or interactive effects.

  4. μ>>0,σ0\mu^{*} >> 0, \sigma \approx 0: parameter is additive or linear

  5. μ0,σ>>0\mu^{*} \approx 0, \sigma >> 0: parameter has a negligible aggregate effect on the response while nonlinear perturbations (perturbing in more than one direction) can be significant.

This reporter can also compute confidence intervals using percentile bootstrapping. This works by randomly sampling replicates, or trajectories, re-computing the statistics, sorting them, then choosing the requested percentile.

Trajectory Design

Computing elementary effects from the trajectory design is rather simple. For a single trajectory matrix (xi\mathbf{x_{i}}) and the corresponding response vector (yi\vec{y_i}), the elementary effects (EEi\vec{EE_{i}}) can be computed as:

EEi=δxi1δyi,i=1,...,N,\vec{EE_{i}} = \delta\mathbf{x_i}^{-1}\delta\vec{y_i}\,, i=1,...,N,

where

(δxi)j,d=(xi)j+1,d(xi)j,d,(δyi)j,d=(yi)j+1,d(yi)j,d,j,d=1,...,D(\delta\mathbf{x_i})_{j,d} = (\mathbf{x_i})_{j+1,d} - (\mathbf{x_i})_{j,d},\quad (\delta\vec{y_i})_{j,d} = (\vec{y_i})_{j+1,d} - (\vec{y_i})_{j,d},\quad j,d=1,...,D

Taking the first trajectory in this sampling:

x1=[0.40.00.20.40.60.20.40.60.81.00.60.8],δxi=[00.60000.60.600],\mathbf{x_1} = \begin{bmatrix} 0.4 & 0.0 & 0.2 \\ 0.4 & 0.6 & 0.2 \\ 0.4 & 0.6 & 0.8 \\ 1.0 & 0.6 & 0.8 \end{bmatrix} , \quad \delta\mathbf{x_i} = \begin{bmatrix} 0 & 0.6 & 0 \\ 0 & 0 & 0.6 \\ 0.6 & 0 & 0 \end{bmatrix},y1=[y1y2y3y4],δy1=[y2y1y3y2y4y3],\vec{y_1} = \begin{bmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \end{bmatrix} , \quad \delta\vec{y_1} = \begin{bmatrix} y_2 - y_1 \\ y_3 - y_2 \\ y_4 - y_3 \end{bmatrix},EE1=[(y2y1)/0.6(y3y2)/0.6(y4y3)/0.6].\vec{EE_1} = \begin{bmatrix} (y_2 - y_1)/0.6 \\ (y_3 - y_2)/0.6 \\ (y_4 - y_3)/0.6 \end{bmatrix}.

Example Input Syntax

The following example computes the elementary effect statistics along with 10% and 90% confidence points for two scalar quantities and one vector quantity:

[Reporters]
  [storage]
    type = StochasticReporter
    outputs = NONE
  []
  [morris]
    type = MorrisReporter
    reporters = 'storage/data:const:gf storage/data:const:gfa storage/data:const:gf_vec'
    ci_levels = '0.1 0.9'
    ci_replicates = 1000
    execute_on = FINAL
  []
[]
(contrib/moose/modules/stochastic_tools/test/tests/reporters/morris/morris_main.i)

The resulting output is a json file with the statistics and their confidence intervals:

{
    "reporters": {
        "morris": {
            "confidence_intervals": {
                "levels": [
                    0.1,
                    0.9
                ],
                "method": "percentile",
                "replicates": 1000,
                "seed": 1
            },
            "levels": 4,
            "num_params": 6,
            "num_trajectories": 10,
            "type": "MorrisReporter",
            "values": {
                "storage_data:const:gf": {
                    "type": "MorrisSensitivity<double>"
                },
                "storage_data:const:gf_vec": {
                    "type": "MorrisSensitivity<std::vector<double>>"
                },
                "storage_data:const:gfa": {
                    "type": "MorrisSensitivity<double>"
                }
            }
        }
    },
    "time_steps": [
        {
            "morris": {
                "storage_data:const:gf": {
                    "mu": [
                        [
                            0.14003777640603499,
                            0.23486271604938236,
                            0.019146888888888956,
                            -0.2508708395061733,
                            0.0026827434842249392,
                            -0.007200367626886086
                        ],
                        [
                            [
                                -1.2325939533607684,
                                1.5361547736625507
                            ],
                            [
                                -0.5525859094650214,
                                1.0392915884773661
                            ],
                            [
                                -0.27349137448559674,
                                0.3354997283950617
                            ],
                            [
                                -0.3605694238683134,
                                -0.14417828806584385
                            ],
                            [
                                -0.018271950617283948,
                                0.02520138820301787
                            ],
                            [
                                -0.023697500685870797,
                                0.008746403292181
                            ]
                        ]
                    ],
                    "mu_star": [
                        [
                            2.9644790137174217,
                            1.7399342386831278,
                            0.5776296213991771,
                            0.27696874074074124,
                            0.04361360768175586,
                            0.030291978052126044
                        ],
                        [
                            [
                                2.391163296296296,
                                3.548351499314129
                            ],
                            [
                                1.4252492674897117,
                                2.074566106995885
                            ],
                            [
                                0.39996249382716026,
                                0.7697816131687244
                            ],
                            [
                                0.1811841893004118,
                                0.37592302880658496
                            ],
                            [
                                0.030497805212620042,
                                0.05691224965706458
                            ],
                            [
                                0.019940449931412845,
                                0.04065762962962936
                            ]
                        ]
                    ],
                    "sigma": [
                        [
                            3.4515172961553495,
                            2.000999470636173,
                            0.7749055097226091,
                            0.2805404088215204,
                            0.056805972241684044,
                            0.041452993003762297
                        ],
                        [
                            [
                                2.62046784677586,
                                3.8166881070254908
                            ],
                            [
                                1.4975740532796855,
                                2.279605828547558
                            ],
                            [
                                0.39554801682528357,
                                0.9729485897113243
                            ],
                            [
                                0.15162291505564338,
                                0.34007562410477604
                            ],
                            [
                                0.03814454479733509,
                                0.06628294252485757
                            ],
                            [
                                0.022423093752465106,
                                0.05021869384373568
                            ]
                        ]
                    ]
                },
                "storage_data:const:gf_vec": {
                    "mu": [
                        [
                            [
                                0.14003777640603499,
                                1.7777777777777768
                            ],
                            [
                                0.23486271604938236,
                                -4.4408920985006264e-17
                            ],
                            [
                                0.019146888888888956,
                                0.8296296296296288
                            ],
                            [
                                -0.2508708395061733,
                                -3.2000000000000006
                            ],
                            [
                                0.0026827434842249392,
                                0.0
                            ],
                            [
                                -0.007200367626886086,
                                0.0
                            ]
                        ],
                        [
                            [
                                [
                                    -1.2325939533607684,
                                    -2.014814814814816
                                ],
                                [
                                    1.5361547736625507,
                                    5.688888888888887
                                ]
                            ],
                            [
                                [
                                    -0.5525859094650214,
                                    -1.777777777777778
                                ],
                                [
                                    1.0392915884773661,
                                    1.7777777777777775
                                ]
                            ],
                            [
                                [
                                    -0.27349137448559674,
                                    -1.422222222222223
                                ],
                                [
                                    0.3354997283950617,
                                    3.3185185185185175
                                ]
                            ],
                            [
                                [
                                    -0.3605694238683134,
                                    -5.096296296296297
                                ],
                                [
                                    -0.14417828806584385,
                                    -1.3037037037037043
                                ]
                            ],
                            [
                                [
                                    -0.018271950617283948,
                                    0.0
                                ],
                                [
                                    0.02520138820301787,
                                    0.0
                                ]
                            ],
                            [
                                [
                                    -0.023697500685870797,
                                    0.0
                                ],
                                [
                                    0.008746403292181,
                                    0.0
                                ]
                            ]
                        ]
                    ],
                    "mu_star": [
                        [
                            [
                                2.9644790137174217,
                                6.7555555555555555
                            ],
                            [
                                1.7399342386831278,
                                3.9111111111111114
                            ],
                            [
                                0.5776296213991771,
                                3.9111111111111114
                            ],
                            [
                                0.27696874074074124,
                                3.5555555555555562
                            ],
                            [
                                0.04361360768175586,
                                0.0
                            ],
                            [
                                0.030291978052126044,
                                0.0
                            ]
                        ],
                        [
                            [
                                [
                                    2.391163296296296,
                                    4.148148148148149
                                ],
                                [
                                    3.548351499314129,
                                    9.362962962962964
                                ]
                            ],
                            [
                                [
                                    1.4252492674897117,
                                    3.2
                                ],
                                [
                                    2.074566106995885,
                                    4.622222222222223
                                ]
                            ],
                            [
                                [
                                    0.39996249382716026,
                                    2.014814814814815
                                ],
                                [
                                    0.7697816131687244,
                                    5.807407407407408
                                ]
                            ],
                            [
                                [
                                    0.1811841893004118,
                                    1.7777777777777781
                                ],
                                [
                                    0.37592302880658496,
                                    5.451851851851853
                                ]
                            ],
                            [
                                [
                                    0.030497805212620042,
                                    0.0
                                ],
                                [
                                    0.05691224965706458,
                                    0.0
                                ]
                            ],
                            [
                                [
                                    0.019940449931412845,
                                    0.0
                                ],
                                [
                                    0.04065762962962936,
                                    0.0
                                ]
                            ]
                        ]
                    ],
                    "sigma": [
                        [
                            [
                                3.4515172961553495,
                                9.579737799887125
                            ],
                            [
                                2.000999470636173,
                                4.513050729400835
                            ],
                            [
                                0.7749055097226091,
                                6.19126140022826
                            ],
                            [
                                0.2805404088215204,
                                4.9909291290402
                            ],
                            [
                                0.056805972241684044,
                                0.0
                            ],
                            [
                                0.041452993003762297,
                                0.0
                            ]
                        ],
                        [
                            [
                                [
                                    2.62046784677586,
                                    6.207625441823277
                                ],
                                [
                                    3.8166881070254908,
                                    11.558509699419494
                                ]
                            ],
                            [
                                [
                                    1.4975740532796855,
                                    3.455378900649068
                                ],
                                [
                                    2.279605828547558,
                                    4.972130835769607
                                ]
                            ],
                            [
                                [
                                    0.39554801682528357,
                                    2.6086042894568573
                                ],
                                [
                                    0.9729485897113243,
                                    8.0081653193313
                                ]
                            ],
                            [
                                [
                                    0.15162291505564338,
                                    1.8360809937575904
                                ],
                                [
                                    0.34007562410477604,
                                    6.568012623208425
                                ]
                            ],
                            [
                                [
                                    0.03814454479733509,
                                    0.0
                                ],
                                [
                                    0.06628294252485757,
                                    0.0
                                ]
                            ],
                            [
                                [
                                    0.022423093752465106,
                                    0.0
                                ],
                                [
                                    0.05021869384373568,
                                    0.0
                                ]
                            ]
                        ]
                    ]
                },
                "storage_data:const:gfa": {
                    "mu": [
                        [
                            1.7777777777777768,
                            -4.4408920985006264e-17,
                            0.8296296296296288,
                            -3.2000000000000006,
                            0.0,
                            0.0
                        ],
                        [
                            [
                                -2.014814814814816,
                                5.688888888888887
                            ],
                            [
                                -1.777777777777778,
                                1.7777777777777775
                            ],
                            [
                                -1.422222222222223,
                                3.3185185185185175
                            ],
                            [
                                -5.096296296296297,
                                -1.3037037037037043
                            ],
                            [
                                0.0,
                                0.0
                            ],
                            [
                                0.0,
                                0.0
                            ]
                        ]
                    ],
                    "mu_star": [
                        [
                            6.7555555555555555,
                            3.9111111111111114,
                            3.9111111111111114,
                            3.5555555555555562,
                            0.0,
                            0.0
                        ],
                        [
                            [
                                4.148148148148149,
                                9.362962962962964
                            ],
                            [
                                3.2,
                                4.622222222222223
                            ],
                            [
                                2.014814814814815,
                                5.807407407407408
                            ],
                            [
                                1.7777777777777781,
                                5.451851851851853
                            ],
                            [
                                0.0,
                                0.0
                            ],
                            [
                                0.0,
                                0.0
                            ]
                        ]
                    ],
                    "sigma": [
                        [
                            9.579737799887125,
                            4.513050729400835,
                            6.19126140022826,
                            4.9909291290402,
                            0.0,
                            0.0
                        ],
                        [
                            [
                                6.207625441823277,
                                11.558509699419494
                            ],
                            [
                                3.455378900649068,
                                4.972130835769607
                            ],
                            [
                                2.6086042894568573,
                                8.0081653193313
                            ],
                            [
                                1.8360809937575904,
                                6.568012623208425
                            ],
                            [
                                0.0,
                                0.0
                            ],
                            [
                                0.0,
                                0.0
                            ]
                        ]
                    ]
                }
            },
            "time": 2.0,
            "time_step": 2
        }
    ]
}
(contrib/moose/modules/stochastic_tools/test/tests/reporters/morris/gold/morris_main_out.json)

We see that for each vector we have three quantities: mu for μ\mu, mu_star for μ\mu^{*}, sigma for σ\sigma. Each has a pair containing a vector and a vector of vectors of the response value type. The first is the computed value for each parameter. The second has an entry for these values for each confidence point.

Input Parameters

  • samplerMorris sampler used to generate samples.

    C++ Type:SamplerName

    Unit:(no unit assumed)

    Controllable:No

    Description:Morris sampler used to generate samples.

Required Parameters

  • ci_levelsA vector of confidence levels to consider, values must be in (0, 1).

    C++ Type:std::vector<double>

    Unit:(no unit assumed)

    Controllable:No

    Description:A vector of confidence levels to consider, values must be in (0, 1).

  • ci_replicates10000The number of replicates to use when computing confidence level intervals. This is basically the number of times the statistics are recomputed with a random selection of indices.

    Default:10000

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The number of replicates to use when computing confidence level intervals. This is basically the number of times the statistics are recomputed with a random selection of indices.

  • ci_seed1The random number generator seed used for creating replicates while computing confidence level intervals.

    Default:1

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The random number generator seed used for creating replicates while computing confidence level intervals.

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • reportersList of Reporter values to utilized for statistic computations.

    C++ Type:std::vector<ReporterName>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of Reporter values to utilized for statistic computations.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

  • vectorpostprocessorsList of VectorPostprocessor(s) to utilized for statistic computations.

    C++ Type:std::vector<VectorPostprocessorName>

    Unit:(no unit assumed)

    Controllable:No

    Description:List of VectorPostprocessor(s) to utilized for statistic computations.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • outputsVector of output names where you would like to restrict the output of variables(s) associated with this object

    C++ Type:std::vector<OutputName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

References

  1. Max D. Morris. Factorial sampling plans for preliminary computational experiments. Technometrics, 33(2):161–174, 1991. doi:10.1080/00401706.1991.10484804.[BibTeX]
  2. Andrea Saltelli, Marco Ratto, Terry Andres, Francesca Campolongo, Jessica Cariboni, Debora Gatelli, Michaela Saisana, and Stefano Tarantola. Global Sensitivity Analysis. The Primer. John Wiley & Sons, Ltd, 2008. ISBN 9780470059975.[BibTeX]