reliability

Enums

LineSearchMethod
Bisection
RegulaFalsi

Classes

ReliabilityAdaptiveSampling

Inherits from: ReliabilityBase

Adaptive sampling implements importance sampling using multiple adaptation steps. The first step scales all designs by an initial blow up factor in standard-normal space. The objective of the scaling is to obtain a reasonable number of samples in the failure domain during the 1st step. Hence, the blow up factor should be chosen according to the failure probability pf the problem. While generating the samples one ignores samples which are further away than max_allowed_sigma_ from the origin in standard normal space. The reason is that importance weights become inaccurate for samples being that far away.
After sampling the user-defined number of samples in a single step, the median and covariance matrix of the sampling density function of the next step will be determined according to the statistics of the samples lying in the failure domain. A modified eigenvalue decomposition of the covariance matrix ensures positive definiteness. Furthermore, if the C.O.V. of Pf is relatively large, the covariance matrix is scaled such that it is closer to the identity matrix.
The user defines the number of steps and the number of samples per step. If any of the solver calls fails, the corresponding sample is either ignored or (if one tells the algorithm to interpret the failed run as a failure event) is accounted to the failure domain.

ReliabilityBase

Constructors

Methods

adapt

adapt() -> None


Creates internally the next set of designs. This is called within the loop after Appraise and prepares the next call of get_next_designs.

appraise

appraise() -> None


Performs a search step by the internal reliability algorithm. This is called after simulation and setting results and used inputs. The method reads all given information (and eventually performs one internal search step). After calling this method it should be possible to check the state of the iteration by is_terminated().

can_provide_probability_of_failure

can_provide_probability_of_failure() -> bool


Returns true when the probability of failure can be calculated.

finalize

finalize() -> None


Finalizes the iteration. Does whatever is neccessary to finalize - delete pointers, collect data...

get_criteria_success_info

get_criteria_success_info() -> bitset_type



get_estimators_std_dev

get_estimators_std_dev() -> float


Returns the standard deviation of the estimator of the probability of failure. It should be called after finalize(). If this quantity does not make sense (i.e. in case of FORM), it returns zero.

get_inputs

get_inputs() -> matrix_type



get_iteration_name

get_iteration_name() -> str


Returns the name of the current iteration.

get_next_design_ids

get_next_design_ids() -> uintVec


Returns the ids for the next set of design vectors for which responses must be computed. This method is called at the begin of the iteration loop. It returns a reference to the internally stored set of infos of awaiting designs.

get_next_design_infos

get_next_design_infos() -> uintVec


Returns some information for the next set of design vectors for which responses must be computed. This method is called at the begin of the iteration loop. It returns a reference to the internally stored set of infos of awaiting designs.

get_next_designs

get_next_designs() -> matrix_type


Returns the next set of design vectors for which responses must be computed. This method is called at the begin of the iteration loop. It returns a reference to the internally stored set of awaiting designs.

get_num_awaiting_designs

get_num_awaiting_designs() -> int



get_num_computed_samples

get_num_computed_samples() -> int



get_num_function_calls

get_num_function_calls() -> int



get_num_inputs

get_num_inputs() -> int



get_num_safety_margins

get_num_safety_margins() -> int



get_num_successfully_computed_samples

get_num_successfully_computed_samples() -> int



get_probability_of_failure

get_probability_of_failure() -> float


Returns the probability of failure.

get_reliability_index

get_reliability_index() -> float


The default implementation calls GetProbabilityOfFailure and computes beta from that. It should be called after finalize().

get_rv_set

get_rv_set() -> RVSet



get_safety_margins

get_safety_margins() -> matrix_type



get_success_info_as_failure_event

get_success_info_as_failure_event() -> bitset_type



has_several_iterations

has_several_iterations() -> bool


Returns True if the algorithm produces several design sets.

has_total_design_set

has_total_design_set() -> bool


Returns True if the algorithm produces a total design set.

initialize

initialize( (SettingsBase)arg2) -> None


(re)sets the algorithm using the given definition data ("settings"). It must be called at least once before starting the iteration loop. It may be called several times during the lifetime of an algorithm object (then clears old data, reallocates and resets).

is_converged

is_converged() -> bool


Returns true if the iteration loop has converged. This method returns true if the algorithm has terminated and converged.

is_terminated

is_terminated() -> bool


Returns true if the iteration loop must be terminated. This method returns true if the algorithm has finished. If it either converged (or diverged or any other termination criterion is satisfied).

restart

restart() -> None


(re)sets the algorithm without touching the settings and maybe time-consuming pre-calculations. Initialize must be called at least once before.

set_criteria_success_info

set_criteria_success_info( (bitset_type)arg2) -> None


Sets the success flags of the actually computed designs. It must be called before Appraise. The input argument tells the algorithm for which design point vector the external solver failed (or returned senseless results).

set_inputs

set_inputs( (matrix_type)arg2) -> None


Sets the design point vectors of the actually computed designs. It must be called before Appraise.

set_safety_margins

set_safety_margins( (matrix_type)arg2) -> None


Sets the safety margin function(s) of the actually computed designs. It must be called before Appraise.

set_success_info_as_failure_event

set_success_info_as_failure_event( (bitset_type)arg2) -> None


Sets the failure event flags of the actually computed designs without successful solver run. It must be called before Appraise. The input argument tells the algorithm for which design point vector the value success_info_[i]=false can be interpreted as a failure event.

ReliabilityMonteCarlo

Inherits from: ReliabilityBase

This algorithm implements Monte Carlo sampling.
The algorithm can be controlled either by a predefined number of samples, or by a desired accuracy (c.o.v.) of the estimator of Pf (or of (1-Pf) if Pf>0.5). In the latter case, the number of required samples will be selected by the algorithm during the iteration. The convergence test is carried out after each request of n parallel designs. If the desired accuracy can not be reached within the maximum allowed number of samples, the algorithm terminates without success.
If any of the solver requests fails (success_info=false for a specific design) the algorithm either ignores this design, or it counts it as a failure event.

Constructors

SettingsAdaptiveSampling

Inherits from: SettingsBase

Reliability algorithm settings for Adaptive Sampling.

Properties

  • (float) accuracy
  • (bool) automatic_sample_size
  • (float) initial_scale_factor
  • (int) num_designs_per_sample
  • () num_estimated_function_calls
  • () num_inputs
  • () num_safety_margins
  • (int) num_steps
  • (int) num_total_samples_per_step
  • () rand_generator_seed
  • () rvset
  • (bool) use_standard_density
  • () write_histories

SettingsARSMDS

Inherits from: SettingsBase

Reliability algorithm settings for ARSM with Directional Sampling.

Constructors

Properties

  • (float) blow_up
  • (int) num_directions
  • () num_estimated_function_calls
  • () num_inputs
  • () num_safety_margins
  • (int) num_steps
  • (int) num_supports_initial_step
  • (int) num_supports_per_step
  • () rand_generator_seed
  • () rvset
  • () write_histories

SettingsBase

Base class that define the reliability problem.

Constructors

Properties

  • () num_estimated_function_calls
  • () num_inputs
  • () num_safety_margins
  • () rand_generator_seed
  • () rvset
  • () write_histories

Methods

check_settings

check_settings() -> None


Check if settings are correct. Raises an error if they are not.

set_defaults

set_defaults() -> None



SettingsDirectionalSampling

Inherits from: SettingsBase

Reliability algorithm settings for directional sampling.

Properties

  • (float) linesearch_accuracy
  • (LineSearchMethod) linesearch_method
  • (int) linesearch_num_parallel_presample
  • (int) num_directions
  • () num_estimated_function_calls
  • () num_inputs
  • (int) num_parallel
  • () num_safety_margins
  • () rand_generator_seed
  • () rvset
  • (DOETYPES) search_direction_sampling_method
  • () write_histories

SettingsFORM

Inherits from: SettingsBase

Reliability algorithm settings for Form/OptimizerNLPQLP

Constructors

Properties

  • (int) max_search_runs
  • () num_estimated_function_calls
  • () num_inputs
  • (int) num_presamples
  • () num_safety_margins
  • (SettingsNLPQLP) optimizer_settings
    FORM's NLPQLP settings. Cannot be copied.
  • () rand_generator_seed
  • () rvset
  • () write_histories

SettingsISPUD

Inherits from: SettingsBase

Reliability algorithm settings for ISPUD( Importance sampling using the design point).

Constructors

Properties

  • (float) accuracy
  • (bool) automatic_sample_size
  • (SettingsFORM) form_settings
    ISPUD's FORM settings. Cannot be copied.
  • (int) num_designs_per_sample
  • () num_estimated_function_calls
  • () num_inputs
  • () num_safety_margins
  • (int) num_total_samples
  • () rand_generator_seed
  • () rvset
  • (bool) use_median_sampling
  • (bool) use_start_designs
  • (bool) vary_discrete_rvs
  • () write_histories

SettingsMonteCarlo

Inherits from: SettingsBase

Reliability algorithm settings for Monte Carlo.

Properties

  • (float) accuracy
  • (bool) automatic_sample_size
  • (int) min_num_samples
  • (int) num_designs_per_sample
  • () num_estimated_function_calls
  • () num_inputs
  • () num_safety_margins
  • (int) num_total_samples
  • () rand_generator_seed
  • () rvset
  • (float) scaling_factor
  • () write_histories