CPLEX cpxTestQP1: Difference between revisions

From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the CPLEX Manual|link=CPLEX}} ==Purpose== Simple test of calling CPLEX Matlab level 1 interface to solve a QP problem. ==Calling Syntax== <pre...")
 
 
Line 37: Line 37:


Simple test of calling CPLEX Matlab level 1 interface to solve a QP or MIQP problem. The problem is
Simple test of calling CPLEX Matlab level 1 interface to solve a QP or MIQP problem. The problem is
<math>
\begin{array}{llll}\min\limits_{x} & \multicolumn{3}{l}{f(x) = x_1^2 + x_2^2 + x_3^2} \\\\\mbox{subject to} & x_1 + 2x_2 - x_3 & = &  4 \\                  & x_1 -  x_2 + x_3 & = & -2 \\  \\      & \multicolumn{3}{l}{-10 \leq x_i \leq 10,\quad i=1,2,3} \\      & \multicolumn{3}{l}{x_3 \mbox{ integer if\ } \VAR{MIP} \ne 0}\\\end{array}</math>


==M-files Used==
==M-files Used==


''cplex.m''
''cplex.m''

Latest revision as of 08:06, 16 August 2011

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 QP problem.

Calling Syntax

x = cpxTestQP1(MIP,DEFPARAM)

Description of Input

Input Description
MIP If MIP = 1, run as a MIQP problem, trying to make the third variable integer valued.

Otherwise run as a pure QP problem. Default M I P = 0.

DEFPARAM If 1, use default CPLEX parameters for fastest execution.

If 0, disable cuts and presolve for slower execution.

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 calling CPLEX Matlab level 1 interface to solve a QP or MIQP problem. The problem is


Failed to parse (unknown function "\multicolumn"): {\displaystyle \begin{array}{llll}\min\limits_{x} & \multicolumn{3}{l}{f(x) = x_1^2 + x_2^2 + x_3^2} \\\\\mbox{subject to} & x_1 + 2x_2 - x_3 & = & 4 \\ & x_1 - x_2 + x_3 & = & -2 \\ \\ & \multicolumn{3}{l}{-10 \leq x_i \leq 10,\quad i=1,2,3} \\ & \multicolumn{3}{l}{x_3 \mbox{ integer if\ } \VAR{MIP} \ne 0}\\\end{array}}

M-files Used

cplex.m