Initializing help system before first use

loadprob

loadprob


Purpose
Produce a matrix representation of the current problem.
Synopsis
int loadprob(XPRMcontext ctx, void *nlctx, XPRMnlpdata *nlpd, int options, XPRMlinctr obj, XPRMnlctr nlobj, XPRMmpvar *extra, int (*preproc)(XPRMcontext ctx, void *lctx, XPRMmatrix *m), void *lctx);
Arguments
ctx 
Mosel's execution context
nlctx 
mmnl execution context
nlpd 
Reference pointer where the matrix information will be returned (must be initialized with NULL)
options 
Bit encoded options:
NLOPT_VERBOSE 
display a message if the problem is found infeasible
NLOPT_SPRSOBJ 
the objective is encoded in sparse format
NLOPT_FULLJAC 
allocate full Jacobian (otherwise only the linear part)
NLOPT_COLWJAC 
Jacobian represented columnwise
NLOPT_CTRBNDS 
bounds represented by constraints
NLOPT_RAWBNDS 
do not default lower bounds to 0
NLOPT_QUADLIN 
generate Jacobian for linear part of quadratic constraints
NLOPT_NAMES 
generate names for nonlinear constraints
obj 
Linear objective (or NULL)
nlobj 
Nonlinear objective (or NULL)
extra 
Array of decision variables to be added to the matrix even if they do not appear in any constraint. The last reference of the array must be NULL. This parameter may be NULL.
preproc 
reserved for future use
lctx 
reserved for future use
Return value
0 if successful, XPRM_PBINF if the problem was found infeasible (due to inconsistent bounds) and -1 if an error has occurred.
Further information
1. This routine converts the current problem into a matrix representation suitable for solvers. The resulting data is stored in the s_nlpdata datastructure, please refer to the mmnl.h include file for a detailed description.
2. After calling loadprob the structure nlpd should be completed by defining its fields fctctx, getsol_v, getsol_c and delmat (none of the 3 routines is mandatory, see mmnl.h for the function prototypes). The function delmat is used when a matrix previously loaded via loadprob becomes useless (for instance before loading an updated version of the matrix).
If the module makes available solution values (which is done by calling the function setprobstat), the function getsol_v is called whenever Mosel requires the solution value (with second parameter 0) or the reduced cost (with second parameter 1) of the given column (third parameter: the first column has number 0).
Similarly, getsol_c is used to get the slack value (second parameter is 0) or the dual value (second parameter is 1) of the given row (third parameter: the first row has number 0).
Related topics

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.