15.10 Class types¶
- mosek.Progress¶
A handler class for progress callbacks.
- Progress.progress¶
int progress (mosek.callbackcode code)
The progress callback is a user-defined function which will be called by MOSEK occasionally during the optimization process. In particular, the callback function is called at the beginning of each iteration in the interior-point optimizer. For the simplex optimizers
iparam.log_sim_freq
controls how frequently the callback is called.The user must not call any MOSEK function directly or indirectly from the callback function.
- Parameters
code
(callbackcode
) – Callback code indicating current operation of the solver. (input)- Return
(
int
) – Non-zero if the optimizer should be stopped; zero otherwise.
- mosek.ItgSolutionCallback¶
A handler class for integer solution callbacks.
- ItgSolutionCallback.callback¶
void callback (double[] xx)
The integer solution callback is a user-defined function which will be called by MOSEK when it improves the best mixed-integer solution.
The user must not call any MOSEK function directly or indirectly from the callback function.
- Parameters
xx
(double
[]
) – An array with the values of all variables in the currently best solution. (input)
- mosek.DataCallback¶
A handler class for data callbacks.
- DataCallback.callback¶
int callback (mosek.callbackcode code, double[] dinf, int[] iinf, long[] liinf)
The data callback is a user-defined function which will be called by MOSEK occasionally during the optimization process. In particular, the callback function is called at the beginning of each iteration in the interior-point optimizer. For the simplex optimizers
iparam.log_sim_freq
controls how frequently the callback is called.The user must not call any MOSEK function directly or indirectly from the callback function. The only exception is the possibility to retrieve an integer solution, see Progress and data callback.
- Parameters
code
(callbackcode
) – Callback code indicating current operation of the solver. (input)dinf
(double
[]
) – Array of double information items. (input)iinf
(int
[]
) – Array of integer information items. (input)liinf
(long
[]
) – Array of long integer information items. (input)
- Return
(
int
) – Non-zero if the optimizer should be stopped; zero otherwise.
- mosek.Stream¶
A stream handler class.
- Stream.stream¶
void stream (String msg)
The message-stream callback function is a user-defined function which can be linked to any of the MOSEK streams. Doing so, the function is called whenever MOSEK sends a message to the stream.
The user must not call any MOSEK function directly or indirectly from the callback function.
- Parameters
msg
(String
) – A message passed to the handler. (input)