finite_differences_grid_move_blocking.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: Maximilian Krämer, Christoph Rösmann
23  *********************************************************************/
24 
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_MOVE_BLOCKING_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_MOVE_BLOCKING_H_
27 
29 
30 namespace corbo {
31 
33 {
34  public:
35  using Ptr = std::shared_ptr<FiniteDifferencesGridMoveBlocking>;
36  using UPtr = std::unique_ptr<FiniteDifferencesGridMoveBlocking>;
37 
39  virtual ~FiniteDifferencesGridMoveBlocking() = default;
40 
42  DiscretizationGridInterface::Ptr getInstance() const override { return std::make_shared<FiniteDifferencesGridMoveBlocking>(); }
43 
46 
47 #ifdef MESSAGE_SUPPORT
48  void fromMessage(const messages::FiniteDifferencesGridMoveBlocking& message, std::stringstream* issues);
49  void toMessage(messages::FiniteDifferencesGridMoveBlocking& message) const;
50 
51  void fromMessage(const messages::DiscretizationGrid& message, std::stringstream* issues) override
52  {
53  fromMessage(message.finite_differences_grid_move_blocking(), issues);
54  }
55  void toMessage(messages::DiscretizationGrid& message) const override { toMessage(*message.mutable_finite_differences_grid_move_blocking()); }
56 #endif
57 
58  protected:
59  void createEdges(NlpFunctions& nlp_fun, OptimizationEdgeSet& edges, SystemDynamicsInterface::Ptr dynamics) override;
60 };
61 
63 
64 } // namespace corbo
65 
66 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_MOVE_BLOCKING_H_
Generic factory object.
Definition: factory.h:68
std::unique_ptr< DiscretizationGridInterface > UPtr
#define FACTORY_REGISTER_DISCRETIZATION_GRID(type)
virtual ~FiniteDifferencesGridMoveBlocking()=default
DiscretizationGridInterface::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
void createEdges(NlpFunctions &nlp_fun, OptimizationEdgeSet &edges, SystemDynamicsInterface::Ptr dynamics) override
static Factory & instance()
< Retrieve static instance of the factory
Definition: factory.h:72
std::shared_ptr< DiscretizationGridInterface > Ptr
std::shared_ptr< SystemDynamicsInterface > Ptr
static Factory< DiscretizationGridInterface > & getFactory()
Get access to the associated factory.


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:06:51