Main MRPT website > C++ reference for MRPT 1.5.9
CMultiObjMotionOpt_Scalarization.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #pragma once
10 
12 #include <mrpt/nav/link_pragmas.h>
13 
14 namespace mrpt
15 {
16  namespace nav
17  {
18  DEFINE_MRPT_OBJECT_PRE_CUSTOM_LINKAGE(CMultiObjMotionOpt_Scalarization, NAV_IMPEXP)
19 
20  /** Implementation of multi-objective motion chooser using scalarization: a user-given formula is used to
21  * collapse all the scores into a single scalar score. The candidate with the highest positive score is selected.
22  * Note that assert expressions are honored via the base class CMultiObjectiveMotionOptimizerBase
23  *
24  * \sa CReactiveNavigationSystem, CReactiveNavigationSystem3D
25  * \ingroup nav_reactive
26  */
28  {
29  // This must be added to any CSerializable derived class:
31 
32  public:
34 
35  void loadConfigFile(const mrpt::utils::CConfigFileBase & c) MRPT_OVERRIDE;
36  void saveConfigFile(mrpt::utils::CConfigFileBase & c) const MRPT_OVERRIDE;
37 
39  {
40  std::string scalar_score_formula; //!< A formula that takes all/a subset of scores and generates a scalar global score.
41 
42  TParams();
43  void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section) MRPT_OVERRIDE; // See base docs
44  void saveToConfigFile(mrpt::utils::CConfigFileBase &cfg, const std::string &section) const MRPT_OVERRIDE; // See base docs
45  };
46 
48 
49  virtual void clear() MRPT_OVERRIDE;
50 
51  protected:
52  mrpt::math::CRuntimeCompiledExpression m_expr_scalar_formula;
53  std::map<std::string, double> m_expr_scalar_vars;
54 
55  // This virtual method is called by decide().
56  int impl_decide(const std::vector<mrpt::nav::TCandidateMovementPTG> &movs, TResultInfo &extra_info) MRPT_OVERRIDE;
57  };
59 
60  }
61 }
62 
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
STL namespace.
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:113
This class allows loading and storing values and vectors of different types from a configuration text...
const GLubyte * c
Definition: glext.h:5590
#define DEFINE_MRPT_OBJECT(class_name)
This declaration must be inserted in all CObject classes definition, within the class declaration...
Definition: CObject.h:187
Implementation of multi-objective motion chooser using scalarization: a user-given formula is used to...
GLsizei const GLchar ** string
Definition: glext.h:3919
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for multi-objective motion choosers, as used for reactive navigation engines...
#define DEFINE_MRPT_OBJECT_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
Definition: CObject.h:226
GLsizei GLsizei GLchar * source
Definition: glext.h:3908
std::string scalar_score_formula
A formula that takes all/a subset of scores and generates a scalar global score.
#define DEFINE_MRPT_OBJECT_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
Definition: CObject.h:227
Stores a candidate movement in TP-Space-based navigation.



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020