15 template <
size_t state_dim,
size_t control_dim>
27 derivative(
i) = state(
i);
31 derivative(j) += control(j);
39 template <
size_t state_dim,
size_t control_dim>
48 state_control_matrix_t
B_;
59 const double t = 0.0)
override 66 const double t = 0.0)
override 75 template <
size_t state_dim,
size_t control_dim>
79 Eigen::Matrix<double, state_dim, state_dim> Q;
82 Eigen::Matrix<double, control_dim, control_dim> R;
85 Eigen::Matrix<double, state_dim, 1> x_nominal = x_final;
86 Eigen::Matrix<double, control_dim, 1> u_nominal;
89 Eigen::Matrix<double, state_dim, state_dim> Q_final;
90 Q_final.setIdentity();
92 std::shared_ptr<CostFunctionQuadratic<state_dim, control_dim>> quadraticCostFunction(
95 return quadraticCostFunction;
void computeControlledDynamics(const core::StateVector< state_dim > &state, const core::Time &t, const core::ControlVector< control_dim > &control, core::StateVector< state_dim > &derivative) override
Definition: MIMOIntegrator.h:20
const state_matrix_t & getDerivativeState(const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
Definition: MIMOIntegrator.h:57
std::shared_ptr< CostFunctionQuadratic< state_dim, control_dim > > createMIMOIntegratorCostFunction(const core::StateVector< state_dim > &x_final)
Definition: MIMOIntegrator.h:76
const state_control_matrix_t & getDerivativeControl(const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
Definition: MIMOIntegrator.h:64
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
BASE::state_control_matrix_t state_control_matrix_t
Definition: MIMOIntegrator.h:45
MIMOIntegrator()
Definition: MIMOIntegrator.h:19
const size_t state_dim
Definition: ConstraintComparison.h:20
A simple quadratic cost function.
Definition: CostFunctionQuadraticSimple.hpp:23
Linear system class for the GNMS unit test.
Definition: MIMOIntegrator.h:40
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
MIMOIntegratorLinear * clone() const override
Definition: MIMOIntegrator.h:71
state_control_matrix_t B_
Definition: MIMOIntegrator.h:48
BASE::state_matrix_t state_matrix_t
Definition: MIMOIntegrator.h:44
MIMOIntegrator * clone() const override
Definition: MIMOIntegrator.h:35
for i
Definition: mpc_unittest_plotting.m:14
ct::core::StateVector< state_dim > x
Definition: LoadFromFileTest.cpp:20
Dynamics class for the GNMS unit test.
Definition: MIMOIntegrator.h:16
state_matrix_t A_
Definition: MIMOIntegrator.h:47
MIMOIntegratorLinear()
Definition: MIMOIntegrator.h:50
const size_t control_dim
Definition: ConstraintComparison.h:21