ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::mad::LQ_OC_single_shooting< N, R, K, P > Class Template Reference

#include <lq_oc_single_shooting.h>

Collaboration diagram for adore::mad::LQ_OC_single_shooting< N, R, K, P >:
Collaboration graph

Public Types

typedef qpOASES::real_t real_t
 
typedef dlib::matrix< real_t, N, N > t_Ad
 number of linear system constraints in QP: upper and lower bounds for x and u separately due to slack More...
 
typedef dlib::matrix< real_t, N, R > t_Bd
 discrete time system matrix future version: one Ad,Bd per time step More...
 
typedef adore::mad::LLinearPiecewiseFunctionM< double, N+R > t_resultfun
 discrete time input matrix More...
 
typedef dlib::matrix< real_t, N, 1 > t_wx
 function for result interpolation More...
 
typedef dlib::matrix< real_t, N, 1 > t_wx_end
 weights for states (will be put on main diagonal of Hx) More...
 
typedef dlib::matrix< real_t, R, 1 > t_wu
 weights for states at endpoint More...
 
typedef dlib::matrix< real_t, R, 1 > t_wu_end
 weights for inputs (will be put on main diagonal of Hu) More...
 
typedef dlib::matrix< real_t, N, 1 > t_weps
 weights for inputs at endpoint More...
 
typedef dlib::matrix< real_t, N, 1 > t_geps
 quadratic weights for slack (will be put in Heps) More...
 
typedef dlib::matrix< real_t, N, K > t_lbx
 linear weights for slack More...
 
typedef dlib::matrix< real_t, N, K > t_ubx
 lower bound on state trace More...
 
typedef dlib::matrix< real_t, R, K > t_lbu
 upper bound on state trace More...
 
typedef dlib::matrix< real_t, R, K > t_ubu
 lower bound on input trace More...
 
typedef dlib::matrix< real_t, R, K > t_lbu_hard
 upper bound on input trace More...
 
typedef dlib::matrix< real_t, R, K > t_ubu_hard
 lower bound on input trace, hard constraint going to lb More...
 
typedef dlib::matrix< real_t, N, 1 > t_ubeps
 upper bound on input trace, hard constraint going to ub More...
 
typedef dlib::matrix< real_t, N, 1 > t_x0
 lbeps==0, softconstraints for x and/or u if ubeps>0 More...
 
typedef dlib::matrix< real_t, N, K > t_y
 initial state More...
 
typedef dlib::matrix< real_t, N *K, 1 > t_y_flat
 desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3) More...
 
typedef dlib::matrix< real_t, R, K > t_uset
 desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3) More...
 
typedef dlib::matrix< real_t, R *K, 1 > t_uset_flat
 set point More...
 
typedef dlib::matrix< real_t, R, K > t_U
 set point More...
 
typedef dlib::matrix< real_t, R *K, 1 > t_U_flat
 the computed control [u(t_0),...,u(t_K-1)] More...
 
typedef dlib::matrix< real_t, N, K+1 > t_X
 the computed control [u(t_0),...,u(t_K-1)] More...
 
typedef dlib::matrix< real_t, N *(K+1), 1 > t_X_flat
 the computed states [x(t_1),..., x(t_K)] More...
 
typedef dlib::matrix< real_t, N, 1 > t_eps
 the computed states [x(t_1),..., x(t_K)] More...
 

Public Member Functions

 LQ_OC_single_shooting ()
 
virtual ~LQ_OC_single_shooting ()
 
void compute ()
 
bool isFeasible () const
 
bool isSolved () const
 
void updateSystem (const t_Ad &Ad, const t_Bd &Bd, const t_wx &wx, const t_wu &wu)
 
void updateSystem (const t_Ad &Ad, const t_Bd &Bd, const t_wx &wx, const t_wu &wu, const t_weps &weps)
 
void updateSystem (const t_Ad &Ad, const t_Bd &Bd, const t_wx &wx, const t_wu &wu, const t_weps &weps, const t_geps &geps)
 
void update (const t_x0 &x0, const t_y &y, const t_lbx &lbx, const t_ubx &ubx, const t_lbu_hard &lbu_hard, const t_ubu_hard &ubu_hard, const t_ubeps &ubeps)
 
void update (const t_x0 &x0, const t_y &y, const t_lbx &lbx, const t_ubx &ubx)
 
void setSystemChanged (bool value)
 
void setEndTime (double Tend)
 
t_AdAd ()
 
t_BdBd ()
 
t_AdAd_p ()
 
t_BdBd_p ()
 
t_resultfunresult_fun ()
 
t_wxwx ()
 
t_wuwu ()
 
t_wx_endwx_end ()
 
t_wu_endwu_end ()
 
t_wepsweps ()
 
t_gepsgeps ()
 
t_lbxlbx ()
 
t_ubxubx ()
 
t_lbu_hardlbu_hard ()
 
t_ubu_hardubu_hard ()
 
t_ubepsubeps ()
 
t_x0x0 ()
 
t_yy ()
 
t_usetuset ()
 
t_XX ()
 
t_UU ()
 
t_epseps ()
 
real_t getCPUTime ()
 
int getnWSR ()
 
qpOASES::QProblem * getQProblem ()
 
void setMaxCPUTime (real_t value)
 
void setMaxnWSR (int value)
 
int getnV ()
 
int getnC ()
 

Static Public Attributes

static const int nV = R*K + N
 
static const int nC = 2*N*K
 number of variables in the QP: var=[u;eps] More...
 

Private Member Functions

void initialize_userdata_matrices ()
 qpOASES: "If cputime is not the null pointer, it contains the maximum allowed CPU time in seconds for the whole initialisation (and the actually required one on output)." More...
 
void initialize_memory ()
 
void delete_memory ()
 
void initialize_interface_variables ()
 
void initialize_intermediate_matrices ()
 
void updateAd ()
 
void updateE ()
 
void updateF ()
 
void updateHx ()
 Hx:=diag(wx) More...
 
void updateHu ()
 Hu:=diag(wu) More...
 
void updateHeps ()
 Heps:=diag(weps);. More...
 
void updateg1 ()
 
void updateH11 ()
 
void updateA1 ()
 
void updateA2 ()
 
int idx (int row, int col, int nrows, int ncols) const
 
void updateqpH ()
 
void updateqpg ()
 
void updateqpA ()
 
void updateqplb ()
 
void updateqpub ()
 
void updateqpubA ()
 
void compute_init ()
 
void compute_hotstart ()
 
void retrieveSolution ()
 
void interpolateSolution ()
 

Private Attributes

bool m_system_changed
 the slack More...
 
t_Ad m_Ad
 
t_Bd m_Bd
 discrete time system matrix future version: one Ad,Bd per time step More...
 
t_Ad m_Ad_p
 discrete time input matrix More...
 
t_Bd m_Bd_p
 system matrix for interpolation More...
 
std::vector< t_Ad * > m_Ad_powers
 input matrix for interpolation More...
 
t_resultfun m_resultfun
 powers of Ad, so these don't have to be recomputed online More...
 
t_wx m_wx
 
t_wx_end m_wx_end
 weights for states (will be put on main diagonal of Hx) More...
 
t_wu m_wu
 weights for states at endpoint More...
 
t_wu_end m_wu_end
 weights for inputs (will be put on main diagonal of Hu) More...
 
t_weps m_weps
 weights for inputs at endpoint More...
 
t_geps m_geps
 quadratic weights for slack (will be put in Heps) More...
 
t_lbx m_lbx
 linear weights for slack More...
 
t_ubx m_ubx
 lower bound on state trace More...
 
t_lbu_hard m_lbu_hard
 upper bound on state trace More...
 
t_ubu_hard m_ubu_hard
 lower bound on input trace, hard constraint going to lb More...
 
t_ubeps m_ubeps
 upper bound on input trace, hard constraint going to ub More...
 
t_x0 m_x0
 lbeps==0, softconstraints for x and/or u if ubeps>0 More...
 
t_y m_y
 initial state More...
 
t_y_flat m_y_flat
 desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3) More...
 
t_U m_U
 desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3) More...
 
t_U_flat m_U_flat
 the computed control [u(t_0),...,u(t_K-1)] More...
 
t_X m_X
 
t_X_flat m_X_flat
 the computed states [x(t_1),..., x(t_K)] More...
 
t_eps m_eps
 
t_uset m_uset
 
t_uset_flat m_uset_flat
 set point More...
 
dlib::matrix< real_t, N *K, 1 > m_E
 set point More...
 
dlib::matrix< real_t, N *K, R *K > m_F
 [pow(Ad,1);pow(Ad,2);...;pow(Ad,k)]*x0 More...
 
dlib::matrix< real_t, N *K, N *K > m_Hx
 [B,0,0,..0;AB,B,0,...0;AAB,AB,B,...,0;...;pow(A,k-1)B,pow(A,k-2)B,pow(A,k-3),B,...,B] More...
 
dlib::matrix< real_t, R *K, R *K > m_Hu
 
dlib::matrix< real_t, N, N > m_Heps
 
dlib::matrix< real_t, R *K, 1 > m_g1
 
dlib::matrix< real_t, R *K, R *K > m_H11
 first part of overall linear cost term, g=[F^T Hx E - F^T Hx y; geps]=[g1;geps] More...
 
dlib::matrix< real_t, N *K, nVm_A1
 upper left part of overal quadratic cost term H=[Hu + F^T Hx F, 0; 0, Heps]=[H11,0;0,Heps] More...
 
dlib::matrix< real_t, N *K, nVm_A2
 state soft constraints equation upper bound More...
 
qpOASES::QProblem * m_qproblem
 state soft constraints equation lower bound More...
 
real_t m_qpH [nV *nV]
 
real_t m_qpg [nV]
 
real_t m_qpA [nC *nV]
 
real_t m_qplb [nV]
 
real_t m_qpub [nV]
 
real_t m_qplbA [nC]
 
real_t m_qpubA [nC]
 
real_t m_qpxOpt [nV]
 
qpOASES::int_t m_qpnWSR_in
 
qpOASES::int_t m_qpnWSR_out
 qpOASES: "The integer argument nWSR speci es the maximum number of working set recalculations to be performed during the initial homotopy" More...
 
real_t m_qpcputime_in
 qpOASES: "The integer argument nWSR speci es the maximum number of working set recalculations to be performed during the initial homotopy" More...
 
real_t m_qpcputime_out
 qpOASES: "If cputime is not the null pointer, it contains the maximum allowed CPU time in seconds for the whole initialisation (and the actually required one on output)." More...
 

Detailed Description

template<int N, int R, int K, int P>
class adore::mad::LQ_OC_single_shooting< N, R, K, P >

LQ_OC_single_shooting - solves finite horizon linear quadratic optimal control problem with qpOASES and single shooting approach. The optimization variable [u0,u1,u2,...,u(k-1), eps] is used, with eps the slack in x dimensions used for soft-constraints. J= 1/2 (x-y)^T H(wx) (x-y) + 1/2 u^T H(wu) u + 1/2 eps^T H(weps) eps + eps^T geps N is the number of states, R is the number of inputs, K is the number of time steps during optimization and P is the number of interpolation steps.

Member Typedef Documentation

◆ real_t

template<int N, int R, int K, int P>
typedef qpOASES::real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::real_t

◆ t_Ad

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,N> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_Ad

number of linear system constraints in QP: upper and lower bounds for x and u separately due to slack

◆ t_Bd

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,R> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_Bd

discrete time system matrix future version: one Ad,Bd per time step

◆ t_eps

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_eps

the computed states [x(t_1),..., x(t_K)]

◆ t_geps

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_geps

quadratic weights for slack (will be put in Heps)

◆ t_lbu

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_lbu

upper bound on state trace

◆ t_lbu_hard

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_lbu_hard

upper bound on input trace

◆ t_lbx

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_lbx

linear weights for slack

◆ t_resultfun

template<int N, int R, int K, int P>
typedef adore::mad::LLinearPiecewiseFunctionM<double,N+R> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_resultfun

discrete time input matrix

◆ t_U

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_U

set point

◆ t_U_flat

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R*K,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_U_flat

the computed control [u(t_0),...,u(t_K-1)]

◆ t_ubeps

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_ubeps

upper bound on input trace, hard constraint going to ub

◆ t_ubu

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_ubu

lower bound on input trace

◆ t_ubu_hard

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_ubu_hard

lower bound on input trace, hard constraint going to lb

◆ t_ubx

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_ubx

lower bound on state trace

◆ t_uset

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_uset

desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3)

◆ t_uset_flat

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R*K,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_uset_flat

set point

◆ t_weps

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_weps

weights for inputs at endpoint

◆ t_wu

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_wu

weights for states at endpoint

◆ t_wu_end

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,R,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_wu_end

weights for inputs (will be put on main diagonal of Hu)

◆ t_wx

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_wx

function for result interpolation

◆ t_wx_end

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_wx_end

weights for states (will be put on main diagonal of Hx)

◆ t_X

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,K+1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_X

the computed control [u(t_0),...,u(t_K-1)]

◆ t_x0

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_x0

lbeps==0, softconstraints for x and/or u if ubeps>0

◆ t_X_flat

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N*(K+1),1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_X_flat

the computed states [x(t_1),..., x(t_K)]

◆ t_y

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N,K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_y

initial state

◆ t_y_flat

template<int N, int R, int K, int P>
typedef dlib::matrix<real_t,N*K,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::t_y_flat

desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3)

Constructor & Destructor Documentation

◆ LQ_OC_single_shooting()

template<int N, int R, int K, int P>
adore::mad::LQ_OC_single_shooting< N, R, K, P >::LQ_OC_single_shooting ( )
inline

constructor

Here is the call graph for this function:

◆ ~LQ_OC_single_shooting()

template<int N, int R, int K, int P>
virtual adore::mad::LQ_OC_single_shooting< N, R, K, P >::~LQ_OC_single_shooting ( )
inlinevirtual

destructor

Here is the call graph for this function:

Member Function Documentation

◆ Ad()

template<int N, int R, int K, int P>
t_Ad& adore::mad::LQ_OC_single_shooting< N, R, K, P >::Ad ( )
inline
Here is the caller graph for this function:

◆ Ad_p()

template<int N, int R, int K, int P>
t_Ad& adore::mad::LQ_OC_single_shooting< N, R, K, P >::Ad_p ( )
inline
Here is the caller graph for this function:

◆ Bd()

template<int N, int R, int K, int P>
t_Bd& adore::mad::LQ_OC_single_shooting< N, R, K, P >::Bd ( )
inline
Here is the caller graph for this function:

◆ Bd_p()

template<int N, int R, int K, int P>
t_Bd& adore::mad::LQ_OC_single_shooting< N, R, K, P >::Bd_p ( )
inline
Here is the caller graph for this function:

◆ compute()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::compute ( )
inline

execute optimization for given constraints and reference

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_hotstart()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::compute_hotstart ( )
inlineprivate

compute_hotstart - hotstart call to the qp solver: can only be used, if the quadratic term and the system dynamics have not changed. lower and upper bound values, linear cost terms, initial state may be modified before re-computing with hotstart. a reduced set of variables has to be provided to the qp solver, under the assumption that the other variables have not changed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_init()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::compute_init ( )
inlineprivate

compute_init - initial call to the qp solver: all information for description of the qp has to be provided

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_memory()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::delete_memory ( )
inlineprivate
Here is the caller graph for this function:

◆ eps()

template<int N, int R, int K, int P>
t_eps& adore::mad::LQ_OC_single_shooting< N, R, K, P >::eps ( )
inline

◆ geps()

template<int N, int R, int K, int P>
t_geps& adore::mad::LQ_OC_single_shooting< N, R, K, P >::geps ( )
inline
Here is the caller graph for this function:

◆ getCPUTime()

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::getCPUTime ( )
inline

◆ getnC()

template<int N, int R, int K, int P>
int adore::mad::LQ_OC_single_shooting< N, R, K, P >::getnC ( )
inline

◆ getnV()

template<int N, int R, int K, int P>
int adore::mad::LQ_OC_single_shooting< N, R, K, P >::getnV ( )
inline

◆ getnWSR()

template<int N, int R, int K, int P>
int adore::mad::LQ_OC_single_shooting< N, R, K, P >::getnWSR ( )
inline

◆ getQProblem()

template<int N, int R, int K, int P>
qpOASES::QProblem* adore::mad::LQ_OC_single_shooting< N, R, K, P >::getQProblem ( )
inline
Here is the caller graph for this function:

◆ idx()

template<int N, int R, int K, int P>
int adore::mad::LQ_OC_single_shooting< N, R, K, P >::idx ( int  row,
int  col,
int  nrows,
int  ncols 
) const
inlineprivate
Here is the caller graph for this function:

◆ initialize_interface_variables()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::initialize_interface_variables ( )
inlineprivate
Here is the caller graph for this function:

◆ initialize_intermediate_matrices()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::initialize_intermediate_matrices ( )
inlineprivate

initialize intermediate matrices with constants 0,1,-1, especially parts which are constant and not modified by updates

A1 := [F [-I;-I;-I;...-I] 0] --> x upper bound soft constraint

A2 := [F [I;I;I;...I] 0] --> x lower bound soft constraint

Here is the caller graph for this function:

◆ initialize_memory()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::initialize_memory ( )
inlineprivate
Here is the caller graph for this function:

◆ initialize_userdata_matrices()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::initialize_userdata_matrices ( )
inlineprivate

qpOASES: "If cputime is not the null pointer, it contains the maximum allowed CPU time in seconds for the whole initialisation (and the actually required one on output)."

Here is the caller graph for this function:

◆ interpolateSolution()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::interpolateSolution ( )
inlineprivate

interpolate the solution using Ad_p and Bd_p

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isFeasible()

template<int N, int R, int K, int P>
bool adore::mad::LQ_OC_single_shooting< N, R, K, P >::isFeasible ( ) const
inline

determine whether qpOASES deems problem feasible

Here is the caller graph for this function:

◆ isSolved()

template<int N, int R, int K, int P>
bool adore::mad::LQ_OC_single_shooting< N, R, K, P >::isSolved ( ) const
inline

determine whether qpOASES deems problem solved to given precision

Here is the caller graph for this function:

◆ lbu_hard()

template<int N, int R, int K, int P>
t_lbu_hard& adore::mad::LQ_OC_single_shooting< N, R, K, P >::lbu_hard ( )
inline
Here is the caller graph for this function:

◆ lbx()

template<int N, int R, int K, int P>
t_lbx& adore::mad::LQ_OC_single_shooting< N, R, K, P >::lbx ( )
inline
Here is the caller graph for this function:

◆ result_fun()

template<int N, int R, int K, int P>
t_resultfun& adore::mad::LQ_OC_single_shooting< N, R, K, P >::result_fun ( )
inline
Here is the caller graph for this function:

◆ retrieveSolution()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::retrieveSolution ( )
inlineprivate

retrieve solution from qpOASES

Here is the caller graph for this function:

◆ setEndTime()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::setEndTime ( double  Tend)
inline

redefine time steps according to supplied end time Tend

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMaxCPUTime()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::setMaxCPUTime ( real_t  value)
inline
Here is the caller graph for this function:

◆ setMaxnWSR()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::setMaxnWSR ( int  value)
inline

◆ setSystemChanged()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::setSystemChanged ( bool  value)
inline

recompute without hotstart

Here is the caller graph for this function:

◆ U()

template<int N, int R, int K, int P>
t_U& adore::mad::LQ_OC_single_shooting< N, R, K, P >::U ( )
inline

◆ ubeps()

template<int N, int R, int K, int P>
t_ubeps& adore::mad::LQ_OC_single_shooting< N, R, K, P >::ubeps ( )
inline
Here is the caller graph for this function:

◆ ubu_hard()

template<int N, int R, int K, int P>
t_ubu_hard& adore::mad::LQ_OC_single_shooting< N, R, K, P >::ubu_hard ( )
inline
Here is the caller graph for this function:

◆ ubx()

template<int N, int R, int K, int P>
t_ubx& adore::mad::LQ_OC_single_shooting< N, R, K, P >::ubx ( )
inline
Here is the caller graph for this function:

◆ update() [1/2]

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::update ( const t_x0 x0,
const t_y y,
const t_lbx lbx,
const t_ubx ubx 
)
inline

change initial value, reference and bounds

Here is the call graph for this function:

◆ update() [2/2]

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::update ( const t_x0 x0,
const t_y y,
const t_lbx lbx,
const t_ubx ubx,
const t_lbu_hard lbu_hard,
const t_ubu_hard ubu_hard,
const t_ubeps ubeps 
)
inline

change initial value, reference and bounds

Here is the call graph for this function:

◆ updateA1()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateA1 ( )
inlineprivate

A1 := [F [-I;-I;-I;...-I] 0] --> x upper bound soft constraint (set F part here)

Here is the caller graph for this function:

◆ updateA2()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateA2 ( )
inlineprivate
A2 := [F  [I;I;I;...I]  0]  --> x lower bound soft constraint

(set F part here)

Here is the caller graph for this function:

◆ updateAd()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateAd ( )
inlineprivate
Here is the caller graph for this function:

◆ updateE()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateE ( )
inlineprivate

E:=[pow(Ad,1) pow(Ad,2) : pow(Ad,k)]*x0

Here is the caller graph for this function:

◆ updateF()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateF ( )
inlineprivate

F:=[ B, 0, 0,... 0 AB, B, 0,... 0; AAB,AB, B,...,0; : pow(A,k-1)B,pow(A,k-2)B,pow(A,k-3),B,...,B], so that X=E+F*U

Here is the caller graph for this function:

◆ updateg1()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateg1 ( )
inlineprivate

g1:= F^T Hx E - F^T Hx y

Here is the caller graph for this function:

◆ updateH11()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateH11 ( )
inlineprivate

H11 := Hu + F^T Hx F

Here is the caller graph for this function:

◆ updateHeps()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateHeps ( )
inlineprivate

Heps:=diag(weps);.

Here is the caller graph for this function:

◆ updateHu()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateHu ( )
inlineprivate

Hu:=diag(wu)

Here is the caller graph for this function:

◆ updateHx()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateHx ( )
inlineprivate

Hx:=diag(wx)

Here is the caller graph for this function:

◆ updateqpA()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqpA ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateqpg()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqpg ( )
inlineprivate
Here is the caller graph for this function:

◆ updateqpH()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqpH ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateqplb()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqplb ( )
inlineprivate
Here is the caller graph for this function:

◆ updateqpub()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqpub ( )
inlineprivate
Here is the caller graph for this function:

◆ updateqpubA()

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateqpubA ( )
inlineprivate
Here is the caller graph for this function:

◆ updateSystem() [1/3]

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateSystem ( const t_Ad Ad,
const t_Bd Bd,
const t_wx wx,
const t_wu wu 
)
inline

change the system

Here is the call graph for this function:

◆ updateSystem() [2/3]

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateSystem ( const t_Ad Ad,
const t_Bd Bd,
const t_wx wx,
const t_wu wu,
const t_weps weps 
)
inline

change the system

Here is the call graph for this function:

◆ updateSystem() [3/3]

template<int N, int R, int K, int P>
void adore::mad::LQ_OC_single_shooting< N, R, K, P >::updateSystem ( const t_Ad Ad,
const t_Bd Bd,
const t_wx wx,
const t_wu wu,
const t_weps weps,
const t_geps geps 
)
inline

change the system

Here is the call graph for this function:

◆ uset()

template<int N, int R, int K, int P>
t_uset& adore::mad::LQ_OC_single_shooting< N, R, K, P >::uset ( )
inline
Here is the caller graph for this function:

◆ weps()

template<int N, int R, int K, int P>
t_weps& adore::mad::LQ_OC_single_shooting< N, R, K, P >::weps ( )
inline
Here is the caller graph for this function:

◆ wu()

template<int N, int R, int K, int P>
t_wu& adore::mad::LQ_OC_single_shooting< N, R, K, P >::wu ( )
inline
Here is the caller graph for this function:

◆ wu_end()

template<int N, int R, int K, int P>
t_wu_end& adore::mad::LQ_OC_single_shooting< N, R, K, P >::wu_end ( )
inline

◆ wx()

template<int N, int R, int K, int P>
t_wx& adore::mad::LQ_OC_single_shooting< N, R, K, P >::wx ( )
inline
Here is the caller graph for this function:

◆ wx_end()

template<int N, int R, int K, int P>
t_wx_end& adore::mad::LQ_OC_single_shooting< N, R, K, P >::wx_end ( )
inline
Here is the caller graph for this function:

◆ X()

template<int N, int R, int K, int P>
t_X& adore::mad::LQ_OC_single_shooting< N, R, K, P >::X ( )
inline

◆ x0()

template<int N, int R, int K, int P>
t_x0& adore::mad::LQ_OC_single_shooting< N, R, K, P >::x0 ( )
inline
Here is the caller graph for this function:

◆ y()

template<int N, int R, int K, int P>
t_y& adore::mad::LQ_OC_single_shooting< N, R, K, P >::y ( )
inline
Here is the caller graph for this function:

Member Data Documentation

◆ m_A1

template<int N, int R, int K, int P>
dlib::matrix<real_t,N*K,nV> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_A1
private

upper left part of overal quadratic cost term H=[Hu + F^T Hx F, 0; 0, Heps]=[H11,0;0,Heps]

◆ m_A2

template<int N, int R, int K, int P>
dlib::matrix<real_t,N*K,nV> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_A2
private

state soft constraints equation upper bound

◆ m_Ad

template<int N, int R, int K, int P>
t_Ad adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Ad
private

◆ m_Ad_p

template<int N, int R, int K, int P>
t_Ad adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Ad_p
private

discrete time input matrix

◆ m_Ad_powers

template<int N, int R, int K, int P>
std::vector<t_Ad*> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Ad_powers
private

input matrix for interpolation

◆ m_Bd

template<int N, int R, int K, int P>
t_Bd adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Bd
private

discrete time system matrix future version: one Ad,Bd per time step

◆ m_Bd_p

template<int N, int R, int K, int P>
t_Bd adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Bd_p
private

system matrix for interpolation

◆ m_E

template<int N, int R, int K, int P>
dlib::matrix<real_t,N*K,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_E
private

set point

◆ m_eps

template<int N, int R, int K, int P>
t_eps adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_eps
private

◆ m_F

template<int N, int R, int K, int P>
dlib::matrix<real_t,N*K,R*K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_F
private

[pow(Ad,1);pow(Ad,2);...;pow(Ad,k)]*x0

◆ m_g1

template<int N, int R, int K, int P>
dlib::matrix<real_t,R*K,1> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_g1
private

◆ m_geps

template<int N, int R, int K, int P>
t_geps adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_geps
private

quadratic weights for slack (will be put in Heps)

◆ m_H11

template<int N, int R, int K, int P>
dlib::matrix<real_t,R*K,R*K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_H11
private

first part of overall linear cost term, g=[F^T Hx E - F^T Hx y; geps]=[g1;geps]

◆ m_Heps

template<int N, int R, int K, int P>
dlib::matrix<real_t,N,N> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Heps
private

◆ m_Hu

template<int N, int R, int K, int P>
dlib::matrix<real_t,R*K,R*K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Hu
private

◆ m_Hx

template<int N, int R, int K, int P>
dlib::matrix<real_t,N*K,N*K> adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_Hx
private

[B,0,0,..0;AB,B,0,...0;AAB,AB,B,...,0;...;pow(A,k-1)B,pow(A,k-2)B,pow(A,k-3),B,...,B]

◆ m_lbu_hard

template<int N, int R, int K, int P>
t_lbu_hard adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_lbu_hard
private

upper bound on state trace

◆ m_lbx

template<int N, int R, int K, int P>
t_lbx adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_lbx
private

linear weights for slack

◆ m_qpA

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpA[nC *nV]
private

◆ m_qpcputime_in

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpcputime_in
private

qpOASES: "The integer argument nWSR speci es the maximum number of working set recalculations to be performed during the initial homotopy"

◆ m_qpcputime_out

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpcputime_out
private

qpOASES: "If cputime is not the null pointer, it contains the maximum allowed CPU time in seconds for the whole initialisation (and the actually required one on output)."

◆ m_qpg

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpg[nV]
private

◆ m_qpH

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpH[nV *nV]
private

◆ m_qplb

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qplb[nV]
private

◆ m_qplbA

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qplbA[nC]
private

◆ m_qpnWSR_in

template<int N, int R, int K, int P>
qpOASES::int_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpnWSR_in
private

◆ m_qpnWSR_out

template<int N, int R, int K, int P>
qpOASES::int_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpnWSR_out
private

qpOASES: "The integer argument nWSR speci es the maximum number of working set recalculations to be performed during the initial homotopy"

◆ m_qproblem

template<int N, int R, int K, int P>
qpOASES::QProblem* adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qproblem
private

state soft constraints equation lower bound

◆ m_qpub

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpub[nV]
private

◆ m_qpubA

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpubA[nC]
private

◆ m_qpxOpt

template<int N, int R, int K, int P>
real_t adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_qpxOpt[nV]
private

◆ m_resultfun

template<int N, int R, int K, int P>
t_resultfun adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_resultfun
private

powers of Ad, so these don't have to be recomputed online

◆ m_system_changed

template<int N, int R, int K, int P>
bool adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_system_changed
private

the slack

◆ m_U

template<int N, int R, int K, int P>
t_U adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_U
private

desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3)

◆ m_U_flat

template<int N, int R, int K, int P>
t_U_flat adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_U_flat
private

the computed control [u(t_0),...,u(t_K-1)]

◆ m_ubeps

template<int N, int R, int K, int P>
t_ubeps adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_ubeps
private

upper bound on input trace, hard constraint going to ub

◆ m_ubu_hard

template<int N, int R, int K, int P>
t_ubu_hard adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_ubu_hard
private

lower bound on input trace, hard constraint going to lb

◆ m_ubx

template<int N, int R, int K, int P>
t_ubx adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_ubx
private

lower bound on state trace

◆ m_uset

template<int N, int R, int K, int P>
t_uset adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_uset
private

◆ m_uset_flat

template<int N, int R, int K, int P>
t_uset_flat adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_uset_flat
private

set point

◆ m_weps

template<int N, int R, int K, int P>
t_weps adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_weps
private

weights for inputs at endpoint

◆ m_wu

template<int N, int R, int K, int P>
t_wu adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_wu
private

weights for states at endpoint

◆ m_wu_end

template<int N, int R, int K, int P>
t_wu_end adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_wu_end
private

weights for inputs (will be put on main diagonal of Hu)

◆ m_wx

template<int N, int R, int K, int P>
t_wx adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_wx
private

◆ m_wx_end

template<int N, int R, int K, int P>
t_wx_end adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_wx_end
private

weights for states (will be put on main diagonal of Hx)

◆ m_X

template<int N, int R, int K, int P>
t_X adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_X
private

◆ m_x0

template<int N, int R, int K, int P>
t_x0 adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_x0
private

lbeps==0, softconstraints for x and/or u if ubeps>0

◆ m_X_flat

template<int N, int R, int K, int P>
t_X_flat adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_X_flat
private

the computed states [x(t_1),..., x(t_K)]

◆ m_y

template<int N, int R, int K, int P>
t_y adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_y
private

initial state

◆ m_y_flat

template<int N, int R, int K, int P>
t_y_flat adore::mad::LQ_OC_single_shooting< N, R, K, P >::m_y_flat
private

desired states (reference) y=[y_0(t_1);y_1(t_1);y_2(t_1);y_0(t_2);y_1(t_2);y_2(t_2);...;y_0(t_K);y_1(t_K);y_2(t_K)] (for N=3)

◆ nC

template<int N, int R, int K, int P>
const int adore::mad::LQ_OC_single_shooting< N, R, K, P >::nC = 2*N*K
static

number of variables in the QP: var=[u;eps]

◆ nV

template<int N, int R, int K, int P>
const int adore::mad::LQ_OC_single_shooting< N, R, K, P >::nV = R*K + N
static

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