56 template <
int STATE_DIM,
int CONTROL_DIM,
typename SCALAR =
double>
60 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
97 void setZero(
const int& nGenConstr = 0);
ct::core::StateControlMatrixArray< STATE_DIM, CONTROL_DIM, SCALAR > B_
Definition: LQOCProblem.hpp:207
bool isGeneralConstrained() const
Definition: LQOCProblem-impl.hpp:42
ct::core::StateMatrixArray< STATE_DIM, SCALAR > A_
affine, time-varying system dynamics in discrete time
Definition: LQOCProblem.hpp:206
state_box_constr_sparsity_array_t x_I_
Definition: LQOCProblem.hpp:236
ct::core::ControlMatrixArray< CONTROL_DIM, SCALAR > R_
Definition: LQOCProblem.hpp:219
ct::core::FeedbackArray< STATE_DIM, CONTROL_DIM, SCALAR > P_
LQ approximation of the cross terms of the cost function.
Definition: LQOCProblem.hpp:222
constr_control_jac_array_t D_
Definition: LQOCProblem.hpp:250
void setInputBoxConstraint(const int index, const int nConstr, const constr_vec_t &u_lb, const constr_vec_t &u_ub, const VectorXi &sp, const ct::core::ControlVector< CONTROL_DIM, SCALAR > &u_nom_abs)
set input box constraints at a specific index
Definition: LQOCProblem-impl.hpp:129
ct::core::StateVectorArray< STATE_DIM, SCALAR > b_
Definition: LQOCProblem.hpp:208
Eigen::Matrix< SCALAR, STATE_DIM, 1 > state_box_constr_vec_t
Definition: LQOCProblem.hpp:71
void setTerminalBoxConstraints(const int nConstr, const constr_vec_t &x_lb, const constr_vec_t &x_ub, const VectorXi &sp, const ct::core::StateVector< STATE_DIM, SCALAR > &x_nom_abs)
set box constraints for terminal stage
Definition: LQOCProblem-impl.hpp:217
Eigen::Matrix< SCALAR, CONTROL_DIM, 1 > input_box_constr_vec_t
Definition: LQOCProblem.hpp:70
std::vector< int > ng_
number of general inequality constraints
Definition: LQOCProblem.hpp:252
input_box_constr_array_t u_lb_
bounds of box constraints for input and state
Definition: LQOCProblem.hpp:225
Eigen::Matrix< SCALAR, -1, -1 > constr_state_jac_t
Definition: LQOCProblem.hpp:63
void setInputBoxConstraints(const int nConstr, const constr_vec_t &u_lb, const constr_vec_t &u_ub, const VectorXi &sp, const ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > &u_nom_abs)
set uniform input box constraints, with the same constraint being applied at each intermediate stage ...
Definition: LQOCProblem-impl.hpp:161
Eigen::Matrix< SCALAR, -1, -1 > constr_control_jac_t
Definition: LQOCProblem.hpp:64
ct::core::StateMatrixArray< STATE_DIM, SCALAR > Q_
Definition: LQOCProblem.hpp:215
void setGeneralConstraints(const constr_vec_t &d_lb, const constr_vec_t &d_ub, const constr_state_jac_t &C, const constr_control_jac_t &D)
set general (in)equaltiy constraints, with the same constraint applied at each stage ...
Definition: LQOCProblem-impl.hpp:248
constr_vec_array_t d_ub_
general constraint upper bound
Definition: LQOCProblem.hpp:247
const double dt
Definition: LQOCSolverTiming.cpp:18
Describes a cost function with a quadratic approximation, i.e. one that can compute first and second ...
Definition: CostFunctionQuadratic.hpp:29
std::vector< int > nbx_
the number of state box constraints at every stage.
Definition: LQOCProblem.hpp:242
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Eigen::Matrix< int, CONTROL_DIM, 1 > input_box_constr_sparsity_t
Definition: LQOCProblem.hpp:77
void setIntermediateStateBoxConstraint(const int index, const int nConstr, const constr_vec_t &x_lb, const constr_vec_t &x_ub, const VectorXi &sp, const ct::core::StateVector< STATE_DIM, SCALAR > &x_nom_abs)
set state box constraints at a specific index
Definition: LQOCProblem-impl.hpp:173
input_box_constr_sparsity_array_t u_I_
container for the box constraint sparsity pattern An example for how an element of this array might l...
Definition: LQOCProblem.hpp:235
int getNumberOfStages()
returns the number of discrete time steps in the LQOCP, including terminal stage
Definition: LQOCProblem-impl.hpp:51
state_box_constr_array_t x_ub_
Definition: LQOCProblem.hpp:228
Defines a Linear-Quadratic Optimal Control Problem, which is optionally constrained.
Definition: LQOCProblem.hpp:57
Eigen::VectorXi VectorXi
Definition: LQOCProblem.hpp:82
Eigen::Matrix< int, STATE_DIM, 1 > state_box_constr_sparsity_t
a vector indicating which box constraints are active and which not
Definition: LQOCProblem.hpp:76
constr_state_jac_array_t C_
linear general constraint matrices
Definition: LQOCProblem.hpp:249
void setZero(const int &nGenConstr=0)
set all member variables to zero
Definition: LQOCProblem-impl.hpp:92
bool isConstrained() const
return a flag indicating whether this LQOC Problem is constrained or not
Definition: LQOCProblem-impl.hpp:19
LQOCProblem(int N=0)
constructor
Definition: LQOCProblem-impl.hpp:13
constr_vec_array_t d_lb_
general constraint lower bound
Definition: LQOCProblem.hpp:245
void setIntermediateStateBoxConstraints(const int nConstr, const constr_vec_t &x_lb, const constr_vec_t &x_ub, const VectorXi &sp, const ct::core::StateVectorArray< STATE_DIM, SCALAR > &x_nom_abs)
set uniform state box constraints, with the same constraint being applied at each intermediate stage ...
Definition: LQOCProblem-impl.hpp:205
ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > rv_
LQ approximation of the pure control penalty.
Definition: LQOCProblem.hpp:218
std::vector< int > nbu_
the number of input box constraints at every stage.
Definition: LQOCProblem.hpp:239
ct::core::StateVectorArray< STATE_DIM, SCALAR > qv_
LQ approximation of the pure state penalty, including terminal state penalty.
Definition: LQOCProblem.hpp:214
bool isInputBoxConstrained() const
Definition: LQOCProblem-impl.hpp:24
void changeNumStages(int N)
change the number of discrete time steps in the LQOCP
Definition: LQOCProblem-impl.hpp:57
ct::core::ScalarArray< SCALAR > q_
constant term of in the LQ approximation of the cost function
Definition: LQOCProblem.hpp:211
Eigen::Matrix< SCALAR, -1, -1 > constr_vec_t
Definition: LQOCProblem.hpp:62
bool isStateBoxConstrained() const
Definition: LQOCProblem-impl.hpp:33
void setFromTimeInvariantLinearQuadraticProblem(ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > &linearSystem, ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR > &costFunction, const ct::core::StateVector< STATE_DIM, SCALAR > &stateOffset, const double dt)
a convenience method which constructs an unconstrained LQOC Problem from an LTI system and continuous...
Definition: LQOCProblem-impl.hpp:271
state_box_constr_array_t x_lb_
Definition: LQOCProblem.hpp:227
input_box_constr_array_t u_ub_
Definition: LQOCProblem.hpp:226