On entry

Start

is a character string that specifies how a starting basis (and  certain other items) are to be obtained.

'Cold'

requests that the CRASH procedure be used to choose an initial basis, unless a basis file is provided via OLD BASIS, INSERT or LOAD in the Specs file.

'Basis file'

is the same as start = 'Cold' but is more meaningful when a basis file is given.

'Warm'

means that a basis is already defined in hs (probably from an earlier call).

m

is m, the number of general constraints (m > 0). This is the number of rows in the full constraint matrix in Eqn(3.2).
Note that A must have at least one row
.  If your problem has no constraints, or only upper and lower bounds on the variables, then you must include a dummy row with sufficiently wide upper and lower bounds.
See the discussion of the parameters aha and ka below.

n

is n, the number of variables, excluding slacks (n > 0).   This is the number of columns in A.

ne

is the number of nonzero entries in A  (including the Jacobian for any nonlinear constraints) (ne > 0).

nName

is the number of column and row names provided in the character array Names.  If nName = 1, there are no  names.  Generic names will be used in the printed solution.  Otherwise, nName = n+m  and all names must be provided.

nnCon

is m1, the number of nonlinear constraints (nnCon  0).

nnObj

is n1', the number of nonlinear objective variables (nnObj 0).

nnJac

is n1" the number of nonlinear Jacobian variables.  If nnCon = 0, nnJac = 0.   If nnCon > 0, nnJac > 0.

iObj

says which row of A is a free row containing a linear objective vector c.  If there is no such vector, iObj = 0.  Otherwise, this row must come after any nonlinear rows, so that nnCon < iObj  m.

ObjAdd

is a constant that will be added to the objective for printing purposes.  Typically ObjAdd = 0.0d+0.

Prob

is an 8-character name for the problem. Prob is used in the printed solution and in some routines that output BASIS files.  A blank name may be used.

funcon

is the name of a subroutine that calculates the vector of nonlinear constraint functions F(x) and (optionally) its Jacobian for a specified vector x (the first nnJac elements of x(*) ).   funcon must be declared external in the routine that calls snopt.  For a detailed description of funcon, see Subroutine funcon.

funobj

is the name of a subroutine that calculates the objective function f(x) and (optionally) its gradient for a specified vector (the first nnObj elements of x(*) ).  funobj must be declared external in the routine that calls snopt.  For a detailed description of funobj , see Subroutine funobj.

a(ne), ha(ne), ka(n+1)

define the nonzero elements of the constraint matrix A in Eqn(3.2), including the Jacobian matrix associated with nonlinear constraints.  The nonzeros are stored column-wise.  A pair of values (a(k), ha(k)) contains a matrix element and its corresponding row index, and the array ka(*) is a set of pointers to the beginning of each column of  within a(*) and ha(*).  Thus for j = 1:n, the entries of column   are held in a(k:l) and their corresponding row indices are in ha(k:l), where k =  ka(j) and  l = ka(j+1) - 1,

Note: Every element of  a(*) must be assigned a value in the calling program.

In general, elements in the nonlinear part of a(*) (see the notes below) may be any dummy value (e.g., zero) because they are initialized at the first point that is feasible with respect to the linear constraints.

If Derivative level = 2 or 3, the nonlinear part of a(*) may be used to define any constant Jacobian elements.  If funcon does not define all entries of gCon(*), the missing values will be obtained from a (*).

    1. It is essential that ka(1) = 1 and ka(n +1) =  ne +1.

    2. The Jacobian J(x) forms the top left corner of a and ha (see Identifying structure in the objective and constraints).  If a Jacobian column j (1 j nnJac) contains any entries a(k),  ha(k) associated with nonlinear constraints (1 ha(k) nnCon), those entries must come before any entries belonging to linear constraints.

    3. The row indices ha(k) for a column may be in any order, subject to Jacobian entries appearing first.  Subroutine funcon must define the Jacobian entries in the same order.

    4.  If your problem has no constraints, or just bounds on the variables, you may include a dummy "free'' row with a single (zero) element by setting a(1) = 0.0, ha(1) = 1, ka(1) = 1, and ka(j) = 2 for j = 2: n +1.  This row is made "free'' by setting its bounds to be  bl(n+1) = - bigbnd and bu(n+1) = bigbnd ,  where bigbnd is typically 1.0e+20 (see bl(n+m)).

bl(n+m)

contains the lower bounds on the variables and slacks (x, s).

The first n entries of bl, bu, hs and xs refer to the variables x.  The last m entries refer to the slacks s.

To specify a non-existent lower bound (lj = –), set bl(j) - bigbnd, where bigbnd is the Infinite Bound , whose default value is 1020.  To fix the jth variable (say xjb, where |b| < bigbnd), set bl(j) = bu(j) = b.

To make the ith constraint an equality constraint (say si  b, where |b| < bigbnd), set bl(n + i) = bu(n + i) = b.

bu(n+m)

contains the upper bounds on  (x, s).  To specify a non-existent upper bound (uj  = –), set bu(j bigbnd.  For the data to be meaningful, it is required that bl(j) bu(j) for all j.

Names(nName)

sometimes contains 8-character names for the variables and constraints.  If nName = 1, Names is not used.  The printed solution will use generic names for the columns and row.  If nName = n+m, Names(j) should contain the 8-character name of the jth variable (j = 1: n+m).  If j = n+i,  the jth variable is the i row.

hs(n+m)

sometimes contains a set of initial states for each variable x, or for each variable and slack (x, s).  See the following discussion of xs.

xs(n+m)

sometimes contains a set of initial values for x or (x, s).

1.

If start = 'Cold' or 'Basis file', and a BASIS file of some sort is to be input (an OLDBASIS file, INSERT file or LOAD file), then hs and xs need not be set at all.

2.

Otherwise, hs(1:n) and xs(1:n) must be defined for a Cold start.  If nothing special is known about the problem, or if there is no wish to provide special information, you may set hs(j) =  0, xs(j) = 0.0 for all j =1: n.  All variables will be eligible for the initial basis.
Less trivially, to say that the optimal value of variable j will probably be equal to one of its bounds, set hs(j) = 4 and xs(j) = bl(j) or hs(j) = 5 and xs(j) = bu(j) as appropriate. 

3.

For Cold starts with no basis file, a CRASH procedure is used to select an initial basis.  The initial basis matrix will be triangular (ignoring certain small entries in each column).  The values hs(j) = 0, 1, 2, 3, 4, 5 have the following meaning: 

hs(j)

State of variable j during CRASH

{0, 1, 3}

Eligible for the basis. 3 is given preference 

{2, 4, 5}

Ignored

After CRASH, columns for which hs(j)  = 2 are made superbasic.  Other entries not selected for the basis are made nonbasic at the value xs(j) if bl(j) xs(j) bu(j), or at the value bl(j) or bu(j) closest to xs(j).  See the description of hs below (on exit).

4.

For Warm starts, all of hs(1:n+m) must be 0, 1, 2 or 3 (probably from some previous call) and all of xs(1:n+m) must have values.

pi

contains an estimate of l, the vector of Lagrange multipliers (shadow prices) for the nonlinear constraints.  The first nnCon components must be defined.  If nothing is known about l, set pi(i) = 0.0, i = 1:nnCon.

nS

need not be specified for Cold starts, but should retain its value from a previous call when a Warm start is used.

cu(lencu), iu(leniu), ru(lenru)

are 8-character, integer and real arrays of user work-space.  They may be used to pass data or workspace to your function routines funcon and funobj (which have the same parameters).  They are not touched by snopt.

If the function routines don't reference these parameters, you may use any arrays of the appropriate type, such as cw, iw, rw (see next paragraph).   Alternatively, you should use the latter arrays if funcon and funobj need to access snopt's workspace.

cw(lencw), iw(leniw), rw(lenrw)

are 8-character, integer and real arrays of work-space for snopt.  lencw, leniw, lenrw must all be at least 500.   In general, lencw=500 is appropriate but leniw and lenrw should be as large as possible because it is uncertain how much storage will be needed for the
basis factors.  As an estimate, leniw should be about 100(m+n) or larger, and lenrw should be about 200(m+n) or larger.

Appropriate values may be obtained from a preliminary run with lencw = leniw  = lenrw =500.  If Print level is positive, the required amounts of workspace are printed before snopt terminates with inform=42, 43 or 44.  The values are returned in mincw, miniw and minrw.