mpt_call_nag

Purpose

A gateway function to the NAG Toolbox LP and QP solvers

Syntax

R = mpt_call_nag(S)

Description

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

../../../../fig/mpt/modules/solvers/mpt_call_nag12.png

which must be transformed to

../../../../fig/mpt/modules/solvers/mpt_call_nag13.png

Inequality ../../../../fig/mpt/modules/solvers/mpt_call_nag2.png and equality ../../../../fig/mpt/modules/solvers/mpt_call_nag3.png constraints are merged to

../../../../fig/mpt/modules/solvers/mpt_call_nag14.png

because NAG accepts equalities written as double-sided inequalities.

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_nag4.png.

Class: double

S.b

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

Class: double

S.Ae

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

Class: double

Default: []

S.be

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

Class: double

Default: []

S.lb

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

Class: double

Default: []

S.ub

Upper bound for the variables ../../../../fig/mpt/modules/solvers/mpt_call_nag9.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_nag10.png.

Class: double

S.me

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

Class: double

S.problem_type

A string specifying the problem to be solved.

Class: char

S.test

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

Class: logical

Default: false

S.solver

Specific call of NAG routine to be called. By default, the interface function "mexnagqp" or "mexnaglp" are called. Left as option for future.

Class: char

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

© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk