Drake
 All Classes Files Functions Variables
FunctionHandleConstraint Class Reference

FUNCTIONHANDLECONSTRAINT A Constraint implementation where the constraint is given by a function handle. More...

Inheritance diagram for FunctionHandleConstraint:
Collaboration diagram for FunctionHandleConstraint:

Public Member Functions

function FunctionHandleConstraint (lb, ub, xdim, eval_handle, options)
 
function setEvalHandle (obj, eval_handle_new)
 obj_new = setEvalHandle(obj,eval_handle_new) returns a FunctionHandleConstraint object the same as this one, but with a new eval_handle. More...
 
- Public Member Functions inherited from Constraint
function Constraint (lb, ub, xdim, options)
 Constraint(lb,ub) or Constraint(lb,ub,eval_handle) More...
 
function setSparseStructure (obj, iCfun, jCvar)
 set the sparse structure of the 1st order gradient matrix More...
 
function getGradientSparseStructure (obj)
 
function checkGradient (obj, tol, varargin)
 Check the accuracy and sparsity pattern of the gradient. More...
 
function setName (obj, name)
 
function disp (obj)
 
function eval (obj, varargin)
 
function setBounds (obj, lb, ub)
 revise the bounds for the constraint More...
 

Protected Member Functions

function constraintEval (obj, varargin)
 

Protected Attributes

Property eval_handle
 
- Protected Attributes inherited from Constraint
Property lb
 
Property ub
 
Property xdim
 
Property num_cnstr
 
Property name
 
Property ceq_idx
 
Property cin_idx
 

Additional Inherited Members

- Public Attributes inherited from Constraint
Property grad_level
 
Property grad_method
 A string indicating the method to compute gradient. If empty,. More...
 

Detailed Description

FUNCTIONHANDLECONSTRAINT A Constraint implementation where the constraint is given by a function handle.

Constructor & Destructor Documentation

function FunctionHandleConstraint ( lb  ,
ub  ,
xdim  ,
eval_handle  ,
options   
)

Parameters
lb– The lower bound of the constraint
ub– The upper bound of the constraint
xdim– An int scalar. x is double vector of xdim x 1
eval_handle– A function handle which performs the constraint evaluation
Options:
grad_level  optional user_gradient level. see Constraint constructor.
Default: -1
iCfun,jCvar  The row and column indices of the non-zero entries in the gradient matrix. See Constraint constructor
Return values
obj

Member Function Documentation

function constraintEval ( obj  ,
varargin   
)
protectedvirtual
Return values
varargout

Reimplemented from Constraint.

function setEvalHandle ( obj  ,
eval_handle_new   
)

obj_new = setEvalHandle(obj,eval_handle_new) returns a FunctionHandleConstraint object the same as this one, but with a new eval_handle.

Note: We're constructing a new constraint object here because altering the eval_handle property of an existing constraint object makes concatenating that object in a cell array very slow. We don't know why that is.

Return values
obj_new

Member Data Documentation

Property eval_handle
protected

The documentation for this class was generated from the following file: