Options Class for e04nq
Syntax
C# |
---|
public class e04nqOptions |
Visual Basic |
---|
Public Class e04nqOptions |
Visual C++ |
---|
public ref class e04nqOptions |
F# |
---|
type e04nqOptions = class end |
Description of the Optional Parameters
For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
- the keywords;
- a parameter value, where the letters , denote options that take character, integer and real values respectively;
- the default value is used whenever the condition is satisfied and where the symbol is a generic notation for machine precision (see x02aj);
- The variable holds the value of Infinite Bound Size.
Keywords and character values are case and white space insensitive.
Check Frequency |
Every th iteration after the most recent basis factorization, a numerical test is made to see if the current solution satisfies the linear constraints . If the largest element of the residual vector is judged to be too large, the current basis is refactorized and the basic variables recomputed to satisfy the constraints more accurately. If , the value is used and effectively no checks are made.
is useful for debugging purposes, but otherwise this option should not be needed.
Crash Option |
Crash Tolerance |
Note that these options do not apply when (see [Parameters]).
If , an internal Crash procedure is used to select an initial basis from various rows and columns of the constraint matrix . The value of determines which rows and columns of are initially eligible for the basis, and how many times the Crash procedure is called. Columns of 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 , certain slacks on inequality rows are selected for the basis first. (If , numerical values are used to exclude slacks that are close to a bound.) The Crash procedure then makes several passes through the columns of , 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 . If is the largest element in column , other nonzeros in the column are ignored if . (To be meaningful, should be in the range .)
When , 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 and fewer (arbitrary) slacks. A feasible solution may be reached sooner on some problems.
For example, suppose the first columns of form the matrix shown under LU Factor Tolerance; i.e., a tridiagonal matrix with entries , , . To help the Crash procedure choose all columns for the initial basis, we would specify a Crash Tolerance of for some value of .
Defaults |
This special keyword may be used to reset all optional parameters to their default values.
Dump File |
Load File |
Optional parameters Dump File and Load File are similar to optional parameters Punch File and Insert File, but they record solution information in a manner that is more direct and more easily modified. A full description of information recorded in optional parameters Dump File and Load File is given in Gill et al. (2005a).
If , the last solution obtained will be output to the file with unit number .
If , the Load File containing basis information will be read.
The file will usually have been output previously as a Dump File. The file will not be accessed if optional parameters Old Basis File or Insert File are specified.
Elastic Mode |
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 Elastic Objective and Elastic Weight. | |
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 Weight. If Elastic Weight is sufficiently large and the constraints are feasible, the minimizer of the composite objective and the solution of the original problem are identical. However, if the Elastic Weight is not sufficiently large, the minimizer of the composite function may be infeasible, even if a feasible point exists.
|
Elastic Objective |
This determines the form of the composite objective in Phase 2 (). Three types of composite objectives are available.
Meaning | |
Include only the true objective in the composite objective. This option sets in the composite objective and allows e04nq to ignore the elastic bounds and find a solution that minimizes subject to the non-elastic constraints. This option is useful if there are some ‘soft’ constraints that you would like to ignore if the constraints are infeasible. | |
Use a composite objective defined with determined by the value of Elastic Weight. This value is intended to be used in conjunction with . | |
Include only the elastic variables in the composite objective. The elastics are weighted by . This choice minimizes the violations of the elastic variables at the expense of possibly increasing the true objective. This option can be used to find a point that minimizes the sum of the violations of a subset of constraints specified by the input array helast. |
Elastic Weight |
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 for Minimize, for Maximize, and is the quadratic objective.
Note that the effect of is not disabled once a feasible point is obtained.
Expand Frequency |
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 iterations, the feasibility tolerance actually used by e04nq (i.e., the working feasibility tolerance) increases from to (in steps of ).
Increasing the value of 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 , the value is used and effectively no anti-cycling procedure is invoked.
Factorization Frequency |
If , at most 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 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 are satisfied. Occasionally, the basis will be refactorized before the limit of updates is reached. If , the default value is used.
Feasibility Tolerance |
A feasible problem is one in which all variables satisfy their upper and lower bounds to within the absolute tolerance . (This includes slack variables. Hence, the general constraints are also satisfied to within .)
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 by a factor of or . 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 ), 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 .
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 |
If , defines the ‘infinite’ bound in the definition of the problem constraints. Any upper bound greater than or equal to will be regarded as (and similarly any lower bound less than or equal to will be regarded as ). If , the default value is used.
Iterations Limit |
The value of specifies the maximum number of iterations allowed before termination. Setting and 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 , the default value is used.
LU Density Tolerance |
LU Singularity Tolerance |
The density tolerance is used during factorization of the basis matrix. Columns of and rows of 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 , the Markowitz strategy for choosing pivots is terminated. The remaining matrix is factored by a dense procedure. Raising the density tolerance towards may give slightly sparser factors, with a slight increase in factorization time.
If , defines the singularity tolerance used to guard against ill-conditioned basis matrices. After is refactorized, the diagonal elements of are tested as follows. If or , the th column of the basis is replaced by the corresponding slack variable. If , the default value is used.
LU Factor Tolerance |
LU Update Tolerance |
The values of and affect the stability and sparsity of the basis factorization , during refactorization and updates respectively. The lower triangular matrix is a product of matrices of the form
where the multipliers will satisfy . The default values of and usually strike a good compromise between stability and sparsity. They must satisfy , .
For large and relatively dense problems, (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 in order to achieve stability. For example, if the columns of include a sub-matrix of the form
one should set both and to values in the range .
LU Partial Pivoting |
LU Complete Pivoting |
LU Rook Pivoting |
The 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 ).
Minimize |
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 and the other maximizes , their solutions will be the same but the signs of the dual variables and the reduced gradients (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.
New Basis File |
Backup Basis File |
Save Frequency |
Optional parameters New Basis File and Backup Basis File are sometimes referred to as basis maps. They contain the most compact representation of the state of each variable. They are intended for restarting the solution of a problem at a point that was reached by an earlier run. For nontrivial problems, it is advisable to save basis maps at the end of a run, in order to restart the run if necessary.
If , a basis map will be saved on file every th iteration, where is the Save Frequency.
The first record of the file will contain the word PROCEEDING if the run is still in progress. A basis map will also be saved at the end of a run, with some other word indicating the final solution status.
Use of is intended as a safeguard against losing the results of a long run. Suppose that a New Basis File is being saved every (Save Frequency) iterations, and that e04nq is about to save such a basis at iteration . It is conceivable that the run may be interrupted during the next few milliseconds (in the middle of the save). In this case the Basis file will be corrupted and the run will have been essentially wasted.
To eliminate this risk, both a New Basis File and a Backup Basis File may be specified. The following would be suitable for the above example:
Backup Basis File 11 New Basis File 12
The current basis will then be saved every iterations, first on File 12 and then immediately on File 11. If the run is interrupted at iteration during the save on File 12, there will still be a usable basis on File 11 (corresponding to iteration ).
Note that a new basis will be saved in New Basis File at the end of a run if it terminates normally, but it will not be saved in Backup Basis File. In the above example, if an optimum solution is found at iteration (or if the iteration limit is ), the final basis on File 12 will correspond to iteration , but the last basis saved on File 11 will be the one for iteration .
A full description of information recorded in New Basis File and Backup Basis File is given in Gill et al. (2005a).
Nolist |
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 |
If , 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 |
This is used to judge the size of the reduced gradients , where is the th component of the gradient, is the associated column of the constraint matrix , 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 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 against .
Partial Price |
This option is recommended for large FP or LP problems that have significantly more variables than constraints (i.e., ). It reduces the work required for each pricing operation (i.e., when a nonbasic variable is selected to enter the basis). If , all columns of the constraint matrix are searched. If , and are partitioned to give roughly equal segments , for (modulo ). If the previous pricing search was successful on , the next search begins on the segments and . 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 , and so on. If , the default value is used.
Pivot Tolerance |
Broadly speaking, the pivot tolerance is used to prevent columns entering the basis if they would cause the basis to become almost singular.
When changes to for some search direction , a ‘ratio test’ determines which component of reaches an upper or lower bound first. The corresponding element of is called the pivot element. Elements of are ignored (and therefore cannot be pivot elements) if they are smaller than the pivot tolerance .
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 ) provides some freedom to maximize the pivot element and thereby improve numerical stability. Excessively small values of should therefore not be specified. To a lesser extent, the optional parameter Expand Frequency (say ) also provides some freedom to maximize the pivot element. Excessively large values of should therefore not be specified.
Print File |
If , the following information is output to during the solution of each problem:
– | a listing of the optional parameters; |
– | some statistics about the problem; |
– | the amount of storage available for the factorization of the basis matrix; |
– | 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 |
If , one line of the iteration log will be printed every th iteration. A value such as is suggested for those interested only in the final solution. If , the value of is used and effectively no checks are made.
Print Level |
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 Print Frequency), and the exit condition with a summary of the final solution. | |
Basis factorization statistics. |
Punch File |
Insert File |
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 , the final solution obtained will be output to file .
For linear programs, this format is compatible with various commercial systems.
If ,
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 |
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 of the reduced Hessian . As the QP iterations proceed, the dimension of 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 than Reduced Hessian Dimension.
QPSolver QN solves the QP using a quasi-Newton method. In this case, is the factor of a quasi-Newton approximate Hessian.
QPSolver CG uses an active-set method similar to QPSolver QN, but uses the conjugate-gradient method to solve all systems involving the reduced Hessian.
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 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 superbasics).
Reduced Hessian Dimension |
This specifies that an by triangular matrix (to define the reduced Hessian according to ). is to be available for use by the Cholesky QP solver.
Scale Option |
Scale Tolerance |
Scale Print |
Three scale options are available as follows:
Meaning | |
0 | No scaling. This is recommended if it is known that and the constraint matrix never have very large elements (say, larger than ). |
1 | The constraints and variables are scaled by an iterative procedure that attempts to make the matrix coefficients as close as possible to (see Fourer (1982)). This will sometimes improve the performance of the solution procedures. |
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 or the solution is large. This takes into account columns of that are fixed or have positive lower bounds or negative upper bounds. |
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 is less than times its previous value, another scaling pass is performed to adjust the row and column scales. Raising from to (say) usually increases the number of scaling passes through . At most passes are made. The value of should lie in the range .
Scale Print causes the row scales and column scales to be printed to Print File, if System Information Yes has been specified. The scaled matrix coefficients are , and the scaled bounds on the variables and slacks are , , where if .
Solution Yes |
Solution No |
This option determines if the final obtained solution is to be output to the
Print File. Note that the Solution File option operates independently.
Solution File |
If , the final solution will be output to file (whether optimal or not).
To see more significant digits in the printed solution, it will sometimes be useful to make
refer to the system Print File.
Summary File |
Summary Frequency |
If , the Summary File is output to file , including a line of the iteration log every 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 , the value of is used and effectively no checks are made.
Superbasics Limit |
This places a limit on the storage allocated for superbasic variables. Ideally, 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 , the number of general constraints.) The default value of is therefore .
For quadratic problems, the number of degrees of freedom is often called the ‘number of independent variables’. Normally, need not be greater than , where is the number of leading nonzero columns of . For many problems, may be considerably smaller than . This will save storage if 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 |
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 |
If , some timing information will be output to the Print file, if .
Unbounded Step Size |
If , 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 during an iteration would exceed the value of , the objective function is considered to be unbounded below in the feasible region. If , the default value is used. See Infinite Bound Size for the definition of .