Model definition with the CONOPT Subroutine Library

The user of the CONOPT Subroutine Library must define the model via a set of subroutines. The following short description is intended to give you an impression of the complexity of building models for the CONOPT Subroutine Library. You should compare this with the work involved in developing and debugging a model via a modeling system.

At model setup time, the model defining subroutines asks for detailed information about the model. This information includes:

Several statistics describing the size of the model, Information on initial values and bounds for all variables, Right hand sides and types of all constraints, The pattern of the nonzero elements of Jacobian matrix defined in a particular sparse format (sorted by column), A classification of each Jacobian element as either constant or variable and numerical values of the constant elements, Optional pattern of the Hessian of the Lagrangian defined in sparse format, and Optional basis information, initial function values, and derivative values. During the optimization, CONOPT asks for numerical values of the nonlinear functions and their derivatives by calling some user supplied routines. The modeler must code both the nonlinear expressions and their derivatives; there is no option for numerical derivatives. The nonlinear functions must be smooth to a high accuracy and their derivatives must be consistent with the function values to a high accuracy. If these requirements are not satisfied CONOPT may converge slowly or it may not converge at all. Models in which the nonlinear functions are based on solving sets of nonlinear equations or partial differential equations must therefore solve these sub-models to a very high accuracy. Models with interpolations between table lookups must combine these inherently non-smooth functions with some kind of smoothing such as splines. Derivatives computed from numerical differences are often not accurate enough, especially if there is some noise in the function values.

Optional user supplied subroutine allow the modeler to specify 2nd derivatives, either as the sparse Hessian of the Lagrangian (the matrix H), and/or as the directional 2nd derivative (the matrix-vector product H*v). CONOPT is only efficient on large models with many degrees of freedom if at least one of these optional routines is supplied by the modeler.

Other optional subroutines allow the modeler to control tolerances and algorithmic features, to display tailored progress information and tailored solution reports, and to stop based on user interrupts.

You should not attempt to use the CONOPT Subroutine Library unless you have some familiarity with sparse matrices, in particular packing formats for sparse matrices. You should also have smooth functions and you should be able to derive the analytic form for the necessary derivatives. For larger models you should be able to derive and code the 2nd derivatives.