1#ifndef CGMRES__CONTROL_INPUT_BOUNDS_HPP_
2#define CGMRES__CONTROL_INPUT_BOUNDS_HPP_
14template <
typename OCP,
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4>
19 constexpr int nub = OCP::nub;
20 if constexpr (nub > 0) {
23 for (
int i=0;
i<nub; ++
i) {
24 const auto ui = OCP::ubound_indices[
i];
26 +=
mu.coeff(
i) * (2.0*
u.coeff(
ui) - ocp.umin[
i] - ocp.umax[
i]);
31template <
typename OCP,
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4>
36 constexpr int nub = OCP::nub;
37 if constexpr (nub > 0) {
46template <
typename OCP,
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4>
51 constexpr int nub = OCP::nub;
52 if constexpr (nub > 0) {
56 for (
int i=0;
i<nub; ++
i) {
57 const auto ui = OCP::ubound_indices[
i];
59 =
u.coeff(
ui) * (
u.coeff(
ui) - ocp.umin[
i] - ocp.umax[
i])
87template <
typename OCP,
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4,
typename VectorType5>
94 constexpr int nub = OCP::nub;
95 if constexpr (nub > 0) {
98 for (
int i=0;
i<nub; ++
i) {
99 const auto ui = OCP::ubound_indices[
i];
106template <
typename OCP,
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4,
typename VectorType5>
113 constexpr int nub = OCP::nub;
114 if constexpr (nub > 0) {
117 for (
int i=0;
i<nub; ++
i) {
118 const auto ui = OCP::ubound_indices[
i];
126template <
typename VectorType>
129 const size_t nub =
dummy.size();
130 for (
size_t i=0;
i<nub; ++
i) {
#define CGMRES_EIGEN_CONST_CAST(TYPE, OBJ)
Definition macros.hpp:7
void retrieve_mu_update(const OCP &ocp, const MatrixBase< VectorType1 > &u, const MatrixBase< VectorType2 > &dummy, const MatrixBase< VectorType3 > &mu, const MatrixBase< VectorType4 > &u_update, const MatrixBase< VectorType5 > &mu_udpate)
Definition control_input_bounds.hpp:107
void clip_dummy(const MatrixBase< VectorType > &dummy, const Scalar min)
Definition control_input_bounds.hpp:127
void eval_hmu(const OCP &ocp, const MatrixBase< VectorType1 > &u, const MatrixBase< VectorType2 > &dummy, const MatrixBase< VectorType3 > &mu, const MatrixBase< VectorType4 > &hmu)
Definition control_input_bounds.hpp:47
void multiply_hmu_inv(const MatrixBase< VectorType1 > &dummy, const MatrixBase< VectorType2 > &mu, const MatrixBase< VectorType3 > &hdummy, const MatrixBase< VectorType4 > &hmu, const MatrixBase< VectorType5 > &hdummy_multiplied, const MatrixBase< VectorType6 > &hmu_multiplied)
Definition control_input_bounds.hpp:77
void retrieve_dummy_update(const OCP &ocp, const MatrixBase< VectorType1 > &u, const MatrixBase< VectorType2 > &dummy, const MatrixBase< VectorType3 > &mu, const MatrixBase< VectorType4 > &u_update, const MatrixBase< VectorType5 > &dummy_update)
Definition control_input_bounds.hpp:88
void multiply_hdummy_inv(const MatrixBase< VectorType1 > &dummy, const MatrixBase< VectorType2 > &mu, const MatrixBase< VectorType3 > &hdummy, const MatrixBase< VectorType4 > &hmu, const MatrixBase< VectorType5 > &hdummy_multiplied)
Definition control_input_bounds.hpp:67
void eval_hdummy(const OCP &ocp, const MatrixBase< VectorType1 > &u, const MatrixBase< VectorType2 > &dummy, const MatrixBase< VectorType3 > &mu, const MatrixBase< VectorType4 > &hdummy)
Definition control_input_bounds.hpp:32
void eval_hu(const OCP &ocp, const MatrixBase< VectorType1 > &u, const MatrixBase< VectorType2 > &dummy, const MatrixBase< VectorType3 > &mu, const MatrixBase< VectorType4 > &hu)
Definition control_input_bounds.hpp:15
Definition continuation_gmres.hpp:11
Eigen::Map< MatrixType > Map
Alias of Eigen::Map.
Definition types.hpp:54
double Scalar
Alias of double.
Definition types.hpp:15