OpTaS  1.0.7
An optimization-based task specification library for trajectory optimization and model predictive control.
Classes | Functions
optas.optimization Namespace Reference

Classes

class  Optimization
 Base optimization class. More...
 
class  QuadraticCostUnconstrained
 Unconstrained Quadratic Program. More...
 
class  QuadraticCostLinearConstraints
 Linear constrained Quadratic Program. More...
 
class  QuadraticCostNonlinearConstraints
 Nonlinear constrained optimization problem with quadratic cost function. More...
 
class  NonlinearCostUnconstrained
 Unconstrained optimization problem. More...
 
class  NonlinearCostLinearConstraints
 Linear constrained optimization problem. More...
 
class  NonlinearCostNonlinearConstraints
 Nonlinear constrained optimization problem. More...
 
class  MixedIntegerNonlinearCostNonlinearConstrained
 

Functions

Tuple[cs.Function] derive_jacobian_and_hessian_functions (str name, cs.Function fun, CasADiArrayType x, CasADiArrayType p)
 Compute the Jacobian and Hessian for a given function using automatic differentiation. More...
 
cs.Function vertcon (CasADiArrayType x, CasADiArrayType p, List[cs.Function] ineq=[], List[cs.Function] eq=[])
 Align inequality and equality constraints vertically. More...
 

Function Documentation

◆ derive_jacobian_and_hessian_functions()

Tuple[cs.Function] optas.optimization.derive_jacobian_and_hessian_functions ( str  name,
cs.Function  fun,
CasADiArrayType  x,
CasADiArrayType   p 
)

Compute the Jacobian and Hessian for a given function using automatic differentiation.

Parameters
nameThe function name.
funThe CasADi function.
xThe variables of the function.
pThe parameters of the function.
Returns
The Jacobian and Hessian that are the derivatives of the function wrt the variables x.

◆ vertcon()

cs.Function optas.optimization.vertcon ( CasADiArrayType  x,
CasADiArrayType  p,
List[cs.Function]   ineq = [],
List[cs.Function]   eq = [] 
)

Align inequality and equality constraints vertically.

Given an inequality constraint ineq(x, p) and equality constraint eq(x, p). The method that is returned evaluates the following array.

          [ ineq(x, p) ]
v(x, p) = [   eq(x, p) ]
          [  -eq(x, p) ]
Parameters
xThe variables of the functions.
pThe parameters of the functions.
ineqA list of inequality constraints.
eqA list of equality constraints.
Returns
A CasADi function that evaluates the constraints in the form v(x, p) >= 0 (see above).