LimitState

class persalys.LimitState(*args)

Create a limit state.

Parameters:
namestr

Name

physicalModelPhysicalModel

Physical model

outputNamesstr or collection of str

Name(s) of output variable(s) of interest in limit state

operatorComparisonOperator or collection of ComparisonOperator

Comparison operator(s) against threshold(s) (optional)

thresholdfloat or Point

Threshold value(s) (optional)

typeint

Type of system limit state (optional, default is Union) Possible values are persalys.LimitState.Union and persalys.LimitState.Intersection.

Methods

addFailureEvent(*args)

Add one failure event to the limit state.

asComposedEvent()

Get the the threshold event constructed specifically for importance sampling.

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

getImplementation()

Accessor to the underlying implementation.

getName()

Accessor to the object's name.

getNumberOfFailureEvents()

Get the number of failure events in the limit state.

getOperator(index)

Comparison operator accessor.

getOperators()

Comparison operators accessor.

getOutputNames()

Output variable names accessor.

getPhysicalModel()

Physical model for limit state accessor.

getPythonScript()

Python script for limit state accessor.

getThreshold(index)

Threshold value accessor.

getThresholdEvent()

Get the threshold event corresponding to the limit state.

getThresholds()

Threshold values accessor.

getType()

Aggregation type accessor.

isSystemLimitState()

Whether the limit state contains several failure events.

isValid()

Whether limit state is valid.

removeFailureEvent(index)

Remove one failure event from the limit state.

setName(name)

Accessor to the object's name.

setOperator(index, comparisonOperator)

Set one comparison operator.

setOperators(operators)

Set all comparison operators.

setOutputName(index, outputName)

Set one output variable name.

setOutputNames(outputNames)

Set all output variable names.

setThreshold(index, threshold)

Set one threshold value.

setThresholds(thresholds)

Set all threshold values.

setType(type)

Set the aggregation type of a system limit state.

Examples

>>> import openturns as ot
>>> import persalys

Create the model:

>>> R = persalys.Input('R', 0., ot.LogNormalMuSigma(300., 30., 0.).getDistribution(), 'Yield strength')
>>> F = persalys.Input('F', 0., ot.Normal(75000., 5000.), 'Traction load')
>>> G = persalys.Output('G', 'deviation')
>>> physicalModel = persalys.SymbolicPhysicalModel('model1', [R, F], [G], ['R-F/(pi_*100.0)'])

Create the limit state:

>>> limitState = persalys.LimitState('ls1', physicalModel, 'G', ot.Less(), 0.)
__init__(*args)
addFailureEvent(*args)

Add one failure event to the limit state.

Parameters:
variableNamestr

Variable name associated with the failure event

comparisonOperatorComparisonOperator, optional

Comparison operator

thresholdfloat, optional

Threshold value

asComposedEvent()

Get the the threshold event constructed specifically for importance sampling.

Returns:
eventRandomVector

Threshold event

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getImplementation()

Accessor to the underlying implementation.

Returns:
implImplementation

A copy of the underlying implementation object.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNumberOfFailureEvents()

Get the number of failure events in the limit state.

Returns:
numberOfFailureEventsint

Number of failure events

getOperator(index)

Comparison operator accessor.

Parameters:
indexint

Failure event index

Returns:
operatoropenturns.ComparisonOperator

Comparison operator

getOperators()

Comparison operators accessor.

Returns:
operatorscollection of ComparisonOperator

Comparison operators

getOutputNames()

Output variable names accessor.

Returns:
outputNamesDescription

Output variable names

getPhysicalModel()

Physical model for limit state accessor.

Returns:
modelPhysicalModel

Physical model

getPythonScript()

Python script for limit state accessor.

Returns:
scriptstr

Python script to rebuild the limit state

getThreshold(index)

Threshold value accessor.

Parameters:
indexint

Failure event index

Returns:
thresholdfloat

Threshold value

getThresholdEvent()

Get the threshold event corresponding to the limit state.

Returns:
eventRandomVector

Threshold event

getThresholds()

Threshold values accessor.

Returns:
thresholdsPoint

Threshold values

getType()

Aggregation type accessor.

Returns:
typeint

persalys.LimitState.Union or persalys.LimitState.Intersection

isSystemLimitState()

Whether the limit state contains several failure events.

Returns:
isSystemLimitStatebool

Whether the limit state is a system limit state

isValid()

Whether limit state is valid.

Returns:
isValidbool

Whether it is valid

removeFailureEvent(index)

Remove one failure event from the limit state.

Parameters:
indexint

Failure event index

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setOperator(index, comparisonOperator)

Set one comparison operator.

Parameters:
indexint

Failure event index

operatoropenturns.ComparisonOperator

Comparison operator

setOperators(operators)

Set all comparison operators.

Parameters:
operatorscollection of ComparisonOperator

Comparison operators

setOutputName(index, outputName)

Set one output variable name.

Parameters:
indexint

Failure event index

outputNamestr

Output variable name

setOutputNames(outputNames)

Set all output variable names.

Parameters:
outputNamescollection of str

Output variable names

setThreshold(index, threshold)

Set one threshold value.

Parameters:
indexint

Failure event index

thresholdfloat

Threshold value

setThresholds(thresholds)

Set all threshold values.

Parameters:
thresholdsPoint

Threshold values

setType(type)

Set the aggregation type of a system limit state.

Parameters:
typeint

persalys.LimitState.Union or persalys.LimitState.Intersection