pystra.model.StochasticModel#
- class StochasticModel[source]#
Bases:
objectStochastic model
Attributes can be accessed via properties or the legacy getter methods:
model.constants # preferred model.getConstants() # legacy, equivalent
Use ordered dictionary to make sure that the order corresponds to the correlation matrix
Methods
addCallFunctionAdd a random variable or constant to the model.
getCallFunctiongetConstantsgetCorrelationgetLenMarginalDistributionsgetMarginalDistributionsgetModifiedCorrelationgetNamesgetVariablegetVariablessetCorrelationsetMarginalDistributionssetModifiedCorrelation- addVariable(obj)[source]#
Add a random variable or constant to the model.
- Parameters:
obj (Distribution or Constant) – The variable to add. Distributions are treated as random variables; Constants are stored separately and passed as fixed values to the limit state function.
- Raises:
Exception – If obj is not a Distribution or Constant, or if a variable with the same name already exists.
- property constants#
Dictionary of constant name → value pairs.
- property names#
List of all variable and constant names, in insertion order.
- property n_marg#
Number of marginal (stochastic) distributions.
- property marginal_distributions#
List of marginal Distribution objects.
- property correlation#
Correlation matrix (n × n numpy array).
- property modified_correlation#
Modified (Nataf) correlation matrix Ro.
- property call_function#
Cumulative number of limit-state function evaluations.