trapezoidal_collocation_edges.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Software License Agreement
4  *
5  * Copyright (c) 2020,
6  * TU Dortmund - Institute of Control Theory and Systems Engineering.
7  * All rights reserved.
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  *
22  * Authors: Christoph Rösmann
23  *********************************************************************/
24 
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_TRAPEZOIDAL_COLLOCATION_EDGES_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_TRAPEZOIDAL_COLLOCATION_EDGES_H_
27 
29 
34 
35 #include <functional>
36 #include <memory>
37 
38 namespace corbo {
39 
40 class TrapezoidalCollocationDynamicsOnlyEdge : public Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
41 {
42  public:
43  using Ptr = std::shared_ptr<TrapezoidalCollocationDynamicsOnlyEdge>;
44  using UPtr = std::unique_ptr<TrapezoidalCollocationDynamicsOnlyEdge>;
45 
46  explicit TrapezoidalCollocationDynamicsOnlyEdge(SystemDynamicsInterface::Ptr dynamics, VectorVertex& x1, VectorVertex& u1, VectorVertex& u2,
47  VectorVertex& x2, ScalarVertex& dt)
48  : Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>(x1, u1, u2, x2, dt), _dynamics(dynamics)
49  {
50  _f1.resize(_dynamics->getStateDimension());
51  _f2.resize(_dynamics->getStateDimension());
52  }
53 
54  virtual ~TrapezoidalCollocationDynamicsOnlyEdge() = default;
55 
56  // implements interface method
57  int getDimension() const override { return _dynamics ? _dynamics->getStateDimension() : 0; }
58  // implement in child class:
59  bool isLinear() const override { return false; }
60 
61  // bool providesJacobian() const override { return false; }
62 
63  bool isLeastSquaresForm() const override { return false; }
64 
65  void computeValues(Eigen::Ref<Eigen::VectorXd> values) override
66  {
67  assert(_dynamics);
68  assert(_f1.size() == _dynamics->getStateDimension());
69  assert(_f2.size() == _dynamics->getStateDimension());
70 
71  const VectorVertex* x1 = static_cast<const VectorVertex*>(_vertices[0]);
72  const VectorVertex* u1 = static_cast<const VectorVertex*>(_vertices[1]);
73  const VectorVertex* u2 = static_cast<const VectorVertex*>(_vertices[2]);
74  const VectorVertex* x2 = static_cast<const VectorVertex*>(_vertices[3]);
75  const ScalarVertex* dt = static_cast<const ScalarVertex*>(_vertices[4]);
76 
77  _dynamics->dynamics(x1->values(), u1->values(), _f1);
78  _dynamics->dynamics(x2->values(), u2->values(), _f2);
79 
80  values.noalias() = 0.5 * dt->value() * (_f1 + _f2) - (x2->values() - x1->values());
81  }
82 
83  protected:
84  private:
86 
87  Eigen::VectorXd _f1;
88  Eigen::VectorXd _f2;
89 
90  public:
92 };
93 
94 // TODO(roesmann): maybe a mixed edge for the uncompressed HS with linear control to compute uc just once.
95 class TrapezoidalCollocationIntegralCostEdge : public Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
96 {
97  public:
98  using Ptr = std::shared_ptr<TrapezoidalCollocationIntegralCostEdge>;
99  using UPtr = std::unique_ptr<TrapezoidalCollocationIntegralCostEdge>;
100 
102  StageCost::Ptr stage_cost, int k)
103  : Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>(x1, u1, u2, x2, dt), _stage_cost(stage_cost), _k(k)
104  {
105  assert(stage_cost);
106  assert(stage_cost->getIntegralStateControlTermDimension(_k) == 1);
107 
108  _cost1.resize(1);
109  _cost2.resize(1);
110  }
111 
112  virtual ~TrapezoidalCollocationIntegralCostEdge() = default;
113 
114  // implements interface method
115  int getDimension() const override { return 1; }
116 
117  // implement in child class:
118  bool isLinear() const override { return false; }
119 
120  // bool providesJacobian() const override { return false; }
121  bool isLeastSquaresForm() const override { return false; }
122 
124  {
125  const VectorVertex* x1 = static_cast<const VectorVertex*>(_vertices[0]);
126  const VectorVertex* u1 = static_cast<const VectorVertex*>(_vertices[1]);
127  const VectorVertex* u2 = static_cast<const VectorVertex*>(_vertices[2]);
128  const VectorVertex* x2 = static_cast<const VectorVertex*>(_vertices[3]);
129  const ScalarVertex* dt = static_cast<const ScalarVertex*>(_vertices[4]);
130 
131  _stage_cost->computeIntegralStateControlTerm(_k, x1->values(), u1->values(), _cost1);
132  _stage_cost->computeIntegralStateControlTerm(_k, x2->values(), u2->values(), _cost2);
133  values[0] = 0.5 * dt->value() * (_cost1[0] + _cost2[0]);
134  }
135 
136  private:
138 
139  int _k = 0;
140 
141  Eigen::VectorXd _cost1;
142  Eigen::VectorXd _cost2;
143 
144  public:
146 };
147 
148 class TrapezoidalCollocationIntegralEqualityDynamicsEdge : public Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
149 {
150  public:
151  using Ptr = std::shared_ptr<TrapezoidalCollocationIntegralEqualityDynamicsEdge>;
152  using UPtr = std::unique_ptr<TrapezoidalCollocationIntegralEqualityDynamicsEdge>;
153 
155  VectorVertex& u2, VectorVertex& x2, ScalarVertex& dt,
156  StageEqualityConstraint::Ptr stage_eq, int k)
158  _dynamics(dynamics),
159  _stage_eq(stage_eq),
160  _k(k)
161  {
162  _dim_dyn = _dynamics->getStateDimension();
163  _dim_int_eq = _stage_eq ? _stage_eq->getIntegralStateControlTermDimension(_k) : 0;
165 
166  _eq1.resize(_dim_int_eq);
167  _eq2.resize(_dim_int_eq);
168 
169  _f1.resize(_dim_dyn);
170  _f2.resize(_dim_dyn);
171  }
172 
174 
175  // implements interface method
176  int getDimension() const override { return _dim_eq; }
177 
178  // implement in child class:
179  bool isLinear() const override { return false; }
180 
181  // bool providesJacobian() const override { return false; }
182  bool isLeastSquaresForm() const override { return false; }
183 
184  void computeValues(Eigen::Ref<Eigen::VectorXd> values) override
185  {
186  const VectorVertex* x1 = static_cast<const VectorVertex*>(_vertices[0]);
187  const VectorVertex* u1 = static_cast<const VectorVertex*>(_vertices[1]);
188  const VectorVertex* u2 = static_cast<const VectorVertex*>(_vertices[2]);
189  const VectorVertex* x2 = static_cast<const VectorVertex*>(_vertices[3]);
190  const ScalarVertex* dt = static_cast<const ScalarVertex*>(_vertices[4]);
191 
192  _dynamics->dynamics(x1->values(), u1->values(), _f1);
193  _dynamics->dynamics(x2->values(), u2->values(), _f2);
194 
195  values.head(_dim_dyn).noalias() = 0.5 * dt->value() * (_f1 + _f2) - (x2->values() - x1->values());
196 
197  if (_dim_int_eq > 0)
198  {
199  _stage_eq->computeIntegralStateControlTerm(_k, x1->values(), u1->values(), _eq1);
200  _stage_eq->computeIntegralStateControlTerm(_k, x2->values(), u2->values(), _eq2);
201  values.tail(_dim_int_eq).noalias() = 0.5 * dt->value() * (_eq1 + _eq2);
202  }
203  }
204 
205  private:
207 
209 
210  int _dim_eq = 0;
211  int _dim_int_eq = 0;
212  int _dim_dyn = 0;
213 
214  Eigen::VectorXd _eq1;
215  Eigen::VectorXd _eq2;
216 
217  int _k = 0;
218 
219  Eigen::VectorXd _f1;
220  Eigen::VectorXd _f2;
221 
222  public:
224 };
225 
226 class TrapezoidalCollocationIntegralEqualityEdge : public Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
227 {
228  public:
229  using Ptr = std::shared_ptr<TrapezoidalCollocationIntegralEqualityEdge>;
230  using UPtr = std::unique_ptr<TrapezoidalCollocationIntegralEqualityEdge>;
231 
235  {
236  _dim_eq = _stage_eq ? _stage_eq->getIntegralStateControlTermDimension(_k) : 0;
237 
238  _eq1.resize(_dim_eq);
239  _eq2.resize(_dim_eq);
240  }
241 
243 
244  // implements interface method
245  int getDimension() const override { return _dim_eq; }
246 
247  // implement in child class:
248  bool isLinear() const override { return false; }
249 
250  // bool providesJacobian() const override { return false; }
251  bool isLeastSquaresForm() const override { return false; }
252 
253  void computeValues(Eigen::Ref<Eigen::VectorXd> values) override
254  {
255  const VectorVertex* x1 = static_cast<const VectorVertex*>(_vertices[0]);
256  const VectorVertex* u1 = static_cast<const VectorVertex*>(_vertices[1]);
257  const VectorVertex* u2 = static_cast<const VectorVertex*>(_vertices[2]);
258  const VectorVertex* x2 = static_cast<const VectorVertex*>(_vertices[3]);
259  const ScalarVertex* dt = static_cast<const ScalarVertex*>(_vertices[4]);
260 
261  _stage_eq->computeIntegralStateControlTerm(_k, x1->values(), u1->values(), _eq1);
262  _stage_eq->computeIntegralStateControlTerm(_k, x2->values(), u2->values(), _eq2);
263  values.noalias() = 0.5 * dt->value() * (_eq1 + _eq2);
264  }
265 
266  private:
268 
269  int _dim_eq = 0;
270 
271  Eigen::VectorXd _eq1;
272  Eigen::VectorXd _eq2;
273 
274  int _k = 0;
275 
276  public:
278 };
279 
280 class TrapezoidalCollocationIntegralInequalityEdge : public Edge<VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
281 {
282  public:
283  using Ptr = std::shared_ptr<TrapezoidalCollocationIntegralInequalityEdge>;
284  using UPtr = std::unique_ptr<TrapezoidalCollocationIntegralInequalityEdge>;
285 
287  StageInequalityConstraint::Ptr stage_ineq, int k)
289  {
290  _dim_ineq = _stage_ineq ? _stage_ineq->getIntegralStateControlTermDimension(_k) : 0;
291 
292  _ineq1.resize(_dim_ineq);
293  _ineq2.resize(_dim_ineq);
294  }
295 
297 
298  // implements interface method
299  int getDimension() const override { return _dim_ineq; }
300 
301  // implement in child class:
302  bool isLinear() const override { return false; }
303 
304  // bool providesJacobian() const override { return false; }
305 
306  bool isLeastSquaresForm() const override { return false; }
307 
309  {
310  const VectorVertex* x1 = static_cast<const VectorVertex*>(_vertices[0]);
311  const VectorVertex* u1 = static_cast<const VectorVertex*>(_vertices[1]);
312  const VectorVertex* u2 = static_cast<const VectorVertex*>(_vertices[2]);
313  const VectorVertex* x2 = static_cast<const VectorVertex*>(_vertices[3]);
314  const ScalarVertex* dt = static_cast<const ScalarVertex*>(_vertices[4]);
315 
316  _stage_ineq->computeIntegralStateControlTerm(_k, x1->values(), u1->values(), _ineq1);
317  _stage_ineq->computeIntegralStateControlTerm(_k, x2->values(), u2->values(), _ineq2);
318  values.noalias() = 0.5 * dt->value() * (_ineq1 + _ineq2);
319  }
320 
321  private:
323 
324  int _dim_ineq = 0;
325 
326  Eigen::VectorXd _ineq1;
327  Eigen::VectorXd _ineq2;
328 
329  int _k = 0;
330 
331  public:
333 };
334 
335 } // namespace corbo
336 
337 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_TRAPEZOIDAL_COLLOCATION_EDGES_H_
corbo::TrapezoidalCollocationDynamicsOnlyEdge::computeValues
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Definition: trapezoidal_collocation_edges.h:109
corbo::TrapezoidalCollocationIntegralCostEdge::TrapezoidalCollocationIntegralCostEdge
TrapezoidalCollocationIntegralCostEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &u2, VectorVertex &x2, ScalarVertex &dt, StageCost::Ptr stage_cost, int k)
Definition: trapezoidal_collocation_edges.h:123
corbo::TrapezoidalCollocationDynamicsOnlyEdge::isLeastSquaresForm
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Definition: trapezoidal_collocation_edges.h:107
system_dynamics_interface.h
corbo::TrapezoidalCollocationIntegralInequalityEdge::TrapezoidalCollocationIntegralInequalityEdge
TrapezoidalCollocationIntegralInequalityEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &u2, VectorVertex &x2, ScalarVertex &dt, StageInequalityConstraint::Ptr stage_ineq, int k)
Definition: trapezoidal_collocation_edges.h:308
corbo
Definition: communication/include/corbo-communication/utilities.h:37
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::isLinear
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
Definition: trapezoidal_collocation_edges.h:201
corbo::TrapezoidalCollocationDynamicsOnlyEdge::TrapezoidalCollocationDynamicsOnlyEdge
TrapezoidalCollocationDynamicsOnlyEdge(SystemDynamicsInterface::Ptr dynamics, VectorVertex &x1, VectorVertex &u1, VectorVertex &u2, VectorVertex &x2, ScalarVertex &dt)
Definition: trapezoidal_collocation_edges.h:90
corbo::TrapezoidalCollocationIntegralEqualityEdge::getDimension
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Definition: trapezoidal_collocation_edges.h:267
corbo::Edge< VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex >::Edge
Edge()=delete
corbo::TrapezoidalCollocationDynamicsOnlyEdge::UPtr
std::unique_ptr< TrapezoidalCollocationDynamicsOnlyEdge > UPtr
Definition: trapezoidal_collocation_edges.h:88
corbo::TrapezoidalCollocationIntegralCostEdge::isLinear
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
Definition: trapezoidal_collocation_edges.h:140
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::UPtr
std::unique_ptr< TrapezoidalCollocationIntegralEqualityDynamicsEdge > UPtr
Definition: trapezoidal_collocation_edges.h:174
corbo::StageInequalityConstraint::Ptr
std::shared_ptr< StageInequalityConstraint > Ptr
Definition: stage_functions.h:319
corbo::TrapezoidalCollocationIntegralEqualityEdge::_eq2
Eigen::VectorXd _eq2
Definition: trapezoidal_collocation_edges.h:294
scalar_vertex.h
corbo::TrapezoidalCollocationIntegralEqualityEdge::_stage_eq
StageEqualityConstraint::Ptr _stage_eq
Definition: trapezoidal_collocation_edges.h:289
corbo::TrapezoidalCollocationIntegralInequalityEdge::isLeastSquaresForm
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Definition: trapezoidal_collocation_edges.h:328
corbo::TrapezoidalCollocationDynamicsOnlyEdge::isLinear
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
Definition: trapezoidal_collocation_edges.h:103
vector_vertex.h
corbo::TrapezoidalCollocationIntegralCostEdge::_cost1
Eigen::VectorXd _cost1
Definition: trapezoidal_collocation_edges.h:163
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::isLeastSquaresForm
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Definition: trapezoidal_collocation_edges.h:204
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_f2
Eigen::VectorXd _f2
Definition: trapezoidal_collocation_edges.h:242
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_stage_eq
StageEqualityConstraint::Ptr _stage_eq
Definition: trapezoidal_collocation_edges.h:230
corbo::TrapezoidalCollocationDynamicsOnlyEdge::getDimension
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Definition: trapezoidal_collocation_edges.h:101
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::~TrapezoidalCollocationIntegralEqualityDynamicsEdge
virtual ~TrapezoidalCollocationIntegralEqualityDynamicsEdge()=default
corbo::TrapezoidalCollocationIntegralCostEdge::UPtr
std::unique_ptr< TrapezoidalCollocationIntegralCostEdge > UPtr
Definition: trapezoidal_collocation_edges.h:121
corbo::StageCost::Ptr
std::shared_ptr< StageCost > Ptr
Definition: stage_functions.h:155
corbo::TrapezoidalCollocationDynamicsOnlyEdge::_f1
Eigen::VectorXd _f1
Definition: trapezoidal_collocation_edges.h:131
corbo::VectorVertex::values
const Eigen::VectorXd & values() const
Read-access to the underlying value vector.
Definition: vector_vertex.h:284
corbo::TrapezoidalCollocationIntegralInequalityEdge::_ineq2
Eigen::VectorXd _ineq2
Definition: trapezoidal_collocation_edges.h:349
corbo::TrapezoidalCollocationIntegralInequalityEdge::computeValues
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Definition: trapezoidal_collocation_edges.h:330
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_f1
Eigen::VectorXd _f1
Definition: trapezoidal_collocation_edges.h:241
corbo::TrapezoidalCollocationIntegralCostEdge::~TrapezoidalCollocationIntegralCostEdge
virtual ~TrapezoidalCollocationIntegralCostEdge()=default
corbo::TrapezoidalCollocationDynamicsOnlyEdge::~TrapezoidalCollocationDynamicsOnlyEdge
virtual ~TrapezoidalCollocationDynamicsOnlyEdge()=default
corbo::TrapezoidalCollocationIntegralEqualityEdge::isLinear
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
Definition: trapezoidal_collocation_edges.h:270
corbo::TrapezoidalCollocationIntegralCostEdge::isLeastSquaresForm
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Definition: trapezoidal_collocation_edges.h:143
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge
Definition: trapezoidal_collocation_edges.h:170
corbo::TrapezoidalCollocationIntegralInequalityEdge::_ineq1
Eigen::VectorXd _ineq1
Definition: trapezoidal_collocation_edges.h:348
corbo::TrapezoidalCollocationIntegralEqualityEdge::TrapezoidalCollocationIntegralEqualityEdge
TrapezoidalCollocationIntegralEqualityEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &u2, VectorVertex &x2, ScalarVertex &dt, StageEqualityConstraint::Ptr stage_eq, int k)
Definition: trapezoidal_collocation_edges.h:254
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::TrapezoidalCollocationIntegralEqualityDynamicsEdge
TrapezoidalCollocationIntegralEqualityDynamicsEdge(SystemDynamicsInterface::Ptr dynamics, VectorVertex &x1, VectorVertex &u1, VectorVertex &u2, VectorVertex &x2, ScalarVertex &dt, StageEqualityConstraint::Ptr stage_eq, int k)
Definition: trapezoidal_collocation_edges.h:176
stage_functions.h
corbo::TrapezoidalCollocationIntegralEqualityEdge::isLeastSquaresForm
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Definition: trapezoidal_collocation_edges.h:273
corbo::TrapezoidalCollocationIntegralInequalityEdge
Definition: trapezoidal_collocation_edges.h:302
edge.h
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_dim_dyn
int _dim_dyn
Definition: trapezoidal_collocation_edges.h:234
corbo::TrapezoidalCollocationIntegralEqualityEdge::computeValues
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Definition: trapezoidal_collocation_edges.h:275
corbo::TrapezoidalCollocationIntegralInequalityEdge::_k
int _k
Definition: trapezoidal_collocation_edges.h:351
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition: Memory.h:690
corbo::SystemDynamicsInterface::Ptr
std::shared_ptr< SystemDynamicsInterface > Ptr
Definition: system_dynamics_interface.h:91
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_k
int _k
Definition: trapezoidal_collocation_edges.h:239
corbo::TrapezoidalCollocationIntegralCostEdge::Ptr
std::shared_ptr< TrapezoidalCollocationIntegralCostEdge > Ptr
Definition: trapezoidal_collocation_edges.h:120
corbo::TrapezoidalCollocationIntegralCostEdge::computeValues
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Definition: trapezoidal_collocation_edges.h:145
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_dim_int_eq
int _dim_int_eq
Definition: trapezoidal_collocation_edges.h:233
corbo::TrapezoidalCollocationIntegralEqualityEdge::_dim_eq
int _dim_eq
Definition: trapezoidal_collocation_edges.h:291
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_dim_eq
int _dim_eq
Definition: trapezoidal_collocation_edges.h:232
corbo::TrapezoidalCollocationDynamicsOnlyEdge::Ptr
std::shared_ptr< TrapezoidalCollocationDynamicsOnlyEdge > Ptr
Definition: trapezoidal_collocation_edges.h:87
Eigen::Ref
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:192
corbo::ScalarVertex::value
const double & value() const
Get underlying value.
Definition: scalar_vertex.h:225
corbo::TrapezoidalCollocationIntegralEqualityEdge::_k
int _k
Definition: trapezoidal_collocation_edges.h:296
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::Ptr
std::shared_ptr< TrapezoidalCollocationIntegralEqualityDynamicsEdge > Ptr
Definition: trapezoidal_collocation_edges.h:173
corbo::TrapezoidalCollocationIntegralInequalityEdge::isLinear
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
Definition: trapezoidal_collocation_edges.h:324
corbo::TrapezoidalCollocationIntegralInequalityEdge::~TrapezoidalCollocationIntegralInequalityEdge
virtual ~TrapezoidalCollocationIntegralInequalityEdge()=default
corbo::TrapezoidalCollocationIntegralInequalityEdge::getDimension
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Definition: trapezoidal_collocation_edges.h:321
corbo::TrapezoidalCollocationIntegralEqualityEdge
Definition: trapezoidal_collocation_edges.h:248
corbo::TrapezoidalCollocationIntegralCostEdge::getDimension
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Definition: trapezoidal_collocation_edges.h:137
corbo::ScalarVertex
Vertex implementation for scalar values.
Definition: scalar_vertex.h:72
corbo::TrapezoidalCollocationDynamicsOnlyEdge::_dynamics
SystemDynamicsInterface::Ptr _dynamics
Definition: trapezoidal_collocation_edges.h:129
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_eq2
Eigen::VectorXd _eq2
Definition: trapezoidal_collocation_edges.h:237
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_dynamics
SystemDynamicsInterface::Ptr _dynamics
Definition: trapezoidal_collocation_edges.h:228
corbo::TrapezoidalCollocationIntegralCostEdge::_stage_cost
StageCost::Ptr _stage_cost
Definition: trapezoidal_collocation_edges.h:159
corbo::Edge
Templated base edge class that stores an arbitary number of value.
Definition: edge.h:170
corbo::VectorVertex
Vertex implementation that stores an Eigen::VectorXd (dynamic dimension)
Definition: vector_vertex.h:73
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::getDimension
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Definition: trapezoidal_collocation_edges.h:198
corbo::TrapezoidalCollocationIntegralInequalityEdge::UPtr
std::unique_ptr< TrapezoidalCollocationIntegralInequalityEdge > UPtr
Definition: trapezoidal_collocation_edges.h:306
corbo::TrapezoidalCollocationIntegralCostEdge
Definition: trapezoidal_collocation_edges.h:117
corbo::TrapezoidalCollocationIntegralEqualityEdge::_eq1
Eigen::VectorXd _eq1
Definition: trapezoidal_collocation_edges.h:293
corbo::TrapezoidalCollocationIntegralCostEdge::_cost2
Eigen::VectorXd _cost2
Definition: trapezoidal_collocation_edges.h:164
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::_eq1
Eigen::VectorXd _eq1
Definition: trapezoidal_collocation_edges.h:236
corbo::TrapezoidalCollocationIntegralInequalityEdge::Ptr
std::shared_ptr< TrapezoidalCollocationIntegralInequalityEdge > Ptr
Definition: trapezoidal_collocation_edges.h:305
corbo::TrapezoidalCollocationIntegralInequalityEdge::_dim_ineq
int _dim_ineq
Definition: trapezoidal_collocation_edges.h:346
corbo::TrapezoidalCollocationIntegralCostEdge::_k
int _k
Definition: trapezoidal_collocation_edges.h:161
corbo::TrapezoidalCollocationIntegralInequalityEdge::_stage_ineq
StageInequalityConstraint::Ptr _stage_ineq
Definition: trapezoidal_collocation_edges.h:344
corbo::StageEqualityConstraint::Ptr
std::shared_ptr< StageEqualityConstraint > Ptr
Definition: stage_functions.h:301
corbo::TrapezoidalCollocationDynamicsOnlyEdge::_f2
Eigen::VectorXd _f2
Definition: trapezoidal_collocation_edges.h:132
corbo::TrapezoidalCollocationIntegralEqualityEdge::~TrapezoidalCollocationIntegralEqualityEdge
virtual ~TrapezoidalCollocationIntegralEqualityEdge()=default
corbo::TrapezoidalCollocationIntegralEqualityDynamicsEdge::computeValues
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Definition: trapezoidal_collocation_edges.h:206
corbo::Edge< VectorVertex, VectorVertex, VectorVertex, VectorVertex, ScalarVertex >::_vertices
const VertexContainer _vertices
Vertex container.
Definition: edge.h:258


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:07:08