NonlinearProgram defines an abstract class for general nonlinear programing problems. More...

Inheritance diagram for NonlinearProgram:
[legend]

Public Member Functions

 NonlinearProgram (name)
 The default class constructor function. More...
 
function obj = regVariable (NlpVariable vars)
 This method registers the information of an optimization variable. More...
 
function obj = update ()
 Updates the NLP problems before load it to NLP solver. More...
 
function obj = regObjective (NlpFunction funcs)
 This method registers the information of a NLP function as a cost function. More...
 
function obj = regConstraint (NlpFunction funcs)
 This method registers the information of a NLP function as a constraint. More...
 
function [ nVar , lowerbound , upperbound ] = getVarInfo ()
 The function returns the dimension, upper/lower limits of NLP variables. More...
 
function x0 = getInitialGuess (char method)
 This function returns an initial guess for the NLP. More...
 
function obj = setOption (varargin)
 Sets the object options, and return the complete list of option structure including unchanged default options. More...
 
function  compileConstraint (char export_path,varargin varargin)
 Compile and export symbolic expression and derivatives of all NLP functions. More...
 
function  compileObjective (char export_path,varargin varargin)
 Compile and export symbolic expression and derivatives of all NLP functions. More...
 

Public Attributes

char Name
 The name of the problem. More...
 
struct Options
 The class option. More...
 
NlpVariable VariableArray
 An array contains all information regarding NLP optimization variables. More...
 
NlpFunction CostArray
 An array data stores objective functions. More...
 
NlpFunction ConstrArray
 A cell array data stores all constraints functions. More...
 
 Sol
 The solution of the NLP problem. More...
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More...
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More...
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends. More...
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function. More...
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More...
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects. More...
 
 findprop
 Returns a meta.property objects associated with the specified property name. More...
 
 fields
 Returns a cell array of string containing the names of public properties. More...
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More...
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More...
 
 eq
 Relational functions example. See details for more information. More...
 
 transpose
 Transposes the elements of the handle object array. More...
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function. More...
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More...
 
 sort
 ort the handle objects in any array in ascending or descending order. More...
 

Detailed Description

NonlinearProgram defines an abstract class for general nonlinear programing problems.

Author
Ayonga Hereid
Date
2016-10-26

Copyright (c) 2016, AMBER Lab All right reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted only in compliance with the BSD 3-Clause license, see http://www.opensource.org/licenses/bsd-license.php

Constructor & Destructor Documentation

◆ NonlinearProgram()

NonlinearProgram.NonlinearProgram (   name)
inline

The default class constructor function.

Parameters
namethe name of the problem
Required fields of options:
  • DerivativeLevel —  the user-defined derivative order (0, 1 or 2) to be used by a NLP solver.
Default:
1 EqualityConstraintBoundary:a relaxation factor number for equality constraints.

Member Function Documentation

◆ compileConstraint()

function NonlinearProgram.compileConstraint ( char  export_path,
varargin  varargin 
)

Compile and export symbolic expression and derivatives of all NLP functions.

Parameters
export_paththe path to export the file
vararginvariable input parameters
compileConstraint ( ..., ForceExport, BuildMex )
Required Parameters for varargin:
  • ForceExport force the export
  • BuildMex flag whether to MEX the exported file

◆ compileObjective()

function NonlinearProgram.compileObjective ( char  export_path,
varargin  varargin 
)

Compile and export symbolic expression and derivatives of all NLP functions.

Parameters
export_paththe path to export the file
vararginvariable input parameters
compileObjective ( ..., ForceExport, BuildMex )
Required Parameters for varargin:
  • ForceExport force the export
  • BuildMex flag whether to MEX the exported file

◆ getInitialGuess()

function x0 = NonlinearProgram.getInitialGuess ( char  method)

This function returns an initial guess for the NLP.

Available methods
typical: uses the typical values of NLP variables. random: randomly generates the initial guess. This method generate uniformally distributed random values within the boundaries of NLP variables. previous: returns the previous solution as the initial guess
Parameters
methodspecifies the method how to generate the initial guess.

◆ getVarInfo()

function [ integer nVar , colvec lowerbound , colvec upperbound ] = NonlinearProgram.getVarInfo ( )

The function returns the dimension, upper/lower limits of NLP variables.

Return values
nVarthe total dimension of all NLP variables
lowerboundthe lower limits
upperboundthe upper limits

◆ regConstraint()

function obj = NonlinearProgram.regConstraint ( NlpFunction  funcs)

This method registers the information of a NLP function as a constraint.

Note
We always assume 'funcs' to be a 2-D array of objects or table consists of array objects. It also covers 1-D array or scalar variables.
See also
NlpFunction
Parameters
funcsa list of contraint functions new NLP variables
Generated fields of obj:

◆ regObjective()

function obj = NonlinearProgram.regObjective ( NlpFunction  funcs)

This method registers the information of a NLP function as a cost function.

Note
We always assume 'funcs' to be a 2-D array of objects or table consists of array objects. It also covers 1-D array or scalar variables.
See also
NlpFunction
Parameters
funcsa list of objective functions new NLP variables
Generated fields of obj:

◆ regVariable()

function obj = NonlinearProgram.regVariable ( NlpVariable  vars)

This method registers the information of an optimization variable.

Note
We always assume 'vars' to be a 2-D array of objects or table consists of array objects. It also covers 1-D array or scalar variables.
Parameters
varsnew NLP variables
Generated fields of obj:

◆ setOption()

function obj = NonlinearProgram.setOption (   varargin)

Sets the object options, and return the complete list of option structure including unchanged default options.

Parameters
vararginname-value pairs of option field value
Return values
optionsthe complete list of final option structure
Generated fields of obj:

◆ update()

function obj = NonlinearProgram.update ( )

Updates the NLP problems before load it to NLP solver.

Member Data Documentation

◆ ConstrArray

NonlinearProgram.ConstrArray

A cell array data stores all constraints functions.

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

◆ CostArray

NonlinearProgram.CostArray

An array data stores objective functions.

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

◆ Name

NonlinearProgram.Name

The name of the problem.

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

◆ Options

NonlinearProgram.Options

The class option.

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

◆ Sol

NonlinearProgram.Sol

The solution of the NLP problem.

◆ VariableArray

NonlinearProgram.VariableArray

An array contains all information regarding NLP optimization variables.

Note
This property has non-standard access specifiers: SetAccess = Protected, GetAccess = Public
Matlab documentation of property attributes.

The documentation for this class was generated from the following files:
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/NonlinearProgram.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/compileConstraint.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/compileObjective.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/getInitialGuess.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/getVarInfo.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/regConstraint.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/regObjective.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/regVariable.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/setOption.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NonlinearProgram/update.m