CPLEX cpxbiptest
This page is part of the CPLEX Manual. See CPLEX. |
Contents
Purpose
Test of TOMLAB /CPLEX level 1 interface solving three larger binary integer linear optimization problems calling the CPLEX solver.
Calling Syntax
function cpxbiptest(Cut, PreSolve, cpxControl)
Description of Input
Input | Description |
---|---|
Cut | Value of the cut strategy control parameter, default Cut = -1.
Cut = -1, auto select of Cut = 1 or Cut = 2. Cut = 0, no cuts. Cut = 1, conservative cut strategy. Cut = 2, aggressive cut strategy The cut strategy choice is implemented by setting the following parameters (omitting prefix "CPX PARAM )": CLIQUES, COVERS, DISCJUTS, FLOWCOVERS, FLOWPATHS, FRACCUTS, GUBCOVERS, IMPLED, MIRCUTS in the cpxControl structure. |
PreSolve | Value of the PRESOLVE control parameter, default PreSolve = 1.
PreSolve = 0: no presolve. PreSolve = 1, do presolve. |
cpxControl | The initial CPLEX parameter structure. Here the user may set additional control parame- ters. Default empty. |
Global Parameters Used
Parameter | Description |
---|---|
MAX_x | Maximal number of x elements printed in output statements. Default 20. |
MAX_c | Maximal number of constraint elements printed in output statements. Default 20. |
Description
Test of three larger binary integer linear optimization problems calling the CPLEX solver. The test problem 1 and 2 have 1956 variables, 23 equalities and four inequalities with both lower and upper bounds set.
Test problem 1, in bilp1.mat, is randomly generated. It has several minima with optimal zero value. CPLEX runs faster if avoiding the use of a cut strategy, and skipping presolve. Test problem 2, in bilp2.mat, has a unique minimum. Runs faster if avoiding the use of presolve.
Test problem 3, in bilp1211.mat, has 1656 variables, 23 equalities and four inequalities with lower and upper bounds set. Runs very slow without the use of cuts. A call cpxbiptest(0, 0) gives the fastest execution for the first two problems, but will be extremely slow for the third problem.
Timings are made with the Matlab functions tic and toc.
M-files Used
cplex.m, cpxPrint.m