Initializing help system before first use

XSLPsetuserfuncinfo

XSLPsetuserfuncinfo


Purpose
Set up the argument information array for a user function call
Synopsis
int XPRS_CC XSLPsetuserfuncinfo(XSLPprob Prob, int *ArgInfo, int CallerFlag, int nInput, int nReturn, int nDelta, int nInString, int nOutString);
Arguments
Prob 
The current SLP problem.
ArgInfo 
The array to be set up. This must be dimensioned at least XSLP_FUNCINFOSIZE.
CallerFlag 
An integer which can be used for any purpose to communicate between the calling and called program. This value will always be zero for user functions which are called directly by Xpress NonLinear.
nInput 
The number of input values.
nReturn 
The number of return values required.
nDelta 
The number of sets of partial derivatives required.
nInString 
The number of strings contained in the ARGNAME argument to the user function.
nOutString 
The number of strings contained in the RETNAME argument to the user function .
Example
The following example sets up the argument information array and then calls the user function ProfitCalc:
int ArgInfo[XSLP_FUNCINFOSIZE];
double Values[3];
int iFunc;

XSLPsetuserfuncinfo(Prob, ArgInfo, 99, 3, 1,
                    0, 0, 0);
XSLPgetindex(Prob, XSLP_USERFUNCNAMESNOCASE,
             "PackCalcs", &iFunc);
Result = XSLPcalluserfunc(Prob, iFunc, Values,
             ArgInfo, NULL, NULL, NULL, NULL);
The function is called with 3 values in Value and expects 1 return value. There are no names expected by the function.
Further information
The total number of values returned will be (nReturn)*(nDelta+1).
Related topics

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