cosapp.drivers.montecarlo

Classes

MonteCarlo(name, owner, **kwargs)

This driver execute a MonteCarlo simulation on its system.

RandomVariable(variable, distribution, connector)

class cosapp.drivers.montecarlo.MonteCarlo(name: str, owner: Optional[cosapp.systems.System] = None, **kwargs)[source]

Bases: cosapp.drivers.abstractsetofcases.AbstractSetOfCases

This driver execute a MonteCarlo simulation on its system.

A
X0
Y0
add_random_variable(names: Union[str, Iterable[str]])None[source]

Add variable to be perturbated.

The perturbation distribution is defined by the variable distribution details.

Parameters

names (Union[str, Iterable[str]]) – List of variables to be perturbated

add_response(name: Union[str, Iterable[str]])None[source]

Add a variable for which the statistical response will be calculated.

Parameters

name (Union[str, Iterable[str]]) – List of variable names to add

compute()None[source]

Contains the customized Module calculation, to execute after children.

draws
linear
perturbations
random_variables
reference_case_solution
responses
solver
class cosapp.drivers.montecarlo.RandomVariable(variable, distribution, connector)[source]

Bases: NamedTuple

add_noise(quantile=None)float[source]
connector: Optional[SystemConnector]

Alias for field number 2

distribution: cosapp.utils.distributions.distribution.Distribution

Alias for field number 1

draw(quantile=None)float[source]
set_perturbation(value)None[source]
variable: VariableReference

Alias for field number 0