Initializing help system before first use

XSLPsetuserfuncobject

XSLPsetuserfuncobject


Purpose
Set or define one of the objects which can be accessed by the user functions
Synopsis
int XPRS_CC XSLPsetuserfuncobject(XSLPprob Prob, int Entity, void *Address);
Arguments
Prob 
The current SLP problem.
Entity 
An integer indicating which object is to be defined. The value is interpreted as follows:
The Global Function Object;
n > 0 
The User Function Object for user function number n;
n < 0 
The Instance Function Object for user function instance number -n.
Address 
The address of the object.
Example
The following example sets the Global Function Object. It then sets the User Function Object for the function ProfitCalcs.
double *GlobObj;
void *ProfitObj;
int iUF;

XSLPsetuserfuncobject(Prob, 0, GlobObj);

if (!XSLPgetindex(Prob, XSLP_USERFUNCNAMESNOCASE,
             "ProfitCalcs", &iUF)) {
  XSLPsetuserfuncobject(Prob, iUF, ProfitObj);
}
The function objects can be of any type. The index of the user function is obtained using the case-insensitive search for names. If the name is not found, XSLPgetindex returns a nonzero value.
Further information
As instance numbers are not normally meaningful, this function should only be used with a negative value of n to reset all Instance Function Objects to NULL when a model is being re-optimized within the same program execution.
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.