1#ifndef CGMRES__CONTROL_INPUT_BOUNDS_SHOOTING_HPP_
2#define CGMRES__CONTROL_INPUT_BOUNDS_SHOOTING_HPP_
15template <
typename OCP,
int N>
20 if constexpr (OCP::nub > 0) {
21 constexpr int nuc = OCP::nuc;
22 for (
size_t i=0; i<N; ++i) {
23 eval_hu(ocp, solution.template segment<nuc>(nuc*i), dummy[i], mu[i],
24 fonc_hu.template segment<nuc>(nuc*i));
29template <
typename OCP,
int N>
34 if constexpr (OCP::nub > 0) {
35 constexpr int nuc = OCP::nuc;
36 for (
size_t i=0; i<N; ++i) {
37 eval_hdummy(ocp, solution.template segment<nuc>(nuc*i), dummy[i], mu[i],
43template <
typename OCP,
int N>
48 if constexpr (OCP::nub > 0) {
49 constexpr int nuc = OCP::nuc;
50 for (
size_t i=0; i<N; ++i) {
51 eval_hmu(ocp, solution.template segment<nuc>(nuc*i), dummy[i], mu[i],
57template <
typename OCP,
int N>
63 if constexpr (OCP::nub > 0) {
64 for (
size_t i=0; i<N; ++i) {
71template <
typename OCP,
int N>
78 if constexpr (OCP::nub > 0) {
79 for (
size_t i=0; i<N; ++i) {
81 fonc_hdummy_inv[i], fonc_hmu_inv[i]);
86template <
typename OCP,
int N>
93 if constexpr (OCP::nub > 0) {
94 constexpr int nuc = OCP::nuc;
95 for (
size_t i=0; i<N; ++i) {
97 solution_update.template segment<nuc>(nuc*i), dummy_update[i]);
102template <
typename OCP,
int N>
109 if constexpr (OCP::nub > 0) {
110 constexpr int nuc = OCP::nuc;
111 for (
size_t i=0; i<N; ++i) {
113 solution_update.template segment<nuc>(nuc*i), mu_update[i]);
118template <
typename OCP,
int N>
120 if constexpr (OCP::nub > 0) {
121 for (
size_t i=0; i<N; ++i) {
void retrive_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 retrive_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 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 eval_fonc_hmu(const OCP &ocp, const Vector< OCP::nuc *N > &solution, const std::array< Vector< OCP::nub >, N > &dummy, const std::array< Vector< OCP::nub >, N > &mu, std::array< Vector< OCP::nub >, N > &fonc_hmu)
Definition: control_input_bounds_shooting.hpp:44
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_fonc_hdummy(const OCP &ocp, const Vector< OCP::nuc *N > &solution, const std::array< Vector< OCP::nub >, N > &dummy, const std::array< Vector< OCP::nub >, N > &mu, std::array< Vector< OCP::nub >, N > &fonc_hdummy)
Definition: control_input_bounds_shooting.hpp:30
void eval_fonc_hu(const OCP &ocp, const Vector< OCP::nuc *N > &solution, const std::array< Vector< OCP::nub >, N > &dummy, const std::array< Vector< OCP::nub >, N > &mu, Vector< OCP::nuc *N > &fonc_hu)
Definition: control_input_bounds_shooting.hpp:16
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::Matrix< Scalar, size, 1 > Vector
Alias of Eigen::Vector.
Definition: types.hpp:23
double Scalar
Alias of double.
Definition: types.hpp:11