PROB_QUALCON-class: Sampling plan and OC curve (PROB_QUALCON)

PROB_QUALCON-classR Documentation

Sampling plan and OC curve (PROB_QUALCON)

Description

Defines a quality-control sampling plan and computes the corresponding Operating Characteristic (OC) curve, i.e. the acceptance probability P_a(\theta) as a function of the defect fraction \theta.

A PROB_QUALCON object refers to a PROB_BASEVAR via the field var, because the quality control relates to one specific structural variable. The OC curve is used by PROB_BASEVAR$updateBasevar() to derive the posterior distribution of that variable after acceptance.

Two plan types are supported (field ConformityType):

  • Variable plan ("fck_EN-206"): conformity criterion of EN 206 for the concrete compressive strength. A lot is accepted if the mean of n samples is at least f_{ck} + 1.48 s and the smallest value at least f_{ck} - 4. f_ck is given as DefectLimitLower, ConformityParam = c(n). The OC curve is simulated, the sample size per defect fraction is set with the field NSim.

  • Attribute plan ("dim_k||n"): binomial model, a lot is accepted if at most c_accept of n units are defective. ConformityParam = c(n, c_accept). The plan can be used for any characteristic whose compliance with tolerance values is checked. A unit is defective if the variable lies below DefectLimitLower or above DefectLimitUpper. Both limits are freely selectable. They do not influence the OC curve, only the Bayesian update.

The fields DefectLimitLower and DefectLimitUpper define when a single unit counts as defective and thereby the defect fraction \theta. They are not the acceptance criterion. How a lot is accepted is determined by the sampling plan alone.

The OC curve can only be computed for a variable var with DistributionType "st" or "lt" (Student-t and log-Student-t with hyperparameters c(m', s', n', v')).

Fields

Id

Numeric identifier.

Name

Short name of the plan (character).

Description

Optional description (character).

ConformityType

Type of the sampling plan, "fck_EN-206" or "dim_k||n" (character).

ConformityParam

Parameters of the sampling plan (numeric). For "fck_EN-206": c(n) with the sample size n. For "dim_k||n": c(n, c_accept). It is not needed if the OC curve is specified manually.

NSim

Monte-Carlo sample size per defect fraction for the simulation of the OC curve (numeric, default 100000). It is only used by "fck_EN-206".

DefectLimitLower

Lower limit (numeric, default -Inf). A unit below it is defective. For "fck_EN-206" it is the characteristic compressive strength f_{ck} in the unit of the variable and must be set, also for a manually specified OC curve.

DefectLimitUpper

Upper limit (numeric, default Inf). A unit above it is defective. For "fck_EN-206" it must stay Inf. For "dim_k||n" at least one of the two limits must be finite.

var

The PROB_BASEVAR the plan applies to (any). It is NULL as long as no variable is attached. getOC() requires it.

theta_grid

Defect fractions at which the OC curve is evaluated (numeric). A default grid from 0.001 to 0.9 is set if nothing is given. getOC(force = TRUE) resets it to this default grid.

Pa_grid

Acceptance probabilities belonging to theta_grid (numeric). It is NA until getOC() has been run. A manually specified OC curve can be given as Pa_grid together with theta_grid of the same length.

.prior_snapshot

Internal. Digest of the distribution of var at the time of the last getOC() call, used by isStale().

Methods

getOC(force = FALSE)

Computes the OC curve and stores it in $Pa_grid. ...

isStale()

Returns TRUE if $var's distribution has changed since Pa_grid was last computed via getOC() (e.g. by later re-assigning Mean/Sd on the same object). Returns NA if Pa_grid was set manually or $var is missing, since no snapshot exists to compare against.

plot(log_x = TRUE, ...)

Plots the OC curve (Pa_grid vs. theta_grid) using base R graphics. Runs $getOC() first if Pa_grid has not been computed yet.

summary()

Prints a short summary of the PROB_QUALCON object.

Methods

getOC(force = FALSE)

Computes the OC curve and stores it in Pa_grid. An existing curve is only recomputed with force = TRUE. With force = TRUE the default theta_grid is used again, a grid or curve given by the user is discarded.

plot(log_x = TRUE, ...)

Plots Pa_grid against theta_grid. Runs getOC() first if necessary.

isStale()

TRUE if the distribution of var has changed since getOC(), NA if no snapshot exists (manual curve or no variable).

show(), summary()

Short printed representations.

Author(s)

(C) 2026 T. Lux, M. Ricker – TU Dortmund University - Chair of Structural Concrete

Examples

## Not run: 
v <- PROB_BASEVAR$new(Name = "fc", DistributionType = "lt",
                      DistributionParameters = c(3.75, 0.105, 3, 10))
plan <- PROB_QUALCON$new(Name = "EN206_n15",
                         ConformityType = "fck_EN-206",
                         ConformityParam = 15, NSim = 2000,
                         DefectLimitLower = 30, var = v)
plan$getOC()
plan$plot()
post <- v$updateBasevar(plan)

# Attribute plan: at most 1 of 10 units outside the limits 27 and 33
d <- PROB_BASEVAR$new(Name = "cover", DistributionType = "st",
                      DistributionParameters = c(30, 2, 3, 10))
plan2 <- PROB_QUALCON$new(Name = "cover_plan", ConformityType = "dim_k||n",
                          ConformityParam = c(10, 1),
                          DefectLimitLower = 27, DefectLimitUpper = 33, var = d)
plan2$getOC()
post2 <- d$updateBasevar(plan2)

## End(Not run)

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