eval
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.