LHD (version 0.1.0)

OASA: Orthogonal-Array-Based Simulated Annealing

Description

OASA returns a maximin distance LHD constructed by orthogonal-array-based simulated annealing algorithm (OASA)

Usage

OASA(OA, n, m, s, r, N, T0, rate, Tmin, Imax, p = 50, q = 1)

Arguments

OA

A Matrix.

n

A positive integer.

m

A positive integer.

s

A positive integer.

r

A positive integer.

N

A positive integer.

T0

A positive number.

rate

A positive percentage.

Tmin

A positive number.

Imax

A positive integer.

p

A positive integer.

q

The default is set to be 1, and it could be either 1 or 2.

Value

If all inputs are logical, then the output will be a n by m LHD.

Details

  • OA stands for the input orthogonal array matrix.

  • n stands for the number of rows of OA.

  • m stands for the number of columns of OA.

  • s stands for the number of levels of OA.

  • r stands for the strength of OA.

  • N stands for the number of iterations.

  • T0 stands for the user-defined initial temperature.

  • rate 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.

  • Tmin stands for the minimium temperature allowed. When current temperature becomes smaller or equal to Tmin, the stopping criterion for current loop is met.

  • Imax stands for the maximum perturbations the algorithm will try without improvements before temperature is reduced. For the computation complexity consideration, Imax is recommended to be smaller or equal to 5.

  • p is the parameter in the phi_p formula, and p is prefered to be large.

  • If q is 1 (the default setting), dij is the rectangular distance. If q is 2, dij is the Euclidean distance.

References

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

Examples

Run this code
# NOT RUN {
#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);OA

#Use above "OA" as the input OA, with with # of iterations =10, initial
#temperature is set to be 10, decrease rate is 10%, minimium temperature is 1,
#maximum perturbations the algorithm will try without improvements is 5, and p=50
tryOASA=OASA(OA=OA,9,2,3,2,N=10,T0=10,rate=0.1,Tmin=1,Imax=5,p=50,q=1)
tryOASA
# }

Run the code above in your browser using DataLab