library.mip Submodule

Module Summary

Interfaces for the NAG Mark 30.3 mip Chapter.

mip - Operations Research

This module provides functions to solve certain integer programming, transportation and shortest path problems. Additionally ‘best subset’ functions are included.

See Also

naginterfaces.library.examples.mip :

This subpackage contains examples for the mip module. See also the Examples subsection.

Functionality Index

Mixed integer linear programming (MILP)

dense

branch and bound method: ilp_dense()

large-scale

branch and bound method: handle_solve_milp()

Mixed integer quadratic programming (MIQP)

dense

branch and bound method: iqp_dense()

sparse

branch and bound method: iqp_sparse()

Mixed integer nonlinear programming (MINLP)

dense

mixed integer sequential quadratic programming (MISQP): handle_solve_minlp()

mixed integer sequential quadratic programming (MISQP), old interface: sqp()

Operations Research (OR)

feature selection

best subset of given size

direct communication: best_subset_given_size()

reverse communication: best_subset_given_size_revcomm()

shortest path through directed or undirected network: shortestpath()

transportation problem: transportation()

travelling salesman problem, simulated annealing: tsp_simann()

Service functions

input and output (I/O)

print solution of a dense MILP problem: ilp_print()

read MILP problem from MPS file and solve it by branch and bound: ilp_mpsx()

read MPS file defining dense MILP problem: ilp_mpsx_convert()

option setting functions

iqp_dense()

supply option values from a character string: iqp_dense_optstr()

supply option values from external file: iqp_dense_optfile()

iqp_sparse()

supply option values from a character string: iqp_sparse_optstr()

supply option values from external file: iqp_sparse_optfile()

sqp()

supply option values from a character string: optset()

retrieve option values: optget()

miscellaneous

extract further information on the solution obtained from ilp_dense(): ilp_info()

For full information please refer to the NAG Library document

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/h/hintro.html

Examples

naginterfaces.library.examples.mip.handle_solve_milp_ex.main()[source]

Example for naginterfaces.library.mip.handle_solve_milp().

Large-scale mixed integer linear programming.

>>> main()
naginterfaces.library.mip.handle_solve_milp Python Example Results.
Solve a small MILP problem.
 H02BK, Solver for MILP problems
 Status: converged, an optimal solution found
 Final primal objective value  1.390000E+01
 Final dual objective bound    1.390000E+01
naginterfaces.library.examples.mip.handle_solve_minlp_ex.main()[source]

Example for naginterfaces.library.mip.handle_solve_minlp().

Nonlinear programming with some integer constraints.

>>> main()
naginterfaces.library.mip.handle_solve_minlp Python Example Results.
Solve a portfolio selection problem.
Final objective value is 2.9250000e+00
naginterfaces.library.examples.mip.ilp_dense_ex.main()[source]

Example for naginterfaces.library.mip.ilp_dense().

Dense integer LP.

>>> main()
naginterfaces.library.mip.ilp_dense Python Example Results.
Solve an ILP problem.
Final objective value is -1.4000000e+01
naginterfaces.library.examples.mip.sqp_ex.main()[source]

Example for naginterfaces.library.mip.sqp().

Nonlinear programming with some integer constraints.

>>> main()
naginterfaces.library.mip.sqp Python Example Results.
Solve a portfolio selection problem.
Final objective value is 2.9250000e+00