OASA: Orthogonal-Array-Based Simulated Annealing

Description Usage Arguments Value References Examples

View source: R/OASA.R

Description

OASA returns an LHD matrix generated by orthogonal-array-based simulated annealing algorithm (OASA)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
OASA(
  OA,
  N = 10,
  T0 = 10,
  rate = 0.1,
  Tmin = 1,
  Imax = 5,
  OC = "phi_p",
  p = 15,
  q = 1,
  maxtime = 5
)

Arguments

OA

An orthogonal array matrix.

N

A positive integer, which stands for the number of iterations. The default is set to be 10. A large value of N will result a high CPU time, and it is recommended to be no greater than 500.

T0

A positive number, which stands for the user-defined initial temperature. The default is set to be 10.

rate

A positive percentage, which stands for temperature decrease rate, and it should be in (0,1). For example, rate=0.25 means the temperature decreases by 25% each time. The default is set to be 10%.

Tmin

A positive number, which stands for the minimium temperature allowed. When current temperature becomes smaller or equal to Tmin, the stopping criterion for current loop is met. The default is set to be 1.

Imax

A positive integer, which stands for the maximum perturbations the algorithm will try without improvements before temperature is reduced. The default is set to be 5. For the computation complexity consideration, Imax is recommended to be smaller or equal to 5.

OC

An optimality criterion. The default setting is "phi_p", and it could be one of the following: "phi_p", "AvgAbsCor", "MaxAbsCor", "MaxProCriterion".

p

A positive integer, which is the parameter in the phi_p formula, and p is prefered to be large. The default is set to be 15.

q

The default is set to be 1, and it could be either 1 or 2. If q is 1, dij is the Manhattan (rectangular) distance. If q is 2, dij is the Euclidean distance.

maxtime

A positive number, which indicates the expected maximum CPU time given by user, and it is measured by minutes. For example, maxtime=3.5 indicates the CPU time will be no greater than three and half minutes. The default is set to be 5.

Value

If all inputs are logical, then the output will be an LHD whose sizes are the same as input OA. The assumption is that the elements of OAs must be positive.

References

Leary, S., Bhaskar, A., and Keane, A. (2003) Optimal orthogonal-array-based latin hypercubes. Journal of Applied Statistics, 30, 585-598.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#create an OA(9,2,3,2)
OA=matrix(c(rep(1:3,each=3),rep(1:3,times=3)),ncol=2,nrow=9,byrow = FALSE)

#Use above "OA" as the input OA to generate a 9 by 2 maximin distance LHD
#with the default setting
try=OASA(OA=OA)
try
phi_p(try)   #calculate the phi_p of "try".

#Another example
#generate a 9 by 2 nearly orthogonal LHD
try2=OASA(OA=OA,OC="MaxAbsCor")
try2
MaxAbsCor(try2)  #calculate the maximum absolute correlation.

LHD documentation built on Aug. 1, 2021, 1:06 a.m.