ContentsIndexHome
PreviousUpNext
ISolverMathProgramInstance::SetCallbackMoments Method

Passes user callbacks information to the solver.

virtual _LONG_T SetCallbackMoments(
    _LONG_T flags, 
    _LONG_T info[]
) = 0;
Parameters 
Description 
_LONG_T flags 
Bit field indicating for which situation the callback should be called. The value can be a combination of flags taken from the CallbackInfoFlag enumeration. 
_LONG_T info[] 
Callback info array, value taken from the CallbackInfo enumeration 

The SetCallbackMoments method should return AOSI_SUCCESS or AOSI_FAILURE. In the latter case no callback is installed and AIMMS will not receive any callback notifications.

AIMMS offers the facility to create callback procedures that are called during the solution process. See section Suffices and Callbacks of the Language Reference. To support this feature within your solver, you must include calls to the RunCallback method. The SetCallbackMoments method is called by AIMMS to pass callback information to the solver in case a user callback is defined in the AIMMS project. If the solver cannot handle these callbacks, the information provided by AIMMS should be ignored.

The SetCallbackMoments method can be called at any time, even from the user callback itself to alter the current callback settings. This offers the possibility to change callback settings during the current solve. 

If the solver can handle callbacks, the RunCallback method should be called whenever a situation as indicated by the flags occurs.

Copyright © 1993–2016 by AIMMS B.V. All rights reserved.