Initializing help system before first use

XPRSaddcbslppreupdatelinearization

Purpose
Add a user callback to be called before the linearization is updated
Topic areas
Synopsis
int XPRS_CC XPRSaddcbslppreupdatelinearization(XPRSprob prob, int (XPRS_CC *slppreupdatelinearization) (XPRSprob cbprob, void *cbdata, int *when), void *data, int priority);
Arguments
prob 
The current problem.
slppreupdatelinearization 
The function to be called before the linearization is updated. slppreupdatelinearization returns an integer value. If the return value is nonzero, the optimization will return an error code and the "User Return Code" error will be set.
cbprob 
The problem passed to the callback function.
cbdata 
The user-defined object passed as data to XPRSaddcbslppreupdatelinearization.
ifrepeat 
Indicates the call number, starting at 1. If returned nonzero, another call to the callback will be scheduled. If returned zero, a final call with *ifrepeat == -1 will be made.
data 
Address of a user-defined object, which can be used for any purpose by the function. data is passed to slppreupdatelinearization as cbdata.
priority 
An integer that determines the order in which callbacks of this type will be invoked. The callback added with a higher priority will be called before a callback with a lower priority. Set to 0 if not required.
Further information
1. When the linearization is updated, all user functions are evaluated and their derivatives calculated at the current base point. In some models, it is cheaper to compute the derivatives for all user functions at the same time, thereby avoiding repeated calculations for each function. This callback is intended to be used in such cases.
2. During each SLP iteration, the callback is invoked repeatedly, with *ifrepeat indicating the current call number (starting from 1), until the callback indicates that no further calls are needed, by setting *ifrepeat = 0. Between each callback invocation, the solver evaluates the user functions without requesting derivatives. After the callback has set *ifrepeat = 0, the user functions are evaluated one more time, this time requesting derivatives, and then finally the callback is called with *ifrepeat == -1, marking the end of the linearization update. The only time derivatives will be requested outside of this sequence is during KKT validation. This can be disabled during the solve by clearing the XSLP_CONVERGEBIT_VALIDATION_K bit in XSLP_CONVERGENCEOPS, ensuring that derivatives can always be precomputed.
3. One way that this callback can be used to precompute derivatives for user functions is as follows:
Related topics

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