| SYS_LSF-class | R Documentation |
A reference-class that stores a user-defined limit-state function. The function can be written either as an **expression** ('expr') or as a **regular R function** ('func'). All random variables that appear in the function must be supplied in the 'vars' list as 'PROB_BASEVAR' objects.
The method 'getLSF()' returns a **closure** that expects a numeric vector 'x' (ordered exactly like 'vars') and evaluates the limit-state function.
Sign convention: g(x) > 0 is the safe domain, g(x) = 0 the
limit state and g(x) < 0 failure. All reliability methods of
TesiproV use this convention.
For consistency across FORM and Monte Carlo reliability methods,
limit-state functions must either accept a single numeric vector
argument or explicitly named scalar arguments.
The use of function(...) is not supported.
nameOptional human-readable name of the limit-state function.
exprSymbolic expression (e.g. 'expression(f_ck - d_nom)') that is later converted to a callable function via 'ExpressionToFunction()'.
funcActual R function implementing the limit-state equation. May be 'NULL' until defined by user or converted from 'expr'.
varsList of 'PROB_BASEVAR' objects that provide the random variables.
ExpressionToFunction()Transforms a valid expression into a objective function. Need the set of Variables with correct spelled names and IDs
check()Checks all variables. You dont need to execute this, since the system object will do anyway.
A limit-state function must follow one of the two supported interface patterns:
function(x)A single numeric vector argument x containing all
basic variables in the order specified in vars.
Example:
lsf$func <- function(x) {
x[1] - sum((x[-1]^2) / seq_along(x)[-1])
}
function(Z, Fy, M, ...)Explicitly named scalar arguments corresponding to the
variable names defined in vars.
Example:
lsf$func <- function(Z, Fy, M) {
Z * Fy - M
}
The following form is not supported:
function(...)
Using ... as the sole argument leads to inconsistent
behaviour between FORM-based and Monte Carlo-based reliability
methods and is therefore prohibited.
For maximum robustness and compatibility across all reliability
algorithms, the use of the vector form function(x) is
recommended.
(C) 2021-2026 K. Nille-Hauf, T. Feiri, M. Ricker, T. Lux – Hochschule Biberach (until 2022), TU Dortmund University - Chair of Structural Concrete (since 2023)
vars <- list(
PROB_BASEVAR(Name = "f_ck", DistributionType = "norm", Mean = 30, Sd = 1),
PROB_BASEVAR(Name = "d_nom", DistributionType = "norm", Mean = 0.2, Sd = 0.01)
)
lsf <- SYS_LSF(name = "Bending resistance", expr = expression(f_ck - d_nom), vars = vars)
lsf$ExpressionToFunction()
lsf$func(c(30, 0.2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.