mptopt

Purpose

Global option handler for MPT.

Syntax

mptopt('Parameter1',Value1,'Parameter2',Value2,...)

Description

The function/class mptopt plays the role of global option handler throughout MPT. Any specific option should be changed using mptopt function. The syntax follows the "parameter-value" scheme where the parameter is the desired option and value is the assignment to this option. The changes take effect immediatelly and are valid globally through the whole MPT toolbox. Global options are kept in memory after initialization and any changes in the option are preserved between sessions.

Input Arguments

Parameter1

The name of the desired option to be changed provided as string. The list of available options can be obtained by typing properties('mptopt') at the Matlab prompt.

Class: char

Value1

The value to be assigned to Parameter1.

Class: double or char

Example(s)

Example 1

This example shows how to change LP solver to "CDD". To list which solvers are installed, invoke solvers_list option from mptopt class.This is achieved by assigning the output from mptopt class to some variable and referring to solvers_list field as follows:
 s = mptopt 
s = 

 Global settings for MPT:
                  version: @version@ 
             solvers_list: [struct] 
                  rel_tol: 1e-06 
                  abs_tol: 1e-08 
                  lex_tol: 1e-10 
                 zero_tol: 1e-12 
               region_tol: 1e-07 
            report_period: 2 
                  verbose: 0 
                 infbound: 10000 
                 colormap: matrix of size [10 x 3] 
                 lpsolver: LCP 
                 qpsolver: LCP 
               milpsolver: GLPK 
               miqpsolver:  
                lcpsolver: LCP 
                plpsolver: PLCP 
                pqpsolver: PLCP 
               plcpsolver: PLCP 
                  modules: [struct] 
 s.solvers_list.LP 
ans = 

    'LCP'
    'CDD'
    'GLPK'
    'LINPROG'
    'QPOASES'
    'CLP'
    'SEDUMI'

If CDD solver is present in the list, it means that it exist on the Matlab path. To change CDD solver as default for solving LP, it can be done twofold. Assignment with the help of the output variable s:
 s.lpsolver = 'CDD'; 
 or calling mptopt via standard syntax 
 mptopt('lpsolver','CDD'); 

Example 2

Options for any module are stored here as well. For instance, the geometry module of MPT that contains operations on polyhedra has the options stored under
 s = mptopt; 

 s.modules.geometry 
ans = 

      sets: [1x1 struct]
    unions: [1x1 struct]

These options can be changed from any instance of the script and take effect globally. To reset to default options use the function
 mpt_init 
MPT searches for solvers on the path ...
 
 LINPROG ............................................ linprog.m 
 QUADPROG .......................................... quadprog.m 
 GLPK .................................................. glpkcc 
 CDD ................................................... cddmex 
 CLP ................................................... mexclp 
 QPOASES .............................................. qpOASES 
 LCP ...................................................... lcp 
 SEDUMI .............................................. sedumi.m 
 QPSPLINE .......................................... QPspline.m 
 PLCP .............................................. mpt_plcp.m 
 MPQP .............................................. mpt_mpqp.m 
 MPLP .............................................. mpt_mplp.m 

MPT toolbox @version@ initialized...
Copyright (C) 2003-2013 by M. Kvasnica, C.N. Jones, and M. Herceg
For news, visit the MPT web page at http://control.ee.ethz.ch/~mpt/
            LP solver: LCP
            QP solver: LCP
          MILP solver: GLPK
 parametric LP solver: PLCP
 parametric QP solver: PLCP
 
These default options can be changed. See "help mptopt" for more details.

See Also

mpt_init


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