LimitState¶
- class persalys.LimitState(*args)¶
Create a limit state.
- Parameters:
- namestr
Name
- physicalModel
PhysicalModel Physical model
- outputNamesstr or collection of str
Name(s) of output variable(s) of interest in limit state
- operator
ComparisonOperatoror collection ofComparisonOperator 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.
Get the the threshold event constructed specifically for importance sampling.
Accessor to the object's name.
getId()Accessor to the object's id.
Accessor to the underlying implementation.
getName()Accessor to the object's name.
Get the number of failure events in the limit state.
getOperator(index)Comparison operator accessor.
Comparison operators accessor.
Output variable names accessor.
Physical model for limit state accessor.
Python script for limit state accessor.
getThreshold(index)Threshold value accessor.
Get the threshold event corresponding to the limit state.
Threshold values accessor.
getType()Aggregation type accessor.
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
- comparisonOperator
ComparisonOperator, optional Comparison operator
- thresholdfloat, optional
Threshold value
- asComposedEvent()¶
Get the the threshold event constructed specifically for importance sampling.
- Returns:
- event
RandomVector Threshold event
- 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:
- operator
openturns.ComparisonOperator Comparison operator
- operator
- getOperators()¶
Comparison operators accessor.
- Returns:
- operatorscollection of
ComparisonOperator Comparison operators
- operatorscollection of
- getOutputNames()¶
Output variable names accessor.
- Returns:
- outputNames
Description Output variable names
- outputNames
- getPhysicalModel()¶
Physical model for limit state accessor.
- Returns:
- model
PhysicalModel Physical model
- 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:
- event
RandomVector Threshold event
- event
- getType()¶
Aggregation type accessor.
- Returns:
- typeint
persalys.LimitState.Unionorpersalys.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
- operator
openturns.ComparisonOperator Comparison operator
- setOperators(operators)¶
Set all comparison operators.
- Parameters:
- operatorscollection of
ComparisonOperator Comparison operators
- operatorscollection of
- 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
- setType(type)¶
Set the aggregation type of a system limit state.
- Parameters:
- typeint
persalys.LimitState.Unionorpersalys.LimitState.Intersection