Stopping-work flow

The table below depict the various checks done by the function stop! and their connection with the meta, current_state and current_state. The function entry correspond to the function used internally by stop!, they can be imported and redifined to be adapted for a specific problem, for instance NLPStopping for NLPModels. The remote_control entry corresponds to the attribute in the remote_control that could be set as true/false to activate/deactivate this check. The meta_status gives the attribute in the meta with the check's answer. Finally the last column corresponds to entries in the meta parametrizing this check.

Check descriptionFunctionremote controlmeta statusesmeta tolerances
Check unboundedness and the domain of x_unbounded_and_domain_x_check!unbounded_and_domain_x_checkdomainerror and unbounded_problem_xstp.meta.unbounded_x
Check the domain in state (NaN's ...)_domain_checkdomain_checkdomainerror
Check optimality_optimality_check! and _null_testoptimality_checkoptimalSee how to check optimality with Stopping
Check for infeasibility_infeasibility_check!infeasibility_checkinfeasible
Check for unboundedness in problem values_unbounded_problem_check!unbounded_problem_checkunbounded_problem
Check time-limit_tired_check!tired_checktiredstart_time, max_time
Check for limits in resources_resources_check!resources_checkresources
Check if algo is stalling_stalled_check!stalled_checkstalled
Count the number of stop! and limits_iteration_check!iteration_checkiteration_limitmax_iter
Check if the main_stp stops_main_pb_check!main_pb_checkmain_pb
Callback user check_user_check!user_checkstopbyuseruser_check_func!

FAQ: Is Stopping initializing meta.start_time on its own?

Yes, it does when you call start! as well as optimality0 if start! check the optimality.

FAQ: How to set-up the user_check?

Stopping call the user_check_func! defined in the meta.

FAQ: How does Stopping check the optimality?

See the tutorial on this topic.