RBDOProblem¶
- class otrobopt.RBDOProblem(*args)¶
Reliability-based design optimization problem.
This class is experimental and may change in future releases.
The problem couples a scalar classical objective
with one joint chance constraint
or the variant defined by the comparison operator of the measure. The deterministic bounds, inequality constraints and equality constraints use the usual
OptimizationProblemprotocol.Available constructors:
RBDOProblem(objective, jointChanceMeasure)
RBDOProblem()
- Parameters:
- objective
Function Scalar objective function
. Its input dimension defines the design dimension.
- jointChanceMeasure
JointChanceMeasure Joint chance constraint. Its limit-state function must have the same input dimension as the objective and its distribution dimension must match the limit-state function parameter dimension.
- objective
Methods
Default canonicalization options of the specialized problem.
check()Check the problem contract.
Accessor to bounds.
Accessor to the canonical deterministic inequality constraint.
Accessor to the canonical joint chance measure.
getCanonicalProblem(*args)Accessor to the solver-ready canonical problem.
getCanonicalStartingPoint(*args)Accessor to the canonical starting point.
getCanonicalizer(*args)Accessor to the canonicalizer of the problem.
Accessor to the object's name.
Accessor to the comparison operator of the joint chance constraint.
Accessor to the constant term of the objective.
Accessor to input dimension.
Accessor to the distribution of the joint chance constraint.
Accessor to equality constraints.
Accessor to the Hessian matrix.
Accessor to inequality constraints.
Accessor to the joint chance constraint.
Accessor to level function.
Accessor to level value.
Accessor to the limit-state function of the joint chance constraint.
Accessor to the linear constraint bounds.
Accessor to the linear constraint term.
Accessor to the linear cost.
getName()Accessor to the object's name.
Accessor to objective function.
Accessor to level function.
Accessor to the target probability of the joint chance constraint.
Accessor to the variables type.
Test whether bounds had been specified.
Test whether equality constraints had been specified.
Test whether inequality constraints had been specified.
Whether a joint chance constraint is defined.
Test whether level function had been specified.
Test whether objective function is a scalar or vector function.
hasName()Test if the object is named.
Test whether a least-square problem is defined.
Check if the problem is continuous.
isLinear()Check if the problem is linear.
isMinimization([marginalIndex])Test whether this is a minimization or maximization problem.
Check if the problem is quadratic.
setBounds(bounds)Accessor to bounds.
setEqualityConstraint(equalityConstraint)Accessor to equality constraints.
setInequalityConstraint(inequalityConstraint)Accessor to inequality constraints.
setJointChanceMeasure(jointChanceMeasure)Set the joint chance constraint.
setLevelFunction(levelFunction)Accessor to level function.
setLevelValue(levelValue)Accessor to level value.
setMinimization(minimization[, marginalIndex])Tell whether this is a minimization or maximization problem.
setName(name)Accessor to the object's name.
setObjective(objective)Accessor to objective function.
setResidualFunction(residualFunction)Accessor to level function.
setVariablesType(variableType)Accessor to the variables type.
Notes
The joint chance measure returns the probit-transformed reliability index
, not the probability itself. The target probability is available through
getTargetProbability()and the comparison operator throughgetComparisonOperator().The distribution parameter is frozen by default in the canonical problems returned by
getCanonicalProblem()andgetCanonicalJointChanceMeasure(). Use the overloads that acceptCanonicalizationOptionsto optimize the active parameter through the canonical decision vector.
Examples
>>> import openturns as ot >>> import otrobopt >>> limitState = ot.ParametricFunction( ... ot.SymbolicFunction(["x", "theta"], ["theta - x"]), [1], [0.0] ... ) >>> measure = otrobopt.JointChanceMeasure( ... limitState, ot.Normal(), ot.GreaterOrEqual(), 0.9 ... ) >>> problem = otrobopt.RBDOProblem( ... ot.SymbolicFunction(["x"], ["x^2"]), measure ... ) >>> problem.getTargetProbability() 0.9
- __init__(*args)¶
- static GetDefaultCanonicalizationOptions()¶
Default canonicalization options of the specialized problem.
The distribution parameter is frozen by default. Use the overloads of
getCanonicalizer(),getCanonicalProblem(),getCanonicalJointChanceMeasure(),getCanonicalDeterministicConstraint()andgetCanonicalStartingPoint()that acceptCanonicalizationOptionsto optimize the active parameter.- Returns:
- options
CanonicalizationOptions Canonicalization options with
optimizeParameterset to False.
- options
- check()¶
Check the problem contract.
- Raises:
- ValueError
If the objective is missing or not scalar, if the joint chance constraint is missing, if the dimensions do not match, or if the deterministic constraints or bounds are inconsistent with the design dimension.
- getCanonicalDeterministicConstraint(*args)¶
Accessor to the canonical deterministic inequality constraint.
- Returns:
- constraint
Function The deterministic inequality constraints lifted to the canonical decision vector, or an empty function when the problem has none.
- constraint
- getCanonicalJointChanceMeasure(*args)¶
Accessor to the canonical joint chance measure.
- Returns:
- measure
JointChanceMeasure The joint chance measure rebuilt on the canonical limit-state function and the reference distribution. The measure still carries the target probability and the comparison operator of the original problem.
- measure
- getCanonicalProblem(*args)¶
Accessor to the solver-ready canonical problem.
The canonical inequality constraint gathers the joint chance index as its first output and the deterministic inequality constraints as the following outputs. The canonical joint chance measure itself remains available through
getCanonicalJointChanceMeasure().- Returns:
- problem
RobustOptimizationProblem The canonical problem, whose decision vector is
when the parameter is optimized and
otherwise.
- problem
- getCanonicalStartingPoint(*args)¶
Accessor to the canonical starting point.
- Returns:
- startingPoint
Point The starting point
of the canonical problem. When the distribution parameter is frozen, only
is returned.
- startingPoint
- getCanonicalizer(*args)¶
Accessor to the canonicalizer of the problem.
- Returns:
- canonicalizer
RobustOptimizationProblemCanonicalizer The canonicalizer built from the generic robust problem, with the default options.
- canonicalizer
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getComparisonOperator()¶
Accessor to the comparison operator of the joint chance constraint.
- Returns:
- comparisonOperator
ComparisonOperator The operator that defines the joint chance event.
- comparisonOperator
- getConstant()¶
Accessor to the constant term of the objective.
Only relevant for the quadratic problem type.
- Returns:
- constantfloat
Constant term of the quadratic objective.
- getDimension()¶
Accessor to input dimension.
- Returns:
- dimensionint
Input dimension of objective function.
- getDistribution()¶
Accessor to the distribution of the joint chance constraint.
- Returns:
- distribution
Distribution Distribution of the uncertain vector
.
- distribution
- getEqualityConstraint()¶
Accessor to equality constraints.
- Returns:
- equality
Function Describe equality constraints.
- equality
- getHessian()¶
Accessor to the Hessian matrix.
Only relevant for the quadratic problem type.
- Returns:
- hessian
SymmetricMatrix Hessian matrix of the quadratic objective.
- hessian
- getInequalityConstraint()¶
Accessor to inequality constraints.
- Returns:
- inequality
Function Describe inequality constraints.
- inequality
- getJointChanceMeasure()¶
Accessor to the joint chance constraint.
- Returns:
- jointChanceMeasure
JointChanceMeasure Joint chance constraint.
- jointChanceMeasure
- Raises:
- ValueError
If no joint chance constraint is defined.
- getLevelValue()¶
Accessor to level value.
- Returns:
- valuefloat
Level value.
- getLimitStateFunction()¶
Accessor to the limit-state function of the joint chance constraint.
- Returns:
- limitStateFunction
Function The limit-state function
, whose parameter is the realization of
.
- limitStateFunction
- getLinearConstraintBounds()¶
Accessor to the linear constraint bounds.
Only relevant for the linear problem type.
- Returns:
- LU
Interval Linear inequality constraint bounds.
- LU
- getLinearConstraintCoefficients()¶
Accessor to the linear constraint term.
Only relevant for the linear problem type.
- Returns:
- A
Matrix Linear inequality constraint term.
- A
Notes
A sparse problem materializes the dense matrix on demand. The experimental
LinearProgrammingProblemprovidesgetSparseLinearConstraintCoefficients()to avoid the densification.
- getLinearCost()¶
Accessor to the linear cost.
Only relevant for the linear problem type.
- Returns:
- cost
Point Linear cost term.
- cost
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getTargetProbability()¶
Accessor to the target probability of the joint chance constraint.
- Returns:
- targetProbabilityfloat
The level
of the joint chance constraint.
- getVariablesType()¶
Accessor to the variables type.
- Returns:
- variablesType
Indices Types of the variables.
- variablesType
Notes
Possible values for each variable are ot.OptimizationProblemImplementation.CONTINUOUS, ot.OptimizationProblemImplementation.INTEGER and ot.OptimizationProblemImplementation.`BINARY`.
- hasBounds()¶
Test whether bounds had been specified.
- Returns:
- valuebool
True if bounds had been set for this problem, False otherwise.
- hasEqualityConstraint()¶
Test whether equality constraints had been specified.
- Returns:
- valuebool
True if equality constraints had been set for this problem, False otherwise.
- hasInequalityConstraint()¶
Test whether inequality constraints had been specified.
- Returns:
- valuebool
True if inequality constraints had been set for this problem, False otherwise.
- hasJointChanceMeasure()¶
Whether a joint chance constraint is defined.
- Returns:
- hasJointChanceMeasurebool
True when a joint chance constraint is defined.
- hasLevelFunction()¶
Test whether level function had been specified.
- Returns:
- valuebool
True if level function had been set for this problem, False otherwise.
- hasMultipleObjective()¶
Test whether objective function is a scalar or vector function.
- Returns:
- valuebool
False if objective function is scalar, True otherwise.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- hasResidualFunction()¶
Test whether a least-square problem is defined.
- Returns:
- valuebool
True if this is a least-squares problem, False otherwise.
- isContinuous()¶
Check if the problem is continuous.
- Returns:
- isContinuousbool
Returns True if all variables are continuous.
- isLinear()¶
Check if the problem is linear.
- Returns:
- isLinearbool
Returns True if the problem is of linear type.
- isMinimization(marginalIndex=0)¶
Test whether this is a minimization or maximization problem.
- Parameters:
- marginal_indexint, default=0
Index of the output marginal (for multi-objective only)
- Returns:
- valuebool
True if this is a minimization problem (default), False otherwise.
- isQuadratic()¶
Check if the problem is quadratic.
- Returns:
- isQuadraticbool
Returns True if the problem is of quadratic type.
- setEqualityConstraint(equalityConstraint)¶
Accessor to equality constraints.
- Parameters:
- equalityConstraint
Function Equality constraints.
- equalityConstraint
- setInequalityConstraint(inequalityConstraint)¶
Accessor to inequality constraints.
- Parameters:
- inequalityConstraint
Function Inequality constraints.
- inequalityConstraint
- setJointChanceMeasure(jointChanceMeasure)¶
Set the joint chance constraint.
- Parameters:
- jointChanceMeasure
JointChanceMeasure Joint chance constraint. Its limit-state function must have the same input dimension as the objective and its distribution dimension must match the limit-state function parameter dimension.
- jointChanceMeasure
- setLevelFunction(levelFunction)¶
Accessor to level function.
- Parameters:
- levelFunction
Function Level function.
- levelFunction
- setLevelValue(levelValue)¶
Accessor to level value.
- Parameters:
- levelValuefloat
Level value.
- setMinimization(minimization, marginalIndex=0)¶
Tell whether this is a minimization or maximization problem.
- Parameters:
- minimizationbool
True if this is a minimization problem, False otherwise.
- marginal_indexint, default=0
Index of the output marginal (for multi-objective only)
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setObjective(objective)¶
Accessor to objective function.
- Parameters:
- objectiveFunction
Function Objective function.
- objectiveFunction
Notes
Constraints and bounds are cleared if the objective has a different input dimension in order to keep the problem valid at all time.
- setResidualFunction(residualFunction)¶
Accessor to level function.
- Parameters:
- levelFunction
Function Level function.
- levelFunction
- setVariablesType(variableType)¶
Accessor to the variables type.
- Parameters:
- variablesType
Indices Types of the variables.
- variablesType
Notes
Possible values for each variable are ot.OptimizationProblemImplementation.CONTINUOUS, ot.OptimizationProblemImplementation.INTEGER and ot.OptimizationProblemImplementation.BINARY.
otrobopt