SNOPT File Output

From TomWiki
Jump to navigationJump to search

Notice.png

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

The files can be directed with the Print file and Summary file options (or suppressed).

The PRINT file

If Print file is set (not done through optPar, see the help for calling the solver), the following information is output to the PRINT file during the solution process. All printed lines are less than 131 characters.

  • A listing of the SPECS file, if any.
  • A listing of the options that were or could have been set in the SPECS file.
  • An estimate of the working storage needed and the amount available.
  • Some statistics about the problem being solved.
  • The storage available for the LU factors of the basis matrix.
  • A summary of the scaling procedure, if Scale option > 0.
  • Notes about the initial basis resulting from a CRASH procedure or a BASIS file.
  • The major iteration log.
  • The minor iteration log.
  • Basis factorization statistics.
  • The EXIT condition and some statistics about the solution obtained.
  • The printed solution, if requested.

The last five items are described in the following sections.

The major iteration log

If Major print level > 0, one line of information is output to the PRINT file every kth minor iteration, where k is the specified Print frequency (default k = 1).

Label Description
Itns The cumulative number of minor iterations.
Major The current major iteration number.
Minors is the number of iterations required by both the feasibility and optimality phases of the QP subproblem.

Generally, Minors will be 1 in the later iterations, since theoretical analysis predicts that the correct active set will be identified near the solution (see §8.2).

Step The step length a taken along the current search direction p. The variables x have just been changed to x + ap. On reasonably well-behaved problems, the unit step will be taken as the solution is approached.
nCon The number of times user subroutines have been called to evaluate the nonlinear problem functions.

Evaluations needed for the estimation of the derivatives by finite differences are not included. nCon is printed as a guide to the amount of work required for the line search.

Feasible is the value of rowerr, the maximum component of the scaled nonlinear constraint residual (55). The solution is regarded as acceptably feasible if Feasible is less than the Major feasibility tolerance. In this case, the entry is contained in parenthesis.

If the constraints are linear, all iterates are feasible and this entry is not printed.

Optimal is the value of maxgap, the maximum complementarity gap (56). It is an estimate of the degree of nonoptimality of the reduced costs. Both Feasbl and Optimal are small in the neighborhood of a solution.
MeritFunction is the value of the augmented Lagrangian merit function (see (53)). This function will decrease at each iteration unless it was necessary to increase the penalty parameters (see §8.2). As the solution is approached, Merit will converge to the value of the objective at the solution.

In elastic mode, the merit function is a composite function involving the constraint violations weighted by the elastic weight.

If the constraints are linear, this item is labeled Objective, the value of the objective function. It will decrease monotonically to its optimal value.

L+U The number of nonzeros representing the basis factors L and U on completion of the QP subproblem.

If nonlinear constraints are present, the basis factorization B = LU is computed at the start of the first minor iteration. At this stage, LU = lenL + lenU, where lenL, the number of subdiagonal elements in the columns of a lower triangular matrix and lenU is the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix.

As columns of B are replaced during the minor iterations, LU may fluctuate up or down but in general will tend to increase. As the solution is approached and the minor iterations decrease towards zero, LU will reflect the number of nonzeros in the LU factors at the start of the QP subproblem.

If the constraints are linear, refactorization is subject only to the Factorize frequency, and LU will tend to increase between factorizations.

BSwap The number of columns of the basis matrix B that were swapped with columns of S to improve the condition of B. The swaps are determined by an LU factorization of the rectangular matrix BS = ( B S )T with stability being favored more than sparsity.
nS The current number of superbasic variables.
CondHz An estimate of the condition number of RTR, an estimate of Z TH Z , the reduced Hessian of the La- grangian. It is the square of the ratio of the largest and smallest diagonals of the upper triangular matrix R (which is a lower bound on the condition number of RT R). Cond Hz gives a rough indica- tion of whether or not the optimization procedure is having difficulty. If E is the relative precision of the machine being used, the SQP algorithm will make slow progress if Cond Hz becomes as large as ε-1/2 ≈ 108 , and will probably fail to find a better solution if Cond Hz reaches ε-3/4 ≈ 1012 .

To guard against high values of Cond Hz, attention should be given to the scaling of the variables and the constraints. In some cases it may be necessary to add upper or lower bounds to certain variables to keep them a reasonable distance from singularities in the nonlinear functions or their derivatives.

Penalty is the Euclidean norm of the vector of penalty parameters used in the augmented Lagrangian merit function (not printed if there are no nonlinear constraints.

The summary line may include additional code characters that indicate what happened during the course of the major iteration.

Code Meaning
c Central differences have been used to compute the unknown components of the objective and constraint gradients. A switch to central differences is made if either the line search gives a small step, or x is close to being optimal. In some cases, it may be necessary to re-solve the QP subproblem with the central-difference gradient and Jacobian.
d During the line search it was necessary to decrease the step in order to obtain a maximum constraint violation conforming to the value of Violation limit.
l The norm-wise change in the variables was limited by the value of the Major step limit. If this output occurs repeatedly during later iterations, it may be worthwhile increasing the value of Major step limit.
i If SNOPT is not in elastic mode, an "i" signifies that the QP subproblem is infeasible. This event triggers the start of nonlinear elastic mode, which remains in effect for all subsequent iterations. Once in elastic mode, the QP subproblems are associated with the elastic problem NP(γ).

If SNOPT is already in elastic mode, an "i" indicates that the minimizer of the elastic subproblem does not satisfy the linearized constraints. (In this case, a feasible point for the usual QP subproblem may or may not exist.)

M An extra evaluation of the problem functions was needed to define an acceptable positive-definite quasi- Newton update to the Lagrangian Hessian. This modification is only done when there are nonlinear constraints.
m This is the same as "M" except that it was also necessary to modify the update to include an augmented Lagrangian term.
n No positive-definite BFGS update could be found. The approximate Hessian is unchanged from the previous iteration.
R The approximate Hessian has been reset by discarding all but the diagonal elements. This reset will be forced periodically by the Hessian frequency and Hessian updates keywords. However, it may also be necessary to reset an ill-conditioned Hessian from time to time.
r The approximate Hessian was reset after ten consecutive major iterations in which no BFGS update could be made. The diagonals of the approximate Hessian are retained if at least one update has been done since the last reset. Otherwise, the approximate Hessian is reset to the identity matrix.
s A self-scaled BFGS update was performed. This update is always used when the Hessian approximation is diagonal, and hence always follows a Hessian reset.
t The minor iterations were terminated because of the Minor iterations limit.
T The minor iterations were terminated because of the New superbasics limit.
u The QP subproblem was unbounded.
w A weak solution of the QP subproblem was found.
z The Superbasics limit was reached.

The minor iteration log

If Minor print level > 0, one line of information is output to the PRINT file every kth minor iteration, where k is the specified Minor print frequency (default k = 1). A heading is printed before the first such line following a basis factorization. The heading contains the items described below. In this description, a PRICE operation is defined to be the process by which a nonbasic variable is selected to become superbasic (in addition to those already in the superbasic set). The selected variable is denoted by jq. Variable jq often becomes basic immediately. Otherwise it remains superbasic, unless it reaches its opposite bound and returns to the nonbasic set.

If Partial price is in effect, variable jq is selected from App or Ipp , the ppth segments of the constraint matrix ( A - I ).

otherwise it has become nonbasic.
Label Description
Itn The current iteration number.
RedCost,QPmult This is the reduced cost (or reduced gradient) of the variable jq selected by PRICE at the start of the present iteration. Algebraically, dj is dj = gj - pT aj for j = jq, where gj is the gradient of the current objective function, p is the vector of dual variables for the QP subproblem, and aj is the jth column of ( A - I ).

Note that dj is the 1-norm of the reduced-gradient vector at the start of the iteration, just after the PRICE operation.

LPstep,QPstep The step length a taken along the current search direction p. The variables x have just been changed to x + ap. If a variable is made superbasic during the current iteration (+SBS > 0), Step will be the step to the nearest bound. During Phase 2, the step can be greater than one only if the reduced Hessian is not positive definite.
nInf The number of infeasibilities after the present iteration. This number will not increase unless the iterations are in elastic mode.
SumInf If nInf > 0, this is sInf, the sum of infeasibilities after the present iteration. It usually decreases at each nonzero Step, but if nInf decreases by 2 or more, SumInf may occasionally increase.

In elastic mode, the heading is changed to Composite Obj, and the value printed decreases monotonically.

rgNorm The norm of the reduced-gradient vector at the start of the iteration. (It is the norm of the vector with elements dj for variables j in the superbasic set.) During Phase 2 this norm will be approximately zero after a unit step.

(The heading is not printed if the problem is linear.)

LPobjective,QPobjective,Elastic QPobj The QP objective function after the present iteration. In elastic mode, the heading is changed to Elastic QPobj. In either case, the value printed decreases monotoni- cally.
SBS The variable jq selected by PRICE to be added to the superbasic set.
Pivot If column aq replaces the rth column of the basis B, Pivot is the rth element of a vector y satisfying By = aq . Wherever possible, Step is chosen to avoid extremely small values of Pivot (since they cause the basis to be nearly singular). In rare cases, it may be necessary to increase the Pivot tolerance to exclude very small elements of y from consideration during the computation of Step.
L+U The number of nonzeros representing the basis factors L and U . Immediately after a basis factorization B = LU , this is lenL+lenU, the number of subdiagonal elements in the columns of a lower triangular matrix and the number of diagonal and superdiagonal elements in the rows of an upper-triangular matrix.

Further nonzeros are added to L when various columns of B are later replaced. As columns of B are replaced, the matrix U is maintained explicitly (in sparse form). The value of L will steadily increase, whereas the value of U may fluctuate up or down. Thus, in general, the value of L+U may fluctuate up or down; in general it will tend to increase.)

ncp The number of compressions required to recover storage in the data structure for U . This includes the number of compressions needed during the previous basis factorization. Normally ncp should increase very slowly. If not, the amount of integer and real workspace available to SNOPT should be increased by a significant amount. As a suggestion, the work arrays iw(*) and rw(*) should be extended by L + U elements.
nS The current number of superbasic variables. (The heading is not printed if the problem is linear.)
cond Hz See the major iteration log. (The heading is not printed if the problem is linear.)

Basis factorization statistics

If Major print level >= 10, the following items are output to the PRINT file whenever the basis B or the rectangular matrix BS = ( B S )T is factorized before solution of the next QP subproblem.

Note that BS may be factorized at the start of just some of the major iterations. It is immediately followed by a factorization of B itself.

Gaussian elimination is used to compute a sparse LU factorization of B or BS , where PLPT and PUQ are lower and upper triangular matrices for some permutation matrices P and Q. Stability is ensured as described under LU factor tolerance in SNOPT Optional parameters#Description of the optional parameters.

If Minor print level >= 10, the same items are printed during the QP solution whenever the current B is factorized.

Cmpressns The number of times the data structure holding the partially factored matrix needed to be compressed to recover unused storage. Ideally this number should be zero. If it is more than 3 or 4, the amount of workspace available to SNOPT should be increased for efficiency.
Label Description
Factorize The number of factorizations since the start of the run.
Demand A code giving the reason for the present factorization.
Code Meaning
0 First LU factorization.
1 The number of updates reached the Factorization Frequency.
2 The nonzeros in the updated factors have increased significantly.
7 Not enough storage to update factors.
10 Row residuals too large (see the description of Check Frequency).
11 Ill-conditioning has caused inconsistent results.
Itn The current minor iteration number.
Nonlin The number of nonlinear variables in the current basis B.
Linear The number of linear variables in B.
Slacks The number of slack variables in B.
B BR BS or
BT factorize The type of LU factorization.
B Periodic factorization of the basis B.
BR More careful rank-revealing factorization of B using threshold rook pivoting. This occurs mainly at the start, if the first basis factors seem singular or ill-conditioned. Followed by a normal B factorize.
BS BS is factorized to choose a well-conditioned B from the current ( B S ). Followed by a normal B factorize.
BT Same as BS except the current B is tried first and accepted if it appears to be not much more ill-conditioned than after the previous BS factorize.
m The number of rows in B or BS .
n The number of columns in B or BS . Preceded by "=" or ">" respectively.
Elems The number of nonzero elements in B or BS .
Amax The largest nonzero in B or BS .
Density The percentage nonzero density of B or BS .
Merit The average Markowitz merit count for the elements chosen to be the diagonals of P U Q. Each merit count is defined to be (c - 1)(r - 1) where c and r are the number of nonzeros in the column and row containing the element at the time it is selected to be the next diagonal. Merit is the average of n such quantities. It gives an indication of how much work was required to preserve sparsity during the factorization.
lenL The number of nonzeros in L.
Incres The percentage increase in the number of nonzeros in L and U relative to the number of nonzeros in B or BS .
Utri is the number of triangular rows of B or BS at the top of U .
lenU The number of nonzeros in U .
Ltol The maximum subdiagonal element allowed in L. This is the specified LU factor tolerance or a smaller value that is currently being used for greater stability.
Umax The maximum nonzero element in U .
Ugrwth The ratio Umax/Amax, which ideally should not be substantially larger than 10.0 or 100.0. If it is orders of magnitude larger, it may be advisable to reduce the LU factor tolerance to 5.0, 4.0, 3.0 or 2.0, say (but bigger than 1.0).

As long as Lmax is not large (say 10.0 or less), max{Amax, Umax} / DUmin gives an estimate of the condition number of B. If this is extremely large, the basis is nearly singular. Slacks are used to replace suspect columns of B and the modified basis is refactored.

Ltri is the number of triangular columns of B or BS at the left of L.
dense1 is the number of columns remaining when the density of the basis matrix being factorized reached 0.3.
Lmax The actual maximum subdiagonal element in L (bounded by Ltol).
Akmax The largest nonzero generated at any stage of the LU factorization. (Values much larger than Amax indicate instability.)
growth The ratio Akmax/Amax. Values much larger than 100 (say) indicate instability.
bump is the size of the "bump" or block to be factorized nontrivially after the triangular rows and columns of B or BS have been removed.
dense2 is the number of columns remaining when the density of the basis matrix being factorized reached 0.6. (The Markowitz pivot strategy searches fewer columns at that stage.)
DUmax The largest diagonal of P U Q.
DUmin The smallest diagonal of P U Q.
condU The ratio DUmax/DUmin, which estimates the condition number of U (and of B if Ltol is less than 100, say).

Crash statistics

If Major print level = 10, the following items are output to the PRINT file. They refer to the number of columns that the CRASH procedure selects during several passes through A while searching for a triangular basis matrix.

Label Description
Slacks is the number of slacks selected initially.
Free cols is the number of free columns in the basis, including those whose bounds are rather far apart.
Preferred is the number of "preferred" columns in the basis (i.e., hs(j) = 3 for some j = n). It will be a subset of the columns for which hs(j) = 3 was specified.
Unit is the number of unit columns in the basis.
Double is the number of columns in the basis containing 2 nonzeros.
Triangle is the number of triangular columns in the basis with 3 or more nonzeros.
Pad is the number of slacks used to pad the basis (to make it a nonsingular triangle).

EXIT conditions

When any solver or auxiliary routine in the SNOPT package terminates, a message is printed that summarizes what happened during the run. The general form of the output message is:

SOLVER  EXIT ''e  ''-- exit  condition
SOLVER  INFO ''i ''-- informational message

where e is an integer that labels the particular exit condition, and i is one of several alternative informational messages that elaborate on the exit condition. For example, the solver may print the message:

SNOPTA  EXIT 20 -- the  problem  appears  to  be unbounded
SNOPTA  INFO 21 -- unbounded objective

Note that in this example, the exit condition gives a broad definition of what happened, while the informational message is more specific about the cause of the termination.

The number i associated with the informational message is the output value of the argument inform. Note that the number e associated with the exit condition may always be recovered from inform by stripping off the least significant decimal digit.

The list of possible exit conditions are:

0 Finished successfully
10 The problem appears to be infeasible
20 The problem appears to be unbounded
30 Resource limit error
40 Terminated after numerical difficulties
50 Error in the user-supplied functions
60 Undefined user-supplied functions
70 User requested termination
80 Insufficient storage allocated
90 Input arguments out of range
100 Finished successfully (associated with SNOPT auxiliary routines)
110 Errors while processing MPS data
120 Errors while estimating Jacobian structure
130 Errors while reading OPTIONS file
140 System error

The exit conditions 0-20 arise when a solution exists (though it may not be optimal).

Here we describe each message and suggest possible courses of action.

EXIT --  0   Finished successfully
INFO --  1   optimality  conditions satisfied
INFO --  2   feasible point found (from option Feasible point only)
INFO --  3   requested  accuracy could  not  be achieved

This message should be the cause of guarded optimism! It is certainly preferable to every other message, and we naturally want to believe what it says.

In all cases, a distinct level of caution is in order. For example, if the objective value is much better than expected, we may have obtained an optimal solution to the wrong problem! Almost any item of data could have that effect if it has the wrong value. Verifying that the problem has been defined correctly is one of the more difficult tasks for a model builder. It is good practice in the function subroutines to print any data that is input during the first entry.

If nonlinearities exist, one must always ask the question: could there be more than one local optimum? When the constraints are linear and the objective is known to be convex (e.g., a sum of squares) then all will be well if we are minimizing the objective: a local minimum is a global minimum in the sense that no other point has a lower function value. (However, many points could have the same objective value, particularly if the objective is largely linear.) Conversely, if we are maximizing a convex function, a local maximum cannot be expected to be global, unless there are sufficient constraints to confine the feasible region.

Similar statements could be made about nonlinear constraints defining convex or concave regions. However, the functions of a problem are more likely to be neither convex nor concave. Our advice is always to specify a starting point that is as good an estimate as possible, and to include reasonable upper and lower bounds on all variables, in order to confine the solution to the specific region of interest. We expect modelers to know something about their problem, and to make use of that knowledge as they themselves know best.

One other caution about "Optimality conditions satisfied". Some of the variables or slacks may lie outside their bounds more than desired, especially if scaling was requested. Some information concerning the run can be obtained from the short summary given at the end of the print and summary files. Here is an example.

SNOPTA  EXIT    0 -- finished successfully
SNOPTA  INFO    1 -- optimality  conditions satisfied,

Problem name                 Toy1
No. of iterations                   7   Objective value     -1.0000000008E+00
No. of major iterations             7   Linear objective     0.0000000000E+00
Penalty parameter           3.253E-02   Nonlinear objective -1.0000000008E+00
No. of calls to funobj              9   No. of calls to funcon              9
No. of degenerate steps             0   Percentage                       0.00
Max x                       2 1.0E+00   Max pi                      1 1.2E-01
Max Primal infeas           0 0.0E+00   Max Dual infeas             2 8.0E-10
Nonlinear constraint violn    6.4E-09

Max Primal infeas refers to the largest bound infeasibility and which variable is involved. If it is too large, consider restarting with a smaller Minor feasibility tolerance (say 10 times smaller) and perhaps Scale option 0.

Similarly, Max Dual infeas indicates which variable is most likely to be at a non-optimal value. Broadly speaking, if

then the objective function would probably change in the dth significant digit if optimization could be continued. If d seems too large, consider restarting with a smaller Major optimality tolerance.

Finally, Nonlinear constraint violn shows the maximum infeasibility for nonlinear rows. If it seems too large, consider restarting with a smaller Major feasibility tolerance.

If the requested accuracy could not be achieved, a feasible solution has been found, but the requested accuracy in the dual infeasibilities could not be achieved. An abnormal termination has occurred, but SNOPT is within 10-2 of satisfying the Major optimality tolerance. Check that the Major optimality tolerance is not too small.


EXIT -- 10   The problem  appears  to  be infeasible
INFO -- 11   infeasible linear constraints
INFO -- 12   infeasible linear equalities
INFO -- 13   nonlinear infeasibilities minimized
INFO -- 14   infeasibilities minimized

This exit occurs if SNOPT unable to find a point that satisfies the constraints. When the constraints are linear, these message can probably be trusted. Feasibility is measured with respect to the upper and lower bounds on the variables and slacks. Among all the points satisfying the general constraints Ax - s = 0, there is apparently no point that satisfies the bounds on x and s. Violations as small as the Minor feasibility tolerance are ignored, but at least one component of x or s violates a bound by more than the tolerance.

When nonlinear constraints are present, infeasibility is much harder to recognize correctly. Even if a feasible solution exists, the current linearization of the constraints may not contain a feasible point. In an attempt to deal with this situation, when solving each QP subproblem, SNOPT is prepared to relax the bounds on the slacks associated with nonlinear rows.

If a QP subproblem proves to be infeasible or unbounded (or if the Lagrange multiplier estimates for the nonlinear constraints become large), SNOPT enters so-called "nonlinear elastic" mode. The subproblem includes the original QP objective and the sum of the infeasibilities-suitably weighted using the Elastic weight parameter. In elastic mode, some of the bounds on the nonlinear rows "elastic"-i.e., they are allowed to violate their specified bounds. Variables subject to elastic bounds are known as elastic variables. An elastic variable is free to violate one or both of its original upper or lower bounds. If the original problem has a feasible solution and the elastic weight is sufficiently large, a feasible point eventually will be obtained for the perturbed constraints, and optimization can continue on the subproblem. If the nonlinear problem has no feasible solution, SNOPT will tend to determine a "good" infeasible point if the elastic weight is sufficiently large. (If the elastic weight were infinite, SNOPT would locally minimize the nonlinear constraint violations subject to the linear constraints and bounds.)

Unfortunately, even though SNOPT locally minimizes the nonlinear constraint violations, there may still exist other regions in which the nonlinear constraints are satisfied. Wherever possible, nonlinear constraints should be defined in such a way that feasible points are known to exist when the constraints are linearized.

EXIT -- 20	The problem  appears  to  be unbounded
INFO -- 21	unbounded objective
INFO -- 22	constraint violation limit reached

For linear problems, unboundedness is detected by the simplex method when a nonbasic variable can be increased or decreased by an arbitrary amount without causing a basic variable to violate a bound. A message prior to the EXIT message will give the index of the nonbasic variable. Consider adding an upper or lower bound to the variable. Also, examine the constraints that have nonzeros in the associated column, to see if they have been formulated as intended.

Very rarely, the scaling of the problem could be so poor that numerical error will give an erroneous indication of unboundedness. Consider using the Scale option.

For nonlinear problems, SNOPT monitors both the size of the current objective function and the size of the change in the variables at each step. If either of these is very large (as judged by the Unbounded parameters-see #Description of the optional parameters), the problem is terminated and declared unbounded. To avoid large function values, it may be necessary to impose bounds on some of the variables in order to keep them away from singularities in the nonlinear functions.

The second informational message indicates an abnormal termination while enforcing the limit on the constraint violations. This exit implies that the objective is not bounded below in the feasible region defined by expanding the bounds by the value of the Violation limit.

EXIT -- 30   Resource limit  error
INFO -- 31   iteration limit reached
INFO -- 32   major  iteration limit reached
INFO -- 33   the  superbasics limit is too  small

Either the Iterations limit or the Major iterations limit was exceeded before the required solution could be found. Check the iteration log to be sure that progress was being made. If so, restart the run using WarmDefSOL at the end of the run.

If the superbasics limit is too small, then the problem appears to be more nonlinear than anticipated. The current set of basic and superbasic variables have been optimized as much as possible and a PRICE operation is necessary to continue, but there are already Superbasics limit superbasics (and no room for any more).

EXIT -- 40	Terminated  after  numerical difficulties
INFO -- 41	current point cannot  be improved
INFO -- 42	singular  basis
INFO -- 43	cannot  satisfy the  general  constraints
INFO -- 44	ill-conditioned null-space basis

Several circumstances may lead to SNOPT not being able to improve on a non-optimal point.

  1. Subroutines could be returning accurate function values but inaccurate gradients (or vice versa). This is the most likely cause. Study the comments given for INFO 51 and 52, and do your best to ensure that the coding is correct.
  2. The function and gradient values could be consistent, but their precision could be too low. For example, accidental use of a real data type when double precision was intended would lead to a relative function precision of about 10-6 instead of something like 10-15. The default Major optimality tolerance of 10-6 would need to be raised to about 10-3 for optimality to be declared (at a rather suboptimal point). Of course, it is better to revise the function coding to obtain as much precision as economically possible.
  3. If function values are obtained from an expensive iterative process, they may be accurate to rather few significant figures, and gradients will probably not be available. One should specify
Function precision t
Major optimality tolerance

but even then, if t is as large as 10-5 or 10-6 (only 5 or 6 significant figures), the same exit condition may occur. At present the only remedy is to increase the accuracy of the function calculation.

Termination because of a singular basis is highly unlikely to occur. The first factorization attempt will have found the basis to be structurally or numerically singular. (Some diagonals of the triangular matrix U were respectively zero or smaller than a certain tolerance.) The associated variables are replaced by slacks and the modified basis is refactorized, but singularity persists. This must mean that the problem is badly scaled, or the LU factor tolerance is too much larger than 1.0.

If the general constraints cannot be satisfied, an LU factorization of the basis has just been obtained and used to recompute the basic variables xB , given the present values of the superbasic and nonbasic variables. A step of "iterative refinement" has also been applied to increase the accuracy of xB . However, a row check has revealed that the resulting solution does not satisfy the current constraints Ax - s = 0 sufficiently well.

This probably means that the current basis is very ill-conditioned. If there are some linear constraints and variables, try Scale option 1 if scaling has not yet been used.

For certain highly structured basis matrices (notably those with band structure), a systematic growth may occur in the factor U . Consult the description of Umax, Umin and Growth in #Basis factorization statistics, and set the LU factor tolerance to 2.0 (or possibly even smaller, but not less than 1.0).

EXIT -- 50   Error in the  user-supplied functions
INFO -- 51   incorrect objective derivatives
INFO -- 52   incorrect constraint derivatives

This exit implies that there may be errors in the subroutines that define the problem objective and constraints. If the objective derivatives appear to incorrect, a check has been made on some individual elements of the objective gradient array at the first point that satisfies the linear constraints. At least one component (G(k) or gObj(j) ) is being set to a value that disagrees markedly with its associated forward-difference estimate . (The relative difference between the computed and estimated values is 1.0 or more.) This exit is a safeguard, since SNOPT will usually fail to make progress when the computed gradients are seriously inaccurate. In the process it may expend considerable effort before terminating with INFO 41 above.

Check the function and gradient computation very carefully. A simple omission (such as forgetting to divide f0 by 2) could explain everything. If f0 or a component is very large, then give serious thought to scaling the function or the nonlinear variables.

If you feel certain that the computed gObj(j) is correct (and that the forward-difference estimate is therefore wrong), you can specify Verify level 0 to prevent individual elements from being checked. However, the opti- mization procedure may have difficulty.

If some constraint derivatives appear to be incorrect, then at least one of the computed constraint derivatives is significantly different from an estimate obtained by forward-differencing the vector F (x). Follow the advice given above for the objective function, trying to ensure that the arrays F and G are being set correctly.

EXIT -- 60	Undefined  user-supplied functions
INFO -- 61	undefined  function at  the  first feasible point
INFO -- 62	undefined  function at  the  initial point
INFO -- 63	unable  to  proceed  into undefined  region
EXIT -- 70	User requested  termination
INFO -- 71	terminated during function evaluation 
INFO -- 72	terminated during constraint  evaluation 
INFO -- 73	terminated during objective evaluation 
INFO -- 74	terminated from  monitor  routine

These exits occur when Status < -1 is set during some call to the user-defined routines. SNOPT assumes that you want the problem to be abandoned forthwith.

If the following exits occur during the first basis factorization, the primal and dual variables x and pi will have their original input values.

EXIT -- 80	Insufficient storage  allocated
INFO -- 81	work arrays   must have at  least 500 elements
INFO -- 82	not  enough character storage 
INFO -- 83	not  enough integer  storage 
INFO -- 84	not  enough real  storage

SNOPT cannot start to solve a problem unless the char, int and real work arrays are at least 500 elements.

If the main character, integer or real storage arrays cw(*), iw(*) and rw(*) are not large enough for the current problem, the routine declaring cw(*), iw and rw should be recompiled with a larger dimensions for those arrays. The new values should also be assigned to lencw, leniw and lenrw. An estimate of the additional storage required is given in messages preceding the exit.

If rw(*) is not large enough, be sure that the Hessian dimension is not unreasonably large.

EXIT -- 90	Input arguments out  of  range
INFO -- 91	invalid input argument
EXIT -- 140	System error
INFO -- 141	wrong number of  basic  variables

Solution output

At the end of a run, the final solution is output to the PRINT file in accordance with the Solution keyword. Some header information appears first to identify the problem and the final state of the optimization procedure. A ROWS section and a COLUMNS section then follow, giving one line of information for each row and column. The format used is similar to certain commercial systems, though there is no industry standard.

An example of the printed solution is given in #File Output. In general, numerical values are output with format f16.5.

The maximum record length is 111 characters, including the first (carriage-control) character.

To reduce clutter, a dot "." is printed for any numerical value that is exactly zero. The values ±1 are also printed specially as 1.0 and -1.0. Infinite bounds (±1020 or larger) are printed as None.

Note : If two problems are the same except that one minimizes an objective f0 (x) and the other maximizes -f0 (x), their solutions will be the same but the signs of the dual variables πi and the reduced gradients dj will be reversed.

The ROWS section

General linear constraints take the form l = Ax = u. The ith constraint is therefore of the form

and the value of aTx is called the row activity. Internally, the linear constraints take the form Ax - s = 0, where the slack variables s should satisfy the bounds . For the ith "row", it is the slack variable si that is directly available, and it is sometimes convenient to refer to its state. Slacks may be basic or nonbasic (but not superbasic).

Nonlinear constraints a = fi(x) + aTx <= β are treated similarly, except that the row activity and degree of infeasibility are computed directly from fi (x) + aTx rather than si .

Label Description
Number The value n + i. This is the internal number used to refer to the ith slack in the iteration log.
Row The name of the ith row.
State The state of the ith row relative to the bounds α and β. The various states possible are as follows.
LL The row is at its lower limit, a. UL The row is at its upper limit, ß.
EQ The limits are the same (a = ß).
BS The constraint is not binding. si is basic.

A key is sometimes printed before the State to give some additional information about the state of the slack variable.

A Alternative optimum possible. The slack is nonbasic, but its reduced gradient is essentially zero. This means that if the slack were allowed to start moving from its current value, there would be no change in the objective function. The values of the basic and superbasic variables might change, giving a genuine alternative solution. The values of the dual variables might also change.
D Degenerate. The slack is basic, but it is equal to (or very close to) one of its bounds.
I Infeasible. The slack is basic and is currently violating one of its bounds by more than the Feasibility tolerance.
N Not precisely optimal. The slack is nonbasic. Its reduced gradient is larger than the Major optimality tolerance.

Note: If Scale option > 0, the tests for assigning A, D, I, N are made on the scaled problem because the keys are then more likely to be meaningful.

Activity The row value aTx (or fi (x) + aTx for nonlinear rows).
Slack activity The amount by which the row differs from its nearest bound. (For free rows, it is taken to be minus the Activity.)
Lower limit α, the lower bound on the row.
Upper limit β, the upper bound on the row.
Dual activity The value of the dual variable pi , often called the shadow price (or simplex multiplier) for the ith constraint. The full vector p always satisfies BTπ = gB , where B is the current basis matrix and gB contains the associated gradients for the current objective function.
I The constraint number, i.

The COLUMNS section

Here we talk about the "column variables" xj , j = 1 : n. We assume that a typical variable has bounds a = xj = β.

Obj Gradient||gj , the jth component of the gradient of the (linear or nonlinear) objective function. (If any xj is infeasible, gj is the gradient of the sum of infeasibilities.)
Label Description
Number The column number, j. This is the internal number used to refer to xj in the iteration log.
Column The name of xj .
State The state of xj relative to the bounds α and β. The various states possible are as follows.
LL xj is nonbasic at its lower limit, α.
UL xj is nonbasic at its upper limit, β.
EQ xj is nonbasic and fixed at the value α = β.
FR xj is nonbasic at some value strictly between its bounds: a < xj < β.
BS xj is basic. Usually α < xj < β.
SBS xj is superbasic. Usually α < xj < β.

A key is sometimes printed before the State to give some additional information about the state of xj .

A Alternative optimum possible. The variable is nonbasic, but its reduced gradient is essentially zero.

This means that if xj were allowed to start moving from its current value, there would be no change in the objective function. The values of the basic and superbasic variables might change, giving a genuine alternative solution. The values of the dual variables might also change.

D Degenerate. xj is basic, but it is equal to (or very close to) one of its bounds.
I Infeasible. xj is basic and is currently violating one of its bounds by more than the Feasibility tolerance.
N Not precisely optimal. xj is nonbasic. Its reduced gradient is larger than the Major optimality tolerance .

Note: If Scale option > 0, the tests for assigning A, D, I, N are made on the scaled problem because the keys are then more likely to be meaningful.

Activity The value of the variable xj .
Lower limit α, the lower bound on xj .
Upper limit β, the upper bound on xj .
Reduced gradnt The reduced gradient dj = gj - pTaj , where aj is the jth column of the constraint matrix (or the jth column of the Jacobian at the start of the final major iteration).
M+J The value m + j.

The SUMMARY file

If Summary file > 0, the following information is output to the SUMMARY file. (It is a brief form of the PRINT file.) All output lines are less than 72 characters.

  • The Begin line from the SPECS file, if any.
  • The basis file loaded, if any.
  • A brief Major iteration log.
  • A brief Minor iteration log.
  • The EXIT condition and a summary of the final solution.

The following SUMMARY file is from the example, using Major print level 1 and Minor print level 0.

 ==============================
 S N O P T  7.1-1(2) (Jun 2004)
 ==============================

 SNSPEC EXIT 100 -- finished successfully
 SNSPEC INFO 101 -- OPTIONS file read



 Nonlinear constraints       2     Linear constraints       0
 Nonlinear variables         2     Linear variables         0
 Jacobian  variables         2     Objective variables      2
 Total constraints           2     Total variables          2




 This is problem  Toy1
 The user has defined       6   out of       6   first  derivatives


 Major Minors     Step   nCon Feasible  Optimal  MeritFunction    nS Penalty
     0      2               1  4.1E-01  5.0E-01  1.0000000E+00     2           r
     1      2  1.0E+00      2 (0.0E+00) 3.1E-01 -4.1421356E-01     1         n rl
     2      1  1.0E+00      3  1.4E+00  1.5E-01 -9.3802987E-01     1         s
     3      1  1.0E+00      4  1.8E-01  3.3E-02 -9.6547072E-01     1 2.8E-03
     4      1  1.0E+00      5  3.4E-02  8.9E-03 -9.9129962E-01       2.8E-03
     5      0  1.0E+00      6  4.2E-02  4.8E-03 -1.0000531E+00       2.8E-03
     6      0  1.0E+00      7  1.9E-04  2.0E-05 -9.9999997E-01       3.3E-02
     7      0  1.0E+00      8 (3.7E-09)(4.0E-10)-1.0000000E+00       3.3E-02

 SNOPTA EXIT   0 -- finished successfully
 SNOPTA INFO   1 -- optimality conditions satisfied

 Problem name                 Toy1
 No. of iterations                   7   Objective value     -1.0000000008E+00
 No. of major iterations             7   Linear objective     0.0000000000E+00
 Penalty parameter           3.253E-02   Nonlinear objective -1.0000000008E+00
 No. of calls to funobj              9   No. of calls to funcon              9
 No. of degenerate steps             0   Percentage                       0.00
 Max x                       2 1.0E+00   Max pi                      1 1.2E-01
 Max Primal infeas           0 0.0E+00   Max Dual infeas             2 8.0E-10
 Nonlinear constraint violn    6.4E-09



 Solution printed on file  15

 Finished problem Toy1

 Time for MPS input                           0.00 seconds
 Time for solving problem                     0.00 seconds
 Time for solution output                     0.00 seconds
 Time for constraint functions                0.00 seconds
 Time for objective function                  0.00 seconds

 snOptA finished.
 INFO  = 1
 nInf  = 0
 sInf  =  0.
 Obj   = -1.