CPLEX cpxTestQP2

From TomWiki
Jump to navigationJump to search

Notice.png

This page is part of the CPLEX Manual. See CPLEX.

Purpose

Simple test of calling CPLEX Matlab level 1 interface to solve a mixed integer quadratic (MIQP) problem.

Calling Syntax

x = cpxTestQP2(MIP)

Description of Input

Input Description
MIP If M I P = 1 (default), run as a MIQP problem, trying to make the first variable integer valued, otherwise run as a pure QP problem.
DEFPARAM If 1, use default parameters, presolve, cuts, dual simplex for fastest execution.

If 0, do not use presolve or cuts. Choose Primal Simplex for slower execution. Default: 0

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

Simple test of MIQP problem running CPLEX . The problem is defined as


Failed to parse (unknown function "\multicolumn"): {\displaystyle \begin{array}{cccccc}\min\limits_{x} & \multicolumn{5}{l}{f(x) = 2x_1^2 - 2x_1x_2 + 2x_2^2 -6x_1 } \\\\s/t & 0 & \leq & x_1,x_2 & \leq & \infty \\ & & & x_1 + x_2 & \leq & 1.9 \\\\ & \multicolumn{5}{l}{x_1 \mathrm{\ \ integer \ if\ \VAR{MIP} \ne 0}.} \\\end{array} }

M-files Used

cplex.m