Initializing help system before first use

XSLPsetfunctionerror

XSLPsetfunctionerror


Purpose
Set the function error flag for the problem
Synopsis
int XPRS_CC XSLPsetfunctionerror(XSLPprob Prob);
Argument
Prob 
The current SLP problem.
Example
The following example from within a user function sets the function error flag if there is an error during the function evaluation:
double XPRS_CC ProfitCalc(double *Value, int *ArgInfo) {
  XSLPprob Prob;
  double Factor, Size;
  Factor = Value[0];
  Size = Value[1];
  if (Factor < 0) {
    XSLPgetfuncobject(ArgInfo, XSLP_XSLPPROBLEM, &Prob);
    XSLPsetfunctionerror(Prob);
    return 0.0;
  }
  return pow(Factor,Size);
}
Note the use of XSLPgetfuncobject to retrieve the Xpress NonLinear problem.
Further information
Once the function error has been set, calculations generally stop and the routines will return to their caller with a nonzero return code.

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