naginterfaces.library.opt.handle_free¶
- naginterfaces.library.opt.handle_free(handle)[source]¶
handle_free
is a part of the NAG optimization modelling suite. It is used to deallocate the memory used within the problem handle and to destroy the handle itself.For full information please refer to the NAG Library document for e04rz
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/e04/e04rzf.html
- Parameters
- handleHandle, modified in place
On entry: the handle to the problem. It needs to be initialized (e.g., by
handle_init()
) and must not be changed between calls to the NAG optimization modelling suite.On exit: the handle is destroyed and set to a null Handle.
- Raises
- NagValueError
- (errno )
does not belong to the NAG optimization modelling suite, has not been initialized properly or is corrupted.
- (errno )
has not been initialized properly or is corrupted.
- Notes
Each initialized problem handle (e.g., by
handle_init()
) should be deallocated to avoid memory leaks. Therefore,handle_free
should be called on all the handles which are no longer needed, typically after obtaining results from the solver. Please note that passing a handle which has not been properly initialized might cause unpredictable behaviour, including a crash of your program. See the E04 Introduction for more details about the NAG optimization modelling suite.
See also
naginterfaces.library.examples.glopt.handle_solve_mcs_ex.main()
naginterfaces.library.examples.mip.handle_solve_milp_ex.main()
naginterfaces.library.examples.opt.handle_add_vars_ex.main()
naginterfaces.library.examples.opt.handle_solve_bounds_foas_ex.main()
naginterfaces.library.examples.opt.handle_solve_dfls_ex.main()
naginterfaces.library.examples.opt.handle_solve_dfno_ex.main()
naginterfaces.library.examples.opt.handle_solve_ipopt_ex.main()
naginterfaces.library.examples.opt.handle_solve_lp_ipm_ex.main()
naginterfaces.library.examples.opt.handle_solve_lp_simplex_ex.main()
naginterfaces.library.examples.opt.handle_solve_pennon_bmi_ex.main()
(and others)