- 3.0.2 optimal control module.
NLOCBackendST.hpp
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 
7 #pragma once
8 
9 #include "NLOCBackendBase.hpp"
11 
12 namespace ct {
13 namespace optcon {
14 
15 
19 template <size_t STATE_DIM,
20  size_t CONTROL_DIM,
21  size_t P_DIM,
22  size_t V_DIM,
23  typename SCALAR = double,
24  bool CONTINUOUS = true>
25 class NLOCBackendST final : public NLOCBackendBase<STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS>
26 {
27 public:
28  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29 
31  typedef typename Base::OptConProblem_t OptConProblem_t;
32 
33  NLOCBackendST(const OptConProblem_t& optConProblem, const NLOptConSettings& settings);
34 
35  NLOCBackendST(const OptConProblem_t& optConProblem,
36  const std::string& settingsFile,
37  bool verbose = true,
38  const std::string& ns = "alg");
39 
40  virtual ~NLOCBackendST();
41 
42 protected:
43  virtual void computeLQApproximation(size_t firstIndex, size_t lastIndex) override;
44 
45  virtual void rolloutShots(size_t firstIndex, size_t lastIndex) override;
46 
47  SCALAR performLineSearch() override;
48 };
49 
50 
51 } // namespace optcon
52 } // namespace ct
Base::OptConProblem_t OptConProblem_t
Definition: NLOCBackendST.hpp:31
SCALAR performLineSearch() override
performLineSearch: execute the line search, possibly with different threading schemes ...
Definition: NLOCBackendST-impl.hpp:70
virtual void computeLQApproximation(size_t firstIndex, size_t lastIndex) override
build LQ approximation around trajectory (linearize dynamics and general constraints, quadratize cost, etc)
Definition: NLOCBackendST-impl.hpp:39
virtual ~NLOCBackendST()
Definition: NLOCBackendST-impl.hpp:33
Definition: NLOCBackendST.hpp:25
Settings for the NLOptCon algorithm.
Definition: NLOptConSettings.hpp:198
CppAD::AD< CppAD::cg::CG< double > > SCALAR
NLOCBackendST(const OptConProblem_t &optConProblem, const NLOptConSettings &settings)
Definition: NLOCBackendST-impl.hpp:13
virtual void rolloutShots(size_t firstIndex, size_t lastIndex) override
integrates the specified shots and computes the corresponding defects
Definition: NLOCBackendST-impl.hpp:55
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef NLOCBackendBase< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS > Base
Definition: NLOCBackendST.hpp:30
C++ implementation of GNMS.
Definition: NLOCBackendBase.hpp:48
const bool verbose
Definition: ConstraintComparison.h:18