HQP
1.9.6
|
Base class for Discrete-time Optimal Control Programs. More...
#include <Hqp_Docp.h>
Public Member Functions | |
Hqp_Docp () | |
constructor | |
~Hqp_Docp () | |
destructor | |
void | horizon (int k0, int kf) |
setup | |
void | setup () |
init task for given _k0 and _kf | |
void | init_x () |
set start variables | |
int | simulate (IF_DEF_ARGS) |
perform a simulation for current _x | |
void | alloc_vars (VECP v, VECP v_min, VECP v_max, IVECP v_int, int n) |
setup_vars() should call alloc_vars() to allocate variables and bounds | |
Interface for an optimal control problem. | |
virtual void | setup_horizon (int &k0, int &kf) |
virtual void | setup_vars (int k, VECP x, VECP x_min, VECP x_max, IVECP x_int, VECP u, VECP u_min, VECP u_max, IVECP u_int, VECP c, VECP c_min, VECP c_max)=0 |
virtual void | setup_struct (int k, const VECP x, const VECP u, MATP fx, MATP fu, IVECP f_lin, VECP f0x, VECP f0u, int &f0_lin, MATP cx, MATP cu, IVECP c_lin, MATP Lxx, MATP Luu, MATP Lxu) |
virtual void | init_simulation (int k, VECP x, VECP u) |
virtual void | update_vals (int k, const VECP x, const VECP u, VECP f, Real &f0, VECP c)=0 |
virtual void | update_grds (int k, const VECP x, const VECP u, MATP fx, MATP fu, VECP f0x, VECP f0u, MATP cx, MATP cu) |
Update Jacobians. More... | |
virtual void | update_hela (int k, const VECP x, const VECP u, const VECP vx, const VECP vc, MATP Lxx, MATP Luu, MATP Lxu) |
virtual void | update_stage (int k, const VECP x, const VECP u, VECP f, Real &f0, VECP c, MATP fx, MATP fu, VECP f0x, VECP f0u, MATP cx, MATP cu, const VECP rf, const VECP rc, MATP Lxx, MATP Luu, MATP Lxu) |
Member access methods. | |
const IVECP | nxs () const |
number of states per stage k | |
const IVECP | nus () const |
number of control parameters per stage k | |
int | fbd_evals () const |
number of function evaluations | |
Public Member Functions inherited from Hqp_SqpProgram | |
Hqp_SqpProgram () | |
constructor | |
virtual | ~Hqp_SqpProgram () |
destructor | |
virtual Real | test () |
Substract finite difference approximation for gradients from current linear approximation in qp and return maximum deviation. More... | |
virtual void | qp_dump () |
Write current linear quadratic appoximation in _qp to the file prg_qp_dump.out. More... | |
virtual const char * | name ()=0 |
program name | |
virtual Hqp_Program * | qp () |
current linear quadratic approximation | |
virtual const VECP | s () const |
current optimization step (solution of linear-quadratic sub-problem) | |
virtual void | set_s (const VECP v) |
set optimization step | |
virtual const VECP | x () const |
current vector of optimization variables | |
virtual void | set_x (const VECP) |
set vector of optimization variables | |
virtual Real | f () const |
current value of objective function | |
virtual void | set_f (Real f) |
set objective function value | |
virtual Real | norm_inf () const |
current violation of constraints | |
Static Public Attributes | |
static const int | Periodical |
equal initial and final states | |
Additional Inherited Members | |
Protected Attributes inherited from Hqp_SqpProgram | |
If_List | _ifList |
interface elements | |
Hqp_Program * | _qp |
quadratic approximation | |
VECP | _x |
vector of optimization variables | |
Real | _f |
objective function value | |
Base class for Discrete-time Optimal Control Programs.
|
virtual |
Update Jacobians.
The default implementation obtains finite differences.