mpt_call_cplex

Purpose

A gateway function to CPLEX solver (without errorchecks)

Syntax

R = mpt_call_cplex(S)

Description

The function implements call to CPLEX solver based on formulation from Opt class. QP, LP, MILP and MIQP problems are supported. It is assumed that QP/LP/MIQP/MILP entering this function (for LP/MILP ../../../../fig/mpt/modules/solvers/mpt_call_cplex1.png) is of the form

../../../../fig/mpt/modules/solvers/mpt_call_cplex16.png

where the set ../../../../fig/mpt/modules/solvers/mpt_call_cplex2.png represents which is given by strings in vartype field. CPLEX accepts this format directly.

Input Arguments

S

structure of the Opt class

Class: struct

S.H

Quadratic part of the objective function.

Class: double

Default: []

S.f

Linear part of the objective function.

Class: double

S.A

Linear part of the inequality constraints ../../../../fig/mpt/modules/solvers/mpt_call_cplex8.png.

Class: double

S.b

Right hand side of the inequality constraints ../../../../fig/mpt/modules/solvers/mpt_call_cplex9.png.

Class: double

S.Ae

Linear part of the equality constraints ../../../../fig/mpt/modules/solvers/mpt_call_cplex10.png.

Class: double

Default: []

S.be

Right hand side of the equality constraints ../../../../fig/mpt/modules/solvers/mpt_call_cplex11.png.

Class: double

Default: []

S.lb

Lower bound for the variables ../../../../fig/mpt/modules/solvers/mpt_call_cplex12.png.

Class: double

Default: []

S.ub

Upper bound for the variables ../../../../fig/mpt/modules/solvers/mpt_call_cplex13.png.

Class: double

Default: []

S.n

Problem dimension (number of variables).

Class: double

S.m

Number of inequalities in ../../../../fig/mpt/modules/solvers/mpt_call_cplex14.png.

Class: double

S.me

Number of equalities in ../../../../fig/mpt/modules/solvers/mpt_call_cplex15.png.

Class: double

S.problem_type

A string specifying the problem to be solved.

Class: char

S.vartype

A string specifying the type of variable. Supported characters are C (continuous), I (integer), B (binary), N (semi-integer), S (semi-continuous). Example: First variable from three is binary, the rest is continuous: S.vartype='BCC';

Class: char

S.test

Call (false) or not to call (true) MPT global settings.

Class: logical

Default: false

Output Arguments

R

result structure

Class: struct

R.xopt

Optimal solution.

Class: double

R.obj

Optimal objective value.

Class: double

R.lambda

Lagrangian multipliers.

Class: double

R.exitflag

An integer value that informs if the result was feasible (1), or otherwise (different from 1).

Class: double

R.how

A string that informs if the result was feasible ('ok'), or if any problem appeared through optimization.

Class: char

See Also

mpt_solve


© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch