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:
     
 | ||||||||||||||||
| 
     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).
 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
 
  
