MIP API Reference#

MIP uses the same Python API classes as convex optimization — see Convex Optimization API Reference for the full class reference. The following are particularly relevant for MIP problems.

Variable Types#

Use VType to declare integer and semi-continuous variables:

class cuopt.linear_programming.problem.VType(*values)#

The type of a variable is continuous, integer, or semi-continuous. Variable Types can be directly used as a constant. CONTINUOUS is VType.CONTINUOUS INTEGER is VType.INTEGER SEMI_CONTINUOUS is VType.SEMI_CONTINUOUS

CONTINUOUS = 'C'#
INTEGER = 'I'#
SEMI_CONTINUOUS = 'S'#

MIP Start#

Problem supports providing initial feasible solutions (MIP starts) to help the solver find good solutions faster. Use Problem.addMIPStart to add one or more primal solution hints before calling solve().

MIP Solution Callbacks#

SolverSettings supports callbacks to monitor incumbent solutions found during the MIP solve. Use SolverSettings.set_mip_solution_callback to register a callback that receives each new incumbent solution.