This class provides a data structure for NLP optimization variables. More...

Inheritance diagram for NlpVariable:
[legend]

Public Member Functions

 NlpVariable (varargin)
 The class constructor function. More...
 
function obj = setIndices (integer index)
 Sets indinces of the Nlp Variables. More...
 
function obj = setBoundary (colvec lowerbound,colvec upperbound)
 Sets the lower/upper boundary value for a NLP variable. More...
 
function obj = setInitialValue (colvec x)
 Sets a typical initial value for the NLP variables. This value will be used to assign the initial value for the NLP solver. More...
 
function obj = updateProp (varargin)
 This function updates the properties of the class object based on the input name-value pair arguments. More...
 

Public Attributes

char Name
 A string that specifies the name of the optimization variable. More...
 
integer Dimension = 0
 The dimension the optimization variable. More...
 
colvec InitialValue
 The typical value of the variable. More...
 
colvec LowerBound
 The lower limit of the optimization variable. More...
 
colvec UpperBound
 The upper limit of the optimization variable. More...
 
colvec Indices
 The index of the current variable in an array of NlpVariable objects. 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

This class provides a data structure for NLP optimization variables.

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

◆ NlpVariable()

NlpVariable.NlpVariable (   varargin)
inline

The class constructor function.

Parameters
vararginvariable nama-value pair input arguments, in detail:
NlpVariable ( Name, Dimension, lb, ub, x0 )
Required Parameters for varargin:
  • Name name of the variable
  • Dimension dimension of the variable
  • lb lower limit
  • ub upper limit
  • x0 a typical value of the variable

Member Function Documentation

◆ setBoundary()

function obj = NlpVariable.setBoundary ( colvec  lowerbound,
colvec  upperbound 
)

Sets the lower/upper boundary value for a NLP variable.

Note
If the boundary values are not specified, then use -Inf/Inf by default.
If the NLP variable is a vector (Dimension > 1) but the lower/upper bound values are specified as a scalar, we set the lower/upper bounds of all element with the same scalar value.
Ignore a particular boundary if it is given as empty
Parameters
lowerboundthe lower boundary values
upperboundthe upper boundary values
Generated fields of obj:

◆ setIndices()

function obj = NlpVariable.setIndices ( integer  index)

Sets indinces of the Nlp Variables.

Parameters
indexthe indices of the variables
Generated fields of obj:

◆ setInitialValue()

function obj = NlpVariable.setInitialValue ( colvec  x)

Sets a typical initial value for the NLP variables. This value will be used to assign the initial value for the NLP solver.

Note
If the initial value is not given, then use the middle value of the lower/upper boundaries.
Parameters
xan array of initial value of the NLP variables
Generated fields of obj:

◆ updateProp()

function obj = NlpVariable.updateProp (   varargin)

This function updates the properties of the class object based on the input name-value pair arguments.

Parameters
vararginvariable nama-value pair input arguments, in detail:
updateProp ( lb, ub, x0 )
Required Parameters for varargin:
  • lb lower limit
  • ub upper limit
  • x0 a typical value of the variable

Member Data Documentation

◆ Dimension

NlpVariable.Dimension = 0

The dimension the optimization variable.

When we define a optimization variable, we assume that it represnts a vector of variable that belongs to a particular group. For example, the joint configurations q and control inputs u. The dimension specifies the length of this vector.

Default: 0

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

◆ Indices

NlpVariable.Indices

The index of the current variable in an array of NlpVariable objects.

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

◆ InitialValue

NlpVariable.InitialValue

The typical value of the variable.

You can specify a typical value for the variable explicity. If not given, this value will be determined by the upper/lower boundary of the variable. If both upper/lower boundary values are infinity, then we set the typical value as zeros. If one of the upper/lower boundary values is infinity, then the typical value will be the non-infinity boundary value. Otherwise, the typical value will be the middle point of the two boundary values.

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

◆ LowerBound

NlpVariable.LowerBound

The lower limit of the optimization variable.

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

◆ Name

NlpVariable.Name

A string that specifies the name of the optimization variable.

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

◆ UpperBound

NlpVariable.UpperBound

The upper limit of the optimization variable.

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/@NlpVariable/NlpVariable.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NlpVariable/setBoundary.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NlpVariable/setIndices.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NlpVariable/setInitialValue.m
  • /home/ayonga/.dropboxes/business/Dropbox/research/dzopt/frost/matlab/nlp/@NlpVariable/updateProp.m