# NOT RUN {
#Try SLHD without stage II: create a 5 by 3 maximin distance LHD, with # of
#slices is 1, # of iterations = 5, initial temperature is set to be 5,
#decrease rate is 20%, minimium temperature is 1, maximum perturbations the
#algorithm will try without improvements is 3, and p=50
trySLHD1=SLHD(n=5,k=3,t=1,N=5,T0=5,rate=0.2,Tmin=1,Imax=3,p=50,q=1)
trySLHD1
phi_p(trySLHD1,p=50) #calculate the phi_p of "trySLHD1".
#Try SLHD with stage II
trySLHD2=SLHD(n=5,k=3,t=1,N=5,T0=5,rate=0.2,Tmin=1,Imax=3,p=50,q=1,stage2=TRUE)
trySLHD2
phi_p(trySLHD2,p=50) #calculate the phi_p of "trySLHD2".
# }
Run the code above in your browser using DataLab