Initializing help system before first use

# eval

Purpose
Evaluate a constraint or objective on the provided assignment of the decision variables.
Synopsis
`int eval(XPRMcontext ctx, XPRMnlpdata nlpdata, int nb, const double *x, double *val);`
Arguments

ctx | Mosel's execution context
nlpd | Problem information as generated by loadprob
nb | Constraint number to evaluate or NLEVAL_OBJ for the objective, NLEVAL_ALL for everything, NLEVAL_NL for nonlinear constraints or NLEVAL_LIN linear constraints.
x | Values assigned to the decision variables
val | Reference that receives the result of the evaluation. In case of multiple evaluations, this must be an array large enough to store all the results

Return value
0 if successful or 1 in case of error
Further information
When the function is called with NLEVAL_ALL the array val must be of size nlpdata->nbctr, with NLEVAL_NL it requires nlpdata->nbnlctr entries and for NLEVAL_LIN it contains nlpdata->nbctr-nlpdata->nbnlctr values.
Parent Topic Implementing a specific nonlinear solver interface

© 2001-2026 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.