| PROB_QUALCON-class | R Documentation |
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')).
IdNumeric identifier.
NameShort name of the plan (character).
DescriptionOptional description (character).
ConformityTypeType of the sampling plan, "fck_EN-206" or
"dim_k||n" (character).
ConformityParamParameters 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.
NSimMonte-Carlo sample size per defect fraction for the simulation
of the OC curve (numeric, default 100000). It is only used by
"fck_EN-206".
DefectLimitLowerLower 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.
DefectLimitUpperUpper 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.
varThe PROB_BASEVAR the plan applies to (any). It is
NULL as long as no variable is attached. getOC() requires it.
theta_gridDefect 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_gridAcceptance 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_snapshotInternal. Digest of the distribution of var at
the time of the last getOC() call, used by isStale().
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.
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.
(C) 2026 T. Lux, M. Ricker – TU Dortmund University - Chair of Structural Concrete
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.