uniform.discrete: Generate a uniform design for discrete factors with different...

View source: R/uniform.R

uniform.discreteR Documentation

Generate a uniform design for discrete factors with different number of levels

Description

This function generates a uniform design for discrete factors with different number of levels.

Usage

uniform.discrete(
  t,
  p,
  levels,
  design = NULL,
  max.sa.iter = 1e+06,
  temp = 0,
  decay = 0.95,
  no.update.iter.max = 400,
  num.passes = 10,
  max.det.iter = 1e+06,
  method = "full",
  scaled = TRUE
)

Arguments

t

multiple of the least common multiple of the levels.

p

design dimension.

levels

a vector of the number of levels for each dimension.

design

an initial design. If design=NULL, a random design is generated.

max.sa.iter

maximum number of swapping involved in the simulated annealing (SA) algorithm.

temp

initial temperature of the simulated annealing algorithm. If temp=0, it will be automatically determined.

decay

the temperature decay rate of simulated annealing.

no.update.iter.max

the maximum number of iterations where there is no update to the global optimum before SA stops.

num.passes

the maximum number of passes of the whole design matrix if deterministic swapping is used.

max.det.iter

maximum number of swapping involved in the deterministic swapping algorithm.

method

choice of "deterministic", "sa", or "full". If the method="full", the design is first optimized by SA and then deterministic swapping.

scaled

whether the design is scaled to unit hypercube. If scaled=FALSE, the design is represented by integer numbers from 1 to design size. Leave it as TRUE when no initial design is provided.

Details

uniform.discrete generates a uniform design of discrete factors with different number of levels by minimizing the wrap-around discrepancy criterion (see uniform.crit).

Value

design

final design points.

design.int

design transformed to integer numbers for each dimenion

total.iter

total number of swaps in the optimization.

criterion

final optimized criterion.

crit.hist

criterion history during the optimization process.

Examples

p = 5
levels = c(3, 4, 6, 2, 3)
t = 1
D = uniform.discrete(t, p, levels)

SFDesign documentation built on June 22, 2025, 1:06 a.m.