nmpc_fmpc
FmpcSolver.h
Go to the documentation of this file.
1 /* Author: Masaki Murooka */
2 
3 #pragma once
4 
5 #include <array>
6 #include <functional>
7 #include <memory>
8 
10 
11 namespace nmpc_fmpc
12 {
22 template<int StateDim, int InputDim, int IneqDim>
24 {
25 public:
28 
31 
34 
37 
40 
43 
46 
49 
52 
54  using IneqIneqDimMatrix = Eigen::Matrix<double, IneqDim, IneqDim>;
55 
56 public:
59  {
61  int print_level = 1;
62 
64  int horizon_steps = 100;
65 
67  int max_iter = 10;
68 
70  double kkt_error_thre = 1e-4;
71 
73  bool check_nan = true;
74 
77 
79  bool update_barrier_eps = true;
80 
82  bool break_if_llt_fails = false;
83 
85  bool enable_line_search = false;
86 
89  };
90 
92  enum class Status
93  {
95  Uninitialized = 0,
96 
98  Succeeded = 1,
99 
101  ErrorInForward = 2,
102 
104  ErrorInBackward = 3,
105 
107  ErrorInUpdate = 4,
108 
111 
114  };
115 
117  struct Variable
118  {
122  Variable(int _horizon_steps = 0);
123 
131  void reset(double _x, double _u, double _lambda, double _s, double _nu);
132 
136  bool containsNaN() const;
137 
140 
142  std::vector<StateDimVector> x_list;
143 
145  std::vector<InputDimVector> u_list;
146 
148  std::vector<StateDimVector> lambda_list;
149 
151  std::vector<IneqDimVector> s_list;
152 
154  std::vector<IneqDimVector> nu_list;
155 
157  int print_level = 1;
158  };
159 
161  struct Coefficient
162  {
168  Coefficient(int state_dim, int input_dim, int ineq_dim);
169 
173  Coefficient(int state_dim);
174 
178  bool containsNaN() const;
179 
182 
185 
188 
191 
194 
197 
200 
203 
206 
214 
217 
220 
223 
226 
228  int print_level = 1;
229  };
230 
232  struct TraceData
233  {
235  int iter = 0;
236 
238  double kkt_error = 0;
239 
241  double duration_coeff = 0;
242 
244  double duration_backward = 0;
245 
247  double duration_forward = 0;
248 
250  double duration_update = 0;
251  };
252 
255  {
257  double solve = 0;
258 
260  double setup = 0;
261 
263  double opt = 0;
264 
266  double coeff = 0;
267 
269  double backward = 0;
270 
272  double forward = 0;
273 
275  double update = 0;
276 
278  double gain_pre = 0;
279 
281  double gain_solve = 0;
282 
284  double gain_post = 0;
285 
287  double fraction = 0;
288  };
289 
290 public:
291  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
292 
296  FmpcSolver(const std::shared_ptr<FmpcProblem<StateDim, InputDim, IneqDim>> & problem) : problem_(problem) {}
297 
300  {
301  return config_;
302  }
303 
305  inline const Configuration & config() const
306  {
307  return config_;
308  }
309 
316  Status solve(double current_t, const StateDimVector & current_x, const Variable & initial_variable);
317 
319  inline const Variable & variable() const
320  {
321  return variable_;
322  }
323 
325  inline const std::vector<Coefficient> & coeffList() const
326  {
327  return coeff_list_;
328  }
329 
331  inline const std::vector<TraceData> & traceDataList() const
332  {
333  return trace_data_list_;
334  }
335 
338  {
339  return computation_duration_;
340  }
341 
345  void dumpTraceDataList(const std::string & file_path) const;
346 
347 protected:
349  void checkVariable() const;
350 
355  Status procOnce(int iter);
356 
360  double calcKktError(double barrier_eps) const;
361 
365  bool backwardPass();
366 
370  bool forwardPass();
371 
375  bool updateVariables();
376 
378  void setupMeritFunc();
379 
383  double calcMeritFunc(const Variable & variable) const;
384 
385 protected:
388 
390  std::shared_ptr<FmpcProblem<StateDim, InputDim, IneqDim>> problem_;
391 
394 
397 
399  std::vector<Coefficient> coeff_list_;
400 
402  std::vector<TraceData> trace_data_list_;
403 
406 
408  double current_t_ = 0;
409 
411  StateDimVector current_x_ = StateDimVector::Zero();
412 
414  double barrier_eps_ = 1e-4;
415 
417  double merit_const_scale_ = 0.0;
418 
420  double merit_func_ = 0.0;
421 
423  double merit_deriv_ = 0.0;
424 };
425 } // namespace nmpc_fmpc
426 
427 #include <nmpc_fmpc/FmpcSolver.hpp>
nmpc_fmpc::FmpcSolver::ComputationDuration::gain_pre
double gain_pre
Duration of pre-process for gain calculation (included in backward) [msec].
Definition: FmpcSolver.h:278
nmpc_fmpc::FmpcSolver::barrier_eps_
double barrier_eps_
Barrier parameter.
Definition: FmpcSolver.h:414
nmpc_fmpc::FmpcSolver::forwardPass
bool forwardPass()
Process forward pass a.k.a forward Riccati recursion.
Definition: FmpcSolver.hpp:668
nmpc_fmpc::FmpcSolver::solve
Status solve(double current_t, const StateDimVector &current_x, const Variable &initial_variable)
Solve optimization.
Definition: FmpcSolver.hpp:158
nmpc_fmpc::FmpcSolver::coeff_list_
std::vector< Coefficient > coeff_list_
Sequence of coefficients of linearized KKT condition.
Definition: FmpcSolver.h:399
nmpc_fmpc::FmpcSolver::Status::ErrorInUpdate
@ ErrorInUpdate
Error in update.
nmpc_fmpc::FmpcSolver::Configuration::check_nan
bool check_nan
Whether to check NaN.
Definition: FmpcSolver.h:73
nmpc_fmpc::FmpcSolver::TraceData::kkt_error
double kkt_error
KKT condition error.
Definition: FmpcSolver.h:238
nmpc_fmpc::FmpcSolver::Coefficient::containsNaN
bool containsNaN() const
Check whether NaN or infinity is containd.
Definition: FmpcSolver.hpp:134
nmpc_fmpc::FmpcProblem::StateDimVector
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateDimVector StateDimVector
Type of vector of state dimension.
Definition: FmpcProblem.h:19
nmpc_fmpc::FmpcSolver::TraceData
Data to trace optimization loop.
Definition: FmpcSolver.h:232
nmpc_fmpc::FmpcSolver::ComputationDuration::gain_post
double gain_post
Duration of post-process for gain calculation (included in backward) [msec].
Definition: FmpcSolver.h:284
nmpc_fmpc::FmpcSolver::Coefficient::B
StateInputDimMatrix B
First-order derivative of state equation w.r.t. input.
Definition: FmpcSolver.h:184
nmpc_fmpc::FmpcSolver::Coefficient::x_bar
StateDimVector x_bar
Definition: FmpcSolver.h:209
nmpc_fmpc::FmpcSolver::Configuration::init_complementary_variable
bool init_complementary_variable
Whether to initialize complementarity variables.
Definition: FmpcSolver.h:76
nmpc_fmpc::FmpcSolver::Variable::nu_list
std::vector< IneqDimVector > nu_list
Sequence of Lagrange multipliers of inequality constraints (nu[0], ..., nu[N-1])
Definition: FmpcSolver.h:154
nmpc_fmpc::FmpcSolver::Variable::s_list
std::vector< IneqDimVector > s_list
Sequence of slack variables of inequality constraints (s[0], ..., s[N-1])
Definition: FmpcSolver.h:151
nmpc_fmpc::FmpcProblem::IneqDimVector
Eigen::Matrix< double, IneqDim, 1 > IneqDimVector
Type of vector of inequality dimension.
Definition: FmpcProblem.h:25
nmpc_fmpc::FmpcSolver::Status::Uninitialized
@ Uninitialized
Uninitialized.
nmpc_fmpc::FmpcSolver::Coefficient::P
StateStateDimMatrix P
Coefficient matrix for lambda calculation.
Definition: FmpcSolver.h:225
nmpc_fmpc::FmpcSolver::ComputationDuration::backward
double backward
Duration to process backward pass (included in opt) [msec].
Definition: FmpcSolver.h:269
nmpc_fmpc::FmpcSolver::TraceData::duration_update
double duration_update
Duration to update variables [msec].
Definition: FmpcSolver.h:250
nmpc_fmpc::FmpcSolver::ComputationDuration
Data of computation duration.
Definition: FmpcSolver.h:254
nmpc_fmpc::FmpcSolver::variable
const Variable & variable() const
Const accessor to optimization variables.
Definition: FmpcSolver.h:319
nmpc_fmpc::FmpcSolver::computation_duration_
ComputationDuration computation_duration_
Computation duration data.
Definition: FmpcSolver.h:405
nmpc_fmpc::FmpcProblem::InputDimVector
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputDimVector InputDimVector
Type of vector of input dimension.
Definition: FmpcProblem.h:22
nmpc_fmpc::FmpcSolver::setupMeritFunc
void setupMeritFunc()
Setup the merit function and its directional derivative.
Definition: FmpcSolver.hpp:837
nmpc_fmpc::FmpcSolver::TraceData::iter
int iter
Iteration of optimization loop.
Definition: FmpcSolver.h:235
nmpc_fmpc::FmpcSolver::Variable::horizon_steps
int horizon_steps
Number of steps in horizon.
Definition: FmpcSolver.h:139
nmpc_fmpc::FmpcSolver::TraceData::duration_coeff
double duration_coeff
Duration to calculate coefficients [msec].
Definition: FmpcSolver.h:241
nmpc_fmpc::FmpcSolver::computationDuration
const ComputationDuration & computationDuration() const
Const accessor to computation duration.
Definition: FmpcSolver.h:337
nmpc_fmpc::FmpcSolver::IneqStateDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::IneqStateDimMatrix IneqStateDimMatrix
Type of matrix of inequality x state dimension.
Definition: FmpcSolver.h:48
nmpc_fmpc::FmpcSolver::config
Configuration & config()
Accessor to configuration.
Definition: FmpcSolver.h:299
nmpc_fmpc::FmpcSolver::Coefficient::K
InputStateDimMatrix K
Feedback gain for input w.r.t. state error.
Definition: FmpcSolver.h:219
nmpc_fmpc::FmpcSolver::Configuration
Configuration.
Definition: FmpcSolver.h:58
nmpc_fmpc::FmpcSolver::current_x_
StateDimVector current_x_
Current state.
Definition: FmpcSolver.h:411
nmpc_fmpc::FmpcSolver::delta_variable_
Variable delta_variable_
Update amount of optimization variables.
Definition: FmpcSolver.h:396
nmpc_fmpc::FmpcSolver::Variable::lambda_list
std::vector< StateDimVector > lambda_list
Sequence of Lagrange multipliers of equality constraints (lambda[0], ..., lambda[N-1],...
Definition: FmpcSolver.h:148
nmpc_fmpc::FmpcSolver::problem_
std::shared_ptr< FmpcProblem< StateDim, InputDim, IneqDim > > problem_
FMPC problem.
Definition: FmpcSolver.h:390
nmpc_fmpc::FmpcSolver::Coefficient::Coefficient
Coefficient(int state_dim, int input_dim, int ineq_dim)
Constructor.
Definition: FmpcSolver.hpp:98
nmpc_fmpc::FmpcSolver::Configuration::break_if_llt_fails
bool break_if_llt_fails
Whether to break if LLT decomposition fails.
Definition: FmpcSolver.h:82
nmpc_fmpc::FmpcSolver::Status::Succeeded
@ Succeeded
Succeeded.
nmpc_fmpc::FmpcSolver::Coefficient::k
InputDimVector k
Feedforward term for input.
Definition: FmpcSolver.h:216
nmpc_fmpc::FmpcProblem::StateInputDimMatrix
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateInputDimMatrix StateInputDimMatrix
Type of matrix of state x input dimension.
Definition: FmpcProblem.h:34
nmpc_fmpc::FmpcSolver::Configuration::update_barrier_eps
bool update_barrier_eps
Whether to update barrier parameter.
Definition: FmpcSolver.h:79
nmpc_fmpc::FmpcSolver::IneqDimVector
typename FmpcProblem< StateDim, InputDim, IneqDim >::IneqDimVector IneqDimVector
Type of vector of inequality dimension.
Definition: FmpcSolver.h:33
nmpc_fmpc::FmpcSolver::Status::ErrorInForward
@ ErrorInForward
Error in forward.
nmpc_fmpc::FmpcSolver::IneqInputDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::IneqInputDimMatrix IneqInputDimMatrix
Type of matrix of inequality x input dimension.
Definition: FmpcSolver.h:51
nmpc_fmpc::FmpcSolver::Status::IterationContinued
@ IterationContinued
Iteration continued (used internally only)
nmpc_fmpc::FmpcSolver::InputDimVector
typename FmpcProblem< StateDim, InputDim, IneqDim >::InputDimVector InputDimVector
Type of vector of input dimension.
Definition: FmpcSolver.h:30
nmpc_fmpc::FmpcSolver::ComputationDuration::fraction
double fraction
Duration to calculate fraction-to-boundary rule (included in update) [msec].
Definition: FmpcSolver.h:287
nmpc_fmpc::FmpcSolver::Status::ErrorInBackward
@ ErrorInBackward
Error in backward.
nmpc_fmpc::FmpcSolver::backwardPass
bool backwardPass()
Process backward pass a.k.a backward Riccati recursion.
Definition: FmpcSolver.hpp:524
nmpc_fmpc::FmpcProblem
Fast MPC problem.
Definition: FmpcProblem.h:15
nmpc_fmpc::FmpcSolver::Coefficient::g_bar
IneqDimVector g_bar
Definition: FmpcSolver.h:210
nmpc_fmpc::FmpcSolver::Variable::u_list
std::vector< InputDimVector > u_list
Sequence of input (u[0], ..., u[N-1])
Definition: FmpcSolver.h:145
nmpc_fmpc::FmpcSolver::traceDataList
const std::vector< TraceData > & traceDataList() const
Const accessor to trace data list.
Definition: FmpcSolver.h:331
nmpc_fmpc::FmpcProblem::IneqInputDimMatrix
Eigen::Matrix< double, IneqDim, InputDim > IneqInputDimMatrix
Type of matrix of inequality x input dimension.
Definition: FmpcProblem.h:43
nmpc_fmpc::FmpcProblem::IneqStateDimMatrix
Eigen::Matrix< double, IneqDim, StateDim > IneqStateDimMatrix
Type of matrix of inequality x state dimension.
Definition: FmpcProblem.h:40
nmpc_fmpc::FmpcSolver::Variable::containsNaN
bool containsNaN() const
Check whether NaN or infinity is containd.
Definition: FmpcSolver.hpp:71
nmpc_fmpc::FmpcSolver::TraceData::duration_forward
double duration_forward
Duration to process forward pass [msec].
Definition: FmpcSolver.h:247
nmpc_fmpc::FmpcSolver::Variable::Variable
Variable(int _horizon_steps=0)
Constructor.
Definition: FmpcSolver.hpp:32
nmpc_fmpc::FmpcSolver::Variable
Optimization variables.
Definition: FmpcSolver.h:117
nmpc_fmpc::FmpcSolver::Coefficient
Coefficients of linearized KKT condition.
Definition: FmpcSolver.h:161
nmpc_fmpc::FmpcSolver::merit_func_
double merit_func_
Merit function.
Definition: FmpcSolver.h:420
nmpc_fmpc::FmpcSolver::calcMeritFunc
double calcMeritFunc(const Variable &variable) const
Calculate merit function.
Definition: FmpcSolver.hpp:936
nmpc_fmpc::FmpcSolver::variable_
Variable variable_
Optimization variables.
Definition: FmpcSolver.h:393
nmpc_fmpc::FmpcSolver::FmpcSolver
EIGEN_MAKE_ALIGNED_OPERATOR_NEW FmpcSolver(const std::shared_ptr< FmpcProblem< StateDim, InputDim, IneqDim >> &problem)
Constructor.
Definition: FmpcSolver.h:296
nmpc_fmpc::FmpcSolver::dumpTraceDataList
void dumpTraceDataList(const std::string &file_path) const
Dump trace data list.
Definition: FmpcSolver.hpp:260
nmpc_fmpc::FmpcSolver::InputInputDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::InputInputDimMatrix InputInputDimMatrix
Type of matrix of input x input dimension.
Definition: FmpcSolver.h:39
nmpc_fmpc::FmpcSolver::trace_data_list_
std::vector< TraceData > trace_data_list_
Sequence of trace data.
Definition: FmpcSolver.h:402
nmpc_fmpc::FmpcSolver::Coefficient::Lu_bar
InputDimVector Lu_bar
Definition: FmpcSolver.h:212
FmpcProblem.h
nmpc_fmpc::FmpcSolver::Status::MaxIterationReached
@ MaxIterationReached
Maximum iteration reached.
nmpc_fmpc::FmpcSolver::ComputationDuration::update
double update
Duration to update variables (included in opt) [msec].
Definition: FmpcSolver.h:275
nmpc_fmpc::FmpcSolver::Configuration::horizon_steps
int horizon_steps
Number of steps in horizon.
Definition: FmpcSolver.h:64
nmpc_fmpc::FmpcSolver::Coefficient::print_level
int print_level
Print level (0: no print, 1: print only important, 2: print verbose, 3: print very verbose)
Definition: FmpcSolver.h:228
nmpc_fmpc::FmpcSolver::calcKktError
double calcKktError(double barrier_eps) const
Calculate KKT condition error.
Definition: FmpcSolver.hpp:496
nmpc_fmpc::FmpcSolver::Coefficient::Luu
InputInputDimMatrix Luu
Second-order derivative of running cost w.r.t. input.
Definition: FmpcSolver.h:202
nmpc_fmpc::FmpcSolver::Configuration::enable_line_search
bool enable_line_search
Whether to enable line search.
Definition: FmpcSolver.h:85
nmpc_fmpc::FmpcSolver::Status
Status
Result status.
Definition: FmpcSolver.h:92
nmpc_fmpc::FmpcSolver::Configuration::print_level
int print_level
Print level (0: no print, 1: print only important, 2: print verbose, 3: print very verbose)
Definition: FmpcSolver.h:61
nmpc_fmpc::FmpcSolver::current_t_
double current_t_
Current time [sec].
Definition: FmpcSolver.h:408
nmpc_fmpc::FmpcSolver::StateStateDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::StateStateDimMatrix StateStateDimMatrix
Type of matrix of state x state dimension.
Definition: FmpcSolver.h:36
nmpc_fmpc::FmpcSolver::Variable::print_level
int print_level
Print level (0: no print, 1: print only important, 2: print verbose, 3: print very verbose)
Definition: FmpcSolver.h:157
nmpc_fmpc::FmpcSolver::coeffList
const std::vector< Coefficient > & coeffList() const
Const accessor to sequence of coefficients of linearized KKT condition.
Definition: FmpcSolver.h:325
nmpc_fmpc::FmpcProblem::InputStateDimMatrix
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputStateDimMatrix InputStateDimMatrix
Type of matrix of input x state dimension.
Definition: FmpcProblem.h:37
nmpc_fmpc::FmpcSolver::TraceData::duration_backward
double duration_backward
Duration to process backward pass [msec].
Definition: FmpcSolver.h:244
nmpc_fmpc::FmpcSolver::Variable::reset
void reset(double _x, double _u, double _lambda, double _s, double _nu)
Reset variables.
Definition: FmpcSolver.hpp:42
nmpc_fmpc::FmpcSolver::Coefficient::Lxx
StateStateDimMatrix Lxx
Second-order derivative of running cost w.r.t. state.
Definition: FmpcSolver.h:199
nmpc_fmpc::FmpcSolver::ComputationDuration::solve
double solve
Duration to solve [msec].
Definition: FmpcSolver.h:257
nmpc_fmpc::FmpcSolver::Configuration::max_iter
int max_iter
Maximum iteration of optimization loop.
Definition: FmpcSolver.h:67
nmpc_fmpc::FmpcSolver::checkVariable
void checkVariable() const
Check optimization variables.
Definition: FmpcSolver.hpp:285
nmpc_fmpc::FmpcProblem::StateStateDimMatrix
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::StateStateDimMatrix StateStateDimMatrix
Type of matrix of state x state dimension.
Definition: FmpcProblem.h:28
nmpc_fmpc::FmpcSolver::config
const Configuration & config() const
Const accessor to configuration.
Definition: FmpcSolver.h:305
nmpc_fmpc::FmpcSolver::ComputationDuration::opt
double opt
Duration of optimization loop (included in solve) [msec].
Definition: FmpcSolver.h:263
nmpc_fmpc::FmpcSolver::merit_const_scale_
double merit_const_scale_
Scale of constraint errors in the merit function.
Definition: FmpcSolver.h:417
nmpc_fmpc::FmpcSolver::StateDimVector
typename FmpcProblem< StateDim, InputDim, IneqDim >::StateDimVector StateDimVector
Type of vector of state dimension.
Definition: FmpcSolver.h:27
nmpc_fmpc::FmpcSolver::updateVariables
bool updateVariables()
Update optimization variables given Newton-step direction.
Definition: FmpcSolver.hpp:711
nmpc_fmpc::FmpcSolver::Coefficient::s
StateDimVector s
Offset vector for lambda calculation.
Definition: FmpcSolver.h:222
nmpc_fmpc::FmpcSolver::IneqIneqDimMatrix
Eigen::Matrix< double, IneqDim, IneqDim > IneqIneqDimMatrix
Type of matrix of inequality x inequality dimension.
Definition: FmpcSolver.h:54
nmpc_fmpc::FmpcSolver::Configuration::merit_const_scale_from_lagrange_multipliers
bool merit_const_scale_from_lagrange_multipliers
Whether to calculate the scale of constraint errors in the merit function from Lagrange multipliers.
Definition: FmpcSolver.h:88
nmpc_fmpc::FmpcProblem::InputInputDimMatrix
typename nmpc_ddp::DDPProblem< StateDim, InputDim >::InputInputDimMatrix InputInputDimMatrix
Type of matrix of input x input dimension.
Definition: FmpcProblem.h:31
nmpc_fmpc::FmpcSolver::config_
Configuration config_
Configuration.
Definition: FmpcSolver.h:387
nmpc_fmpc::FmpcSolver::Coefficient::Lu
InputDimVector Lu
First-order derivative of running cost w.r.t. input.
Definition: FmpcSolver.h:196
nmpc_fmpc::FmpcSolver::Coefficient::C
IneqStateDimMatrix C
First-order derivative of inequality constraints w.r.t. state.
Definition: FmpcSolver.h:187
nmpc_fmpc
Definition: FmpcProblem.h:7
nmpc_fmpc::FmpcSolver::Coefficient::Lx_bar
StateDimVector Lx_bar
Definition: FmpcSolver.h:211
nmpc_fmpc::FmpcSolver::Coefficient::A
StateStateDimMatrix A
First-order derivative of state equation w.r.t. state.
Definition: FmpcSolver.h:181
nmpc_fmpc::FmpcSolver::Variable::x_list
std::vector< StateDimVector > x_list
Sequence of state (x[0], ..., x[N-1], x[N])
Definition: FmpcSolver.h:142
nmpc_fmpc::FmpcSolver::Coefficient::D
IneqInputDimMatrix D
First-order derivative of inequality constraints w.r.t. input.
Definition: FmpcSolver.h:190
nmpc_fmpc::FmpcSolver::procOnce
Status procOnce(int iter)
Process one iteration.
Definition: FmpcSolver.hpp:365
nmpc_fmpc::FmpcSolver::ComputationDuration::setup
double setup
Duration to setup (included in solve) [msec].
Definition: FmpcSolver.h:260
nmpc_fmpc::FmpcSolver::Coefficient::Lxu
StateInputDimMatrix Lxu
Second-order derivative of running cost w.r.t. state and input.
Definition: FmpcSolver.h:205
nmpc_fmpc::FmpcSolver::ComputationDuration::gain_solve
double gain_solve
Duration to solve linear equation for gain calculation (included in backward) [msec].
Definition: FmpcSolver.h:281
nmpc_fmpc::FmpcSolver
FMPC solver.
Definition: FmpcSolver.h:23
nmpc_fmpc::FmpcSolver::InputStateDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::InputStateDimMatrix InputStateDimMatrix
Type of matrix of input x state dimension.
Definition: FmpcSolver.h:45
nmpc_fmpc::FmpcSolver::Configuration::kkt_error_thre
double kkt_error_thre
Threshold of KKT condition error.
Definition: FmpcSolver.h:70
nmpc_fmpc::FmpcSolver::merit_deriv_
double merit_deriv_
Directional derivative of merit function.
Definition: FmpcSolver.h:423
nmpc_fmpc::FmpcSolver::ComputationDuration::forward
double forward
Duration to process forward pass (included in opt) [msec].
Definition: FmpcSolver.h:272
FmpcSolver.hpp
nmpc_fmpc::FmpcSolver::Coefficient::Lx
StateDimVector Lx
First-order derivative of running cost w.r.t. state.
Definition: FmpcSolver.h:193
nmpc_fmpc::FmpcSolver::StateInputDimMatrix
typename FmpcProblem< StateDim, InputDim, IneqDim >::StateInputDimMatrix StateInputDimMatrix
Type of matrix of state x input dimension.
Definition: FmpcSolver.h:42
nmpc_fmpc::FmpcSolver::ComputationDuration::coeff
double coeff
Duration to calculate coefficients (included in opt) [msec].
Definition: FmpcSolver.h:266