cnlp_set_intermediate_callback

Function cnlp_set_intermediate_callback 

Source
pub unsafe extern "C" fn cnlp_set_intermediate_callback(
    problem: CNLP_ProblemPtr,
    intermediate_cb: CNLP_Intermediate_CB,
)
Expand description

Setting a callback function for the “intermediate callback” method in the TNLP. This gives control back to the user once per iteration. If set, it provides the user with some information on the state of the optimization. This can be used to print some user-defined output. It also gives the user a way to terminate the optimization prematurely. If the callback method returns 0, Ipopt will terminate the optimization. Calling this set method to set the CB pointer to NULL disables the intermediate callback functionality.