SYS_LSF-class: System Limit-State Function (SYS_LSF)

SYS_LSF-classR Documentation

System Limit-State Function (SYS_LSF)

Description

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.

Details

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.

Fields

name

Optional human-readable name of the limit-state function.

expr

Symbolic expression (e.g. 'expression(f_ck - d_nom)') that is later converted to a callable function via 'ExpressionToFunction()'.

func

Actual R function implementing the limit-state equation. May be 'NULL' until defined by user or converted from 'expr'.

vars

List of 'PROB_BASEVAR' objects that provide the random variables.

Methods

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.

Limit-State Function (LSF) API

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.

Author(s)

(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)

Examples

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))


TesiproV documentation built on Oct. 28, 2026, 5:13 p.m.