Returns favorable parameters for Halton sequence.
[nsim,skip,leap] = lowdisc_haltonsuggest ( dim , nsimmin )
a floating point integer, the spatial dimension.
a floating point integer, the minimum required number of simulations. Default nsimmin = 1.
a floating point integer, the number of simulations to perform, with nsim >= nsimmin.
a floating point integer, the number of initial elements to skip in the sequence.
a floating point integer, the number of elements to ignore each time an element is generated.
This routine provides favorable parameters to be used with a Halton sequence. There are very few suggestions to use with this sequence.
We use settings suggested in : "Computational investigations of low-discrepancy sequences", Kocis, L. and Whiten, W. J. 1997. ACM Trans. Math. Softw. 23, 2 (Jun. 1997), 266-294. Especially p. 274. The citation p. 274 is the following. "The values of L, s and N were varied in range 3-3000, 1-400 and 10-10^5, respectively. The best leaps values found were 31, 61, 149, 409 and 1949. From dimensions 1-100, it was difficult to choose the optimal leap from these values, because the error of integration depended on the function used and because the sum of the maximum errors of the integration was almost the same for the five leaps listed. However, in the range of s 100-400, the best value found was clearly L=409."
We return nsim = nsimmin. We return skip = 0. If dimension is smaller than 400, we return leap = 409. If not we return leap = 0.
Other authors have suggested to consider the number of simulations as a product of the bases. See "On the Optimal Halton Sequence", Chi, Mascagni and Warknock, Mathematics and Computers in Simulation 70 (2005) 9?21. In low dimensions, we could use "nsim = prod ( prmat ( 1 : n ) )" where n is the number of dimensions and prmat is a matrix of primes, as computed from "prmat = lowdisc_primes100 ( )". The problem is that this function grows extremely fast, and becomes unusable for n greater than 10.
// See the suggestions in dimension 4. dim = 8; nsimmin = 1000; [nsim,skip,leap] = lowdisc_haltonsuggest ( dim , nsimmin ) // In dimension 500, we do not have any leap to suggest dim = 500; nsimmin = 1000; [nsim,skip,leap] = lowdisc_haltonsuggest ( dim , nsimmin ) // Use the Halton sequence in dimension 4. dim = 4; nsimmin = 1000; [nsim,skip,leap] = lowdisc_haltonsuggest ( dim , nsimmin ); lds = lowdisc_new("halton"); lds = lowdisc_configure(lds,"-dimension",dim); lds = lowdisc_configure(lds,"-skip",skip); lds = lowdisc_configure(lds,"-leap",leap); lds = lowdisc_startup (lds); [lds,computed]=lowdisc_next(lds,nsim); lds = lowdisc_destroy(lds); // Use the fast Halton sequence in dimension 4. dim = 4; nsimmin = 1000; [nsim,skip,leap] = lowdisc_haltonsuggest ( dim , nsimmin ); lds = lowdisc_new("haltonf"); lds = lowdisc_configure(lds,"-dimension",dim); lds = lowdisc_configure(lds,"-skip",skip); lds = lowdisc_configure(lds,"-leap",leap); lds = lowdisc_startup (lds); [lds,computed]=lowdisc_next(lds,nsim); lds = lowdisc_destroy(lds); // See the number of simulations as the product of the // primes used in the Halton sequence. // It is assumed that leap = 0, skip = 0. prmat = lowdisc_primes100 ( ); for n = 1 : 15 disp([n prod(1:n)]) end