Options Class for e04nq
See the examples in the Library Introduction.
Syntax
C# |
---|
public class e04nqOptions |
Visual Basic (Declaration) |
---|
Public Class e04nqOptions |
Visual C++ |
---|
public ref class e04nqOptions |
F# |
---|
type e04nqOptions = class end |
Description of the Optional Parameters
Check Frequency | i | Default |
Every i th iteration after the most recent basis factorization, a numerical test is made to see if the current solution x , s satisfies the linear constraints A x - s = 0 . If the largest element of the residual vector r = A x - s is judged to be too large, the current basis is refactorized and the basic variables recomputed to satisfy the constraints more accurately. If i ≤ 0 , the value i = 99999999 is used and effectively no checks are made.
Crash Option | i | Default |
Crash Tolerance | r | Default |
Note that these options do not apply when start = "W" (see [Parameters]).
If start = "C" , an internal Crash procedure is used to select an initial basis from various rows and columns of the constraint matrix
A
- I
. The value of i determines which rows and columns of A are initially eligible for the basis, and how many times the Crash procedure is called. Columns of - I are used to pad the basis where necessary.
Meaning | |
The initial basis contains only slack variables: |
|
The Crash procedure is called once, looking for a triangular basis in all rows and columns of the matrix |
|
The Crash procedure is called once, looking for a triangular basis in rows. | |
The Crash procedure is called twice, treating linear equalities and linear inequalities separately. |
If i ≥ 1 , certain slacks on inequality rows are selected for the basis first. (If i ≥ 2 , numerical values are used to exclude slacks that are close to a bound.) The Crash procedure then makes several passes through the columns of A , searching for a basis matrix that is essentially triangular. A column is assigned to ‘pivot’ on a particular row if the column contains a suitably large element in a row that has not yet been assigned. (The pivot elements ultimately form the diagonals of the triangular basis.) For remaining unassigned rows, slack variables are inserted to complete the basis.
The Crash Tolerance allows the Crash procedure to ignore certain ‘small’ nonzero elements in each column of A . If
a max
is the largest element in column j , other nonzeros
a i j
in the column are ignored if
a i j
≤
a max
×
r
. (To be meaningful, r should be in the range
0
≤
r
<
1
.)
When r > 0.0 , the basis obtained by the Crash procedure may not be strictly triangular, but it is likely to be nonsingular and almost triangular. The intention is to obtain a starting basis containing more columns of A and fewer (arbitrary) slacks. A feasible solution may be reached sooner on some problems.
For example, suppose the first m columns of A form the matrix shown under LU Factor Tolerance ; i.e., a tridiagonal matrix with entries - 1 , 4 , - 1 . To help the Crash procedure choose all m columns for the initial basis, we would specify a Crash Tolerance of r for some value of r > 0.5 .
Defaults |
This special keyword may be used to reset all optional parameters to their default values.
Elastic Mode | i | Default |
This parameter determines if (and when) elastic mode is to be started. Three elastic modes are available as follows:
Meaning | |
Elastic mode is never invoked. e04nq will terminate as soon as infeasibility is detected. There may be other points with significantly smaller sums of infeasibilities. | |
Elastic mode is invoked only if the constraints are found to be infeasible (the default). If the constraints are infeasible, continue in elastic mode with the composite objective determined by the values of the optional parameters |
|
The iterations start and remain in elastic mode. This option allows you to minimize the composite objective function directly without first performing Phase 1 iterations.
The success of this option will depend critically on your choice of
|
Elastic Objective | i | Default |
This determines the form of the composite objective
f x
+
γ
∑ j
v j
+
w j
in Phase 2 (γ ). Three types of composite objectives are available.
Meaning | |
Include only the true objective |
|
Use a composite objective defined with |
|
Include only the elastic variables in the composite objective. The elastics are weighted by |
Elastic Weight | r | Default |
This defines the value of γ in the composite objective in Phase 2 (γ ).
At each iteration of elastic mode, the composite objective is defined to be
where σ = 1 for Minimize , σ = - 1 for Maximize , and f x is the quadratic objective.
Note that the effect of γ is not disabled once a feasible point is obtained.
Expand Frequency | i | Default |
This option is part of an anti-cycling procedure (see [Miscellaneous]) designed to allow progress even on highly degenerate problems.
The strategy is to force a positive step at every iteration, at the expense of violating the constraints by a small amount. Suppose that the value of the optional parameter Feasibility Tolerance is δ . Over a period of i iterations, the feasibility tolerance actually used by e04nq (i.e., the working feasibility tolerance) increases from 0.5 δ to δ (in steps of 0.5 δ / i ).
Increasing the value of i helps reduce the number of slightly infeasible nonbasic variables (most of which are eliminated during the resetting procedure). However, it also diminishes the freedom to choose a large pivot element (see the description of the optional parameter Pivot Tolerance ).
If i ≤ 0 , the value i = 99999999 is used and effectively no anti-cycling procedure is invoked.
Factorization Frequency | i | Default |
If i > 0 , at most i basis changes will occur between factorizations of the basis matrix.
For LP problems, the basis factors are usually updated at every iteration. Higher values of i may be more efficient on problems that are extremely sparse and well scaled.
For QP problems, fewer basis updates will occur as the solution is approached. The number of iterations between basis factorizations will therefore increase. During these iterations a test is made regularly according to the value of optional parameter Check Frequency to ensure that the linear constraints A x - s = 0 are satisfied. Occasionally, the basis will be refactorized before the limit of i updates is reached. If i ≤ 0 , the default value is used.
Feasibility Tolerance | r | Default |
A feasible problem is one in which all variables satisfy their upper and lower bounds to within the absolute tolerance r . (This includes slack variables. Hence, the general constraints are also satisfied to within r .)
e04nq attempts to find a feasible solution before optimizing the objective function. If the sum of infeasibilities cannot be reduced to zero, the problem is assumed to be infeasible. Let sInf be the corresponding sum of infeasibilities. If sInf is quite small, it may be appropriate to raise r by a factor of 10 or 100 . Otherwise, some error in the data should be suspected.
Note that if sInf is not small and you have not asked e04nq to minimize the violations of the elastic variables (i.e., you have not specified Elastic Objective = 2 ), there may be other points that have a significantly smaller sum of infeasibilities. e04nq will not attempt to find the solution that minimizes the sum unless Elastic Objective = 2 .
If the constraints and variables have been scaled (see the description of the optional parameter Scale Option ), then feasibility is defined in terms of the scaled problem (since it is more likely to be meaningful).
Infinite Bound Size | r | Default |
If r ≥ 0 , r defines the ‘infinite’ bound infbnd in the definition of the problem constraints. Any upper bound greater than or equal to infbnd will be regarded as + ∞ (and similarly any lower bound less than or equal to - infbnd will be regarded as - ∞ ). If r < 0 , the default value is used.
Iterations Limit | i | Default |
The value of i specifies the maximum number of iterations allowed before termination. Setting i = 0 and Print Level > 0 means that: the workspace needed to start solving the problem will be computed and printed; and feasibility and optimality will be checked. No iterations will be performed. If i < 0 , the default value is used.
LU Density Tolerance | r1 | Default
|
LU Singularity Tolerance | r2 | Default
|
The density tolerance r 1 is used during L U factorization of the basis matrix. Columns of L and rows of U are formed one at a time, and the remaining rows and columns of the basis are altered appropriately. At any stage, if the density of the remaining matrix exceeds r 1 , the Markowitz strategy for choosing pivots is terminated. The remaining matrix is factored by a dense L U procedure. Raising the density tolerance towards 1.0 may give slightly sparser L U factors, with a slight increase in factorization time.
If r 2 > 0 , r 2 defines the singularity tolerance used to guard against ill-conditioned basis matrices. After B is refactorized, the diagonal elements of U are tested as follows. If u j j ≤ r 2 or u j j < r 2 max i u i j , the j th column of the basis is replaced by the corresponding slack variable. If r 2 ≤ 0 , the default value is used.
LU Factor Tolerance | r1 | Default |
LU Update Tolerance | r2 | Default |
The values of r 1 and r 2 affect the stability and sparsity of the basis factorization B = L U , during refactorization and updates respectively. The lower triangular matrix L is a product of matrices of the form
where the multipliers μ will satisfy μ ≤ r i . The default values of r 1 and r 2 usually strike a good compromise between stability and sparsity. They must satisfy r 1 , r 2 ≥ 1.0 .
For large and relatively dense problems, r 1 = 10.0 or 5.0 (say) may give a useful improvement in stability without impairing sparsity to a serious degree.
For certain very regular structures (e.g., band matrices) it may be necessary to reduce r 1 and/or r 2 in order to achieve stability. For example, if the columns of A include a sub-matrix of the form
one should set both r 1 and r 2 to values in the range 1.0 ≤ r i < 4.0 .
LU Partial Pivoting | Default |
LU Complete Pivoting |
LU Rook Pivoting |
The L U factorization implements a Markowitz-type search for pivots that locally minimize the fill-in subject to a threshold pivoting stability criterion. The default option is to use threshold partial pivoting. The options LU Complete Pivoting and LU Rook Pivoting are more expensive but more stable and better at revealing rank, as long as the LU Factor Tolerance is not too large (say < 2.0 ).
Minimize | Default |
Maximize |
Feasible Point |
This option specifies the required direction of the optimization. It applies to both linear and nonlinear terms (if any) in the objective function. Note that if two problems are the same except that one minimizes f x and the other maximizes - f x , their solutions will be the same but the signs of the dual variables π i and the reduced gradients d j (see [Main Iteration]) will be reversed.
The option Feasible Point means ‘ignore the objective function, while finding a feasible point for the linear constraints’. It can be used to check that the constraints are feasible without altering the call to e04nq.
Nolist | Default |
List |
Normally each optional parameter specification is printed to unit Print File as it is supplied. Optional parameter Nolist may be used to suppress the printing and optional parameter List may be used to restore printing.
Old Basis File | i | Default |
If i > 0 , the basis maps information will be obtained from this file.
The file will usually have been output previously as a New Basis File or Backup Basis File .
A full description of information recorded in New Basis File and Backup Basis File is given in Gill et al. (2005a).
The file will not be acceptable if the number of rows or columns in the problem has been altered.
Optimality Tolerance | r | Default |
This is used to judge the size of the reduced gradients d j = g j - a j T π , where g j is the j th component of the gradient, a j is the associated column of the constraint matrix A - I , and π is the set of dual variables.
By construction, the reduced gradients for basic variables are always zero. The problem will be declared optimal if the reduced gradients for nonbasic variables at their lower or upper bounds satisfy
respectively, and if d j / π ≤ r for superbasic variables.
In the above tests, π is a measure of the size of the dual variables. It is included to make the tests independent of a scale factor on the objective function. The quantity π actually used is defined by
so that only large scale factors are allowed for.
If the objective is scaled down to be very small, the optimality test reduces to comparing d j against 0.01 r .
Partial Price | i | Default |
This option is recommended for large FP or LP problems that have significantly more variables than constraints (i.e., n ≫ m ). It reduces the work required for each pricing operation (i.e., when a nonbasic variable is selected to enter the basis). If i = 1 , all columns of the constraint matrix
A
- I
are searched. If i > 1 , A and I are partitioned to give i roughly equal segments A j , I j , for j = 1 , 2 , … , i (modulo i ). If the previous pricing search was successful on A j - 1 , I j - 1 , the next search begins on the segments A j and I j . If a reduced gradient is found that is larger than some dynamic tolerance, the variable with the largest such reduced gradient (of appropriate sign) is selected to enter the basis. If nothing is found, the search continues on the next segments A j + 1 , I j + 1 , and so on. If i ≤ 0 , the default value is used.
Pivot Tolerance | r | Default |
Broadly speaking, the pivot tolerance is used to prevent columns entering the basis if they would cause the basis to become almost singular.
When
x
changes to
x + α p
for some search direction
p
, a ‘ratio test’ determines which component of
x
reaches an upper or lower bound first. The corresponding element of
p
is called the pivot element. Elements of
p
are ignored (and therefore cannot be pivot elements) if they are smaller than the pivot tolerance
r
.
It is common for two or more variables to reach a bound at essentially the same time. In such cases, the optional parameter Feasibility Tolerance (say
t
) provides some freedom to maximize the pivot element and thereby improve numerical stability. Excessively small values of
t
should therefore not be specified. To a lesser extent, the optional parameter Expand Frequency (say
f
) also provides some freedom to maximize the pivot element. Excessively large values of
f
should therefore not be specified.
Print File | i | Default |
If i > 0 , the following information is output to i during the solution of each problem:
– | a listing of the optional parameters; |
– | some statistics about the problem; |
– | the amount of storage available for the |
– | notes about the initial basis resulting from a Crash procedure or a Basis file; |
– | the iteration log; |
– | basis factorization statistics; |
– | the exit ifail condition and some statistics about the solution obtained; |
– | the printed solution, if requested. |
The last four items are described in [Further Comments] and [Description of Monitoring Information]. Further brief output may be directed to the Summary File .
Print Frequency | i | Default |
If i > 0 , one line of the iteration log will be printed every i th iteration. A value such as i = 10 is suggested for those interested only in the final solution. If i ≤ 0 , the value of i = 99999999 is used and effectively no checks are made.
Print Level | i | Default |
This controls the amount of printing produced by e04nq as follows.
Meaning | |
0 | No output except error messages. If you want to suppress all output, set |
The set of selected options, problem statistics, summary of the scaling procedure, information about the initial basis resulting from a Crash or a Basis file, a single line of output at each iteration (controlled by the optional parameter |
|
Basis factorization statistics. |
Punch File | i1 | Default |
Insert File | i2 | Default |
These files provide compatibility with commercial mathematical programming systems. The Punch File from a previous run may be used as an Insert File for a later run on the same problem. A full description of information recorded in Insert File and Punch File is given in Gill et al. (2005a).
If i 1 > 0 , the final solution obtained will be output to file i 1 .
For linear programs, this format is compatible with various commercial systems.
If i 2 > 0 ,
the Insert File containing basis information will be read. The file will usually have been output previously as a Punch File . The file will not be accessed if Old Basis File is specified.
QPSolver Cholesky | Default |
QPSolver CG |
QPSolver QN |
Specifies the active-set algorithm used to solve the quadratic program in Phase 2 (γ ). QPSolver Cholesky holds the full Cholesky factor R of the reduced Hessian Z T H Z . As the QP iterations proceed, the dimension of R changes with the number of superbasic variables. If the number of superbasic variables needs to increase beyond the value of Reduced Hessian Dimension , the reduced Hessian cannot be stored and the solver switches to QPSolver CG . The Cholesky solver is reactivated if the number of superbasics stabilizes at a value less then Reduced Hessian Dimension .
The Cholesky QP solver is the most robust, but may require a significant amount of computation if there are many superbasics.
The quasi-Newton QP solver does not require computation of the exact R at the start of Phase 2 (γ ). It may be appropriate when the number of superbasics is large but relatively few iterations are needed to reach a solution (e.g., if e04nq is called with a Warm Start).
The conjugate-gradient QP solver is appropriate for problems with many degrees of freedom (say, more than 2000 superbasics).
Reduced Hessian Dimension | i | Default |
This specifies that an i by i triangular matrix R (to define the reduced Hessian according to
R T
R
=
Z T
H Z
). is to be available for use by the Cholesky QP solver.
Scale Option | i | Default |
Scale Tolerance | r | Default |
Scale Print |
Three scale options are available as follows:
Meaning | |
0 | No scaling. This is recommended if it is known that |
1 | The constraints and variables are scaled by an iterative procedure that attempts to make the matrix coefficients as close as possible to |
2 | The constraints and variables are scaled by the iterative procedure. Also, a certain additional scaling is performed that may be helpful if the right-hand side |
Optional parameter Scale Tolerance affects how many passes might be needed through the constraint matrix. On each pass, the scaling procedure computes the ratio of the largest and smallest nonzero coefficients in each column:
If max j ρ j is less than r times its previous value, another scaling pass is performed to adjust the row and column scales. Raising r from 0.9 to 0.99 (say) usually increases the number of scaling passes through A . At most 10 passes are made. The value of r should lie in the range 0 < r < 1 .
Solution File | i | Default |
If i > 0 , the final solution will be output to file i (whether optimal or not).
To see more significant digits in the printed solution, it will sometimes be useful to make
i refer to the system Print File .
Summary File | i1 | Default |
Summary Frequency | i2 | Default |
If i 1 > 0 , the Summary File is output to file i 1 , including a line of the iteration log every i 2 th iteration.
In an interactive environment, it is useful to direct this output to the terminal, to allow a run to be monitored online. (If something looks wrong, the run can be manually terminated.) Further details are given in [Description of Monitoring Information]. If i 2 ≤ 0 , the value of i 2 = 99999999 is used and effectively no checks are made.
Superbasics Limit | i | Default |
This places a limit on the storage allocated for superbasic variables. Ideally, i should be set slightly larger than the ‘number of degrees of freedom’ expected at an optimal solution.
For linear programs, an optimum is normally a basic solution with no degrees of freedom. (The number of variables lying strictly between their bounds is no more than m , the number of general constraints.) The default value of i is therefore 1 .
For quadratic problems, the number of degrees of freedom is often called the ‘number of independent variables’. Normally, i need not be greater than n H + 1 , where n H is the number of leading nonzero columns of H . For many problems, i may be considerably smaller than n H . This will save storage if n H is very large.
Suppress Parameters |
Normally e04nq prints the options file as it is being read, and then prints a complete list of the available keywords and their final values. The optional parameter Suppress Parameters tells e04nq not to print the full list.
System Information No | Default |
System Information Yes |
This option prints additional information on the progress of major and minor iterations, and Crash statistics. See [Description of Monitoring Information].
Timing Level | i | Default |
If i > 0 , some timing information will be output to the Print File , if Print File > 0 .
Unbounded Step Size | r | Default |
If r > 0 , r specifies the magnitude of the change in variables that will be considered a step to an unbounded solution. (Note that an unbounded solution can occur only when the Hessian is not positive-definite.) If the change in x during an iteration would exceed the value of r , the objective function is considered to be unbounded below in the feasible region. If r ≤ 0 , the default value is used. See Infinite Bound Size for the definition of infbnd .
Inheritance Hierarchy
System..::.Object
NagLibrary..::.E04..::.e04nqOptions
NagLibrary..::.E04..::.e04nqOptions