CGO expDesign: Difference between revisions

From TomWiki
Jump to navigationJump to search
Line 228: Line 228:
If isnan(RandState), the random state is not initialized.   
If isnan(RandState), the random state is not initialized.   


|-
|''PriLev''||Print Level, if > 0 print 1 line information, if >1 more info.
|-valign="top"
|''Prob''||Problem structure
|-
|colspan="2"|'''Fields used in Prob''':
|-
|''x_L''||Lower bounds for each element in x.
|-
|''x_U''||Lower bounds for each element in x.
|-
|''b_L''||Lower bounds for the linear constraints.
|-
|''b_U''||Upper bounds for the linear constraints.
|-
|''A''||Linear constraint matrix
|-
|''c_L''||Lower bounds for the nonlinear constraints.
|-
|''c_U''||Upper bounds for the nonlinear constraints.
|-
|''optParam''||Structure which defines optimization parameters.
|-
|colspan="2"|'''Fields used in Prob.optParam:'''
|-
|''bTol||Linear constraint tolerance
|-
|''cTol||Nonlinear constraint tolerance
|-
|''CGO''||Defines user given points. Could also contain function values.
If ExD == 12, 14-16 these points are included into the design.
|-
|colspan="2"|'''Fields used in Prob.CGO:'''
|-
|''X''||A matrix of initial x values. One column for every x value.
If ExD = 5, size(X,2) >= dim(x)+1 needed.
|-
|''F''||A vector of initial f(x) values. If any element is set to NaN it will be computed.
|-
|''Cc''||Optionally a matrix of costly nonlinear constraint values Cc(x).
Each column Cc(:,i) is the constraint evaluated for x =  X(:,i);
If nonempty, then size(Cc,2) == size(X,2) must hold. If any element in column i is NaN, the vector Cc_i(x) = Cc(:,i) will be recomputed.
|-
|''glxFile''|| Name of DIRECT solver warm start file or warm start structure.
|-
|''varargin''|| Additional parameters that are sent to the costly f(x).
|-
|''MIP''||Defines integer optimization parameters.
|-
|colspan="2"|'''Fields used in Prob.MIP:'''
|-
|''IntVars''||Index vector with indices for integer variables.
|}
|}

Revision as of 14:29, 18 June 2014

Notice.png

This page is part of the CGO Manual. See CGO Manual.

Purpose

Computes an initial experimental design for CGO solvers.

Calling syntax

[X, O, F, Fpen, F00, Cc, Cn, nCon, nSample, ExDText, initRS] = expDesign(Percent, nSample, AddMP, nTrial, CLHMethod, SCALE, RandState, PriLev, Prob, varargin)

Description of inputs

Name Description
Percent Type of strategy to get the initial sampled values.
Percent Experimental Design ExD
Corner strategies
900 All Corners 1
997 xL + xU + adjacent corners 2
998 xU + adjacent corners 3
999 xL + adjacent corners 4
Virtual Corners
mod(Percent,100)% of the box
401-499 All Corners 17
501-599 xL + xU + adjacent corners 18
601-699 xU + adjacent corners 19
701-799 xL + adjacent corners 20
Deterministic Strategies
0 User given initial points 5
99 Use solver glcDirect 6
98 Use solver glbDirect 6
97 Use solver glcSolve 6
96 Use solver glbSolve 6
95 Use solver glcFast 6
94 Use solver glbFast 6
Latin Based Sampling
1 Maximin LHD 1-norm 7
2 Maximin LHD 2-norm 8
3 Maximin LHD Inf-norm 9
4 Minimal Audze-Eglais 10
5 Minimax LHD (only 2 dim) 11
6 Latin Hypercube 12
7 Orthogonal Samling 13
Random Strategies (pp in %)
1pp Circle surrounding 14
2pp Ellipsoid surrounding 15
3pp Rectangle surrounding 16

Negative values of Percent result in constrained versions of the experimental design methods 7-16. It means that all points sampled are feasible with respect to all given constraints.

For ExD 5,6-12,14-16 user defined points are used.

nSample Number of sample points to be used in initial experimental design. nSample is used differently depending on Percent:
(n)Sample:
ExD < 0 = 0 > 0 [ ]
1 2d
6 |n| iterations
7-11 d+1 d+1 max(d + 1,n) (d + 1)(d + 2) / 2
12 LATIN(k)
13 |n|
14-16 d + 1

where LATIN = [21 21 33 41 51 65 65] and k = |nSample|.

Otherwise nSample as input does not matter.

Description of the experimental designs:

ExD 1, All Corners. Initial points is the corner points of the box given by Prob.x_L and Prob.x_U. Generates 2d points, which results in too many points when the dimension is high.

ExD 2, Lower and Upper Corner point + adjacent points. Initial points are 2 * d + 2 corners: the lower left corner xL and its d adjacent corners xL + (xUi - xLi * ei, i = 1, ..., d and the upper right corner xU and its d adjacent corners xU - (xUi - xLi * ei, i = 1, ..., d

ExD 3. Initial points are the upper right corner xU and its d adjacent corners xU - (xUi - xLi * ei , i = 1, ..., d

ExD 4. Initial points are the lower left corner xL and its d adjacent corners xL + (xUi - xLi * ei , i = 1, ..., d

ExD 5. User given initial points, given as a matrix in CGO.X. Each column is one sampled point. If d = length(Prob.x_L), then size(X,1) = d, size(X,2) >= d + 1. CGO.F should be defined as empty, or contain a vector of corresponding f (x) values. Any CGO.F value set as NaN will be computed by solver routine.

ExD 6. Use determinstic global optimization methods to find the initial design. Current methods available (all DIRECT methods), dependent on the value of Percent:

Percent method
99 glcDirect
98 glbDirect
97 glcSolve
96 glbSolve
95 glcFast
94 glbFast

If a DIRECT solver already computed the needed points, the warm start file (e.g. glcDirectSave.mat for glcDirect) or the warm start structure in Result."solvername".WarmStartInfo is given in input field CGO.glXFile.

ExD 7-11. Optimal Latin Hypercube Designs (LHD) with respect to different norms. The following norms and designs are available:

Percent LHD
1 Maximin 1-Norm
2 Maximin 2-Norm
3 Maximin Inf-Norm
4 Audze-Eglais Norm
5 Minimax 2-Norm

All designs taken from: http://www.spacefillingdesigns.nl/

Constrained versions will try bigger and bigger designs up to M = max(10 * d, nTrial) different designs, stopping when it has found nSample feasible points.

ExD 12. Latin hypercube space-filling design. For nSample < 0, k = |nSample| should in principle be the problem dimension. The number of points sampled is:

k 2 3 4 5 6 >6
Points 21 33 41 51 65 65

k : 2 3 4 5 6 > 6

Points : 21 33 41 51 65 65

The call made is:

X = daceInit(abs(nSample),Prob.x_L,Prob.x_U);

Set nSample = [] to get (d+1)*(d+2)/2 sampled points:

d 1 2 3 4 5 6 7 8 9 10
Points 3 6 10 15 21 28 36 45 55 66

This is a more efficient number of points to use.

If CGO.X is nonempty, these points are verified as in ExD 5, and treated as already sampled points. Then nSample additional points are sampled, restricted to be close to the given points.

Constrained version of Latin hypercube only keep points that fulfill the linear and nonlinear constraints. The algorithm will try up to M = max(10 * d, nTrial) points, stopping when it has found nSample feasible points (d + 1 points if nSample < 0).

For pure integer programming (IP) problems with 1 or more linear equalities, a special function mipFeasible generates part of the design solving a set of LP problems. At least as many infeasible points as number of linear equalities are sampled, which is necessary.

ExD 13. Orthogonal Sampling, LH with subspace density demands.

ExD 14,15 and 16. Random strategies, the |Percent| value gives the percentage size of an ellipsoid, circle or rectangle around the so far sampled points that new points are not allowed in. Range 1%-50%. Recommended values 10% - 20%.

If CGO.X is nonempty, these points are verified as in ExD 5, and treated as already sampled points. Then nSample additional points are sampled, restricted to be close to the given points.

AddMP If = 1, add the midpoint as extra point in the corner strategies. Default AddMP=1 if any corner strategy.
nTrial For CLH, the method generates M = max(10 * d, nTrial) trial points, and evaluates them until nSample feasible points are found.

In the random designs, nTrial is the maximum number of trial points randomly generated for each new point to sample.

CLHMethod Different search strategies for finding feasible LH points. First of all, the least infeasible point is added. Then the linear feasible points are considered. If more points are needed still, the nonlinear infeasible points are added.

1 - Take the sampled infeasible points in order.

2 - Take a random sample of the infeasible points.

3 - Use points with lowest constraint error (cErr).

SCALE 0 - Original search space.

1 - Transform search space to unit cube.

RandState If >= 0, rand('state',RandState) is set to initialize the pseudo-random generator.

If < 0, rand('state', 100*clock) is set to give a new set of random values each run.

If isnan(RandState), the random state is not initialized.


PriLev Print Level, if > 0 print 1 line information, if >1 more info.
Prob Problem structure
Fields used in Prob:
x_L Lower bounds for each element in x.
x_U Lower bounds for each element in x.
b_L Lower bounds for the linear constraints.
b_U Upper bounds for the linear constraints.
A Linear constraint matrix
c_L Lower bounds for the nonlinear constraints.
c_U Upper bounds for the nonlinear constraints.
optParam Structure which defines optimization parameters.
Fields used in Prob.optParam:
bTol Linear constraint tolerance
cTol Nonlinear constraint tolerance
CGO Defines user given points. Could also contain function values.

If ExD == 12, 14-16 these points are included into the design.

Fields used in Prob.CGO:
X A matrix of initial x values. One column for every x value.

If ExD = 5, size(X,2) >= dim(x)+1 needed.

F A vector of initial f(x) values. If any element is set to NaN it will be computed.
Cc Optionally a matrix of costly nonlinear constraint values Cc(x).

Each column Cc(:,i) is the constraint evaluated for x = X(:,i); If nonempty, then size(Cc,2) == size(X,2) must hold. If any element in column i is NaN, the vector Cc_i(x) = Cc(:,i) will be recomputed.

glxFile Name of DIRECT solver warm start file or warm start structure.
varargin Additional parameters that are sent to the costly f(x).
MIP Defines integer optimization parameters.
Fields used in Prob.MIP:
IntVars Index vector with indices for integer variables.