MRPT
1.9.9
|
Implementation of multi-objective motion chooser using scalarization: a user-given formula is used to collapse all the scores into a single scalar score.
The candidate with the highest positive score is selected. Note that assert expressions are honored via the base class CMultiObjectiveMotionOptimizerBase
Definition at line 25 of file CMultiObjMotionOpt_Scalarization.h.
#include <mrpt/nav/reactive/CMultiObjMotionOpt_Scalarization.h>
Classes | |
struct | TParams |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) noexcept |
void | operator delete[] (void *ptr) noexcept |
void | operator delete (void *memory, void *ptr) noexcept |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
CMultiObjMotionOpt_Scalarization () | |
void | loadConfigFile (const mrpt::config::CConfigFileBase &c) override |
void | saveConfigFile (mrpt::config::CConfigFileBase &c) const override |
virtual void | clear () override |
Resets the object state; use if the parameters change, so they are re-read and applied. More... | |
int | decide (const std::vector< mrpt::nav::TCandidateMovementPTG > &movs, TResultInfo &extra_info) |
The main entry point for the class: returns the 0-based index of the best of the N motion candidates in movs . More... | |
RTTI classes and functions for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | duplicateGetSmartPtr () const |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
static CMultiObjectiveMotionOptimizerBase::Ptr | Factory (const std::string &className) noexcept |
Class factory from C++ class name. More... | |
Public Attributes | |
TParams | parameters |
Protected Member Functions | |
int | impl_decide (const std::vector< mrpt::nav::TCandidateMovementPTG > &movs, TResultInfo &extra_info) override |
Protected Attributes | |
mrpt::expr::CRuntimeCompiledExpression | m_expr_scalar_formula |
std::map< std::string, double > | m_expr_scalar_vars |
RTTI stuff | |
using | Ptr = std::shared_ptr< CMultiObjMotionOpt_Scalarization > |
using | ConstPtr = std::shared_ptr< const CMultiObjMotionOpt_Scalarization > |
using | UniquePtr = std::unique_ptr< CMultiObjMotionOpt_Scalarization > |
using | ConstUniquePtr = std::unique_ptr< const CMultiObjMotionOpt_Scalarization > |
static mrpt::rtti::CLASSINIT | _init_CMultiObjMotionOpt_Scalarization |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "CMultiObjMotionOpt_Scalarization" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static mrpt::rtti::CObject * | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
using mrpt::nav::CMultiObjMotionOpt_Scalarization::ConstPtr = std::shared_ptr<const CMultiObjMotionOpt_Scalarization > |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
using mrpt::nav::CMultiObjMotionOpt_Scalarization::ConstUniquePtr = std::unique_ptr<const CMultiObjMotionOpt_Scalarization > |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
using mrpt::nav::CMultiObjMotionOpt_Scalarization::Ptr = std::shared_ptr< CMultiObjMotionOpt_Scalarization > |
A type for the associated smart pointer
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
using mrpt::nav::CMultiObjMotionOpt_Scalarization::UniquePtr = std::unique_ptr< CMultiObjMotionOpt_Scalarization > |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
mrpt::nav::CMultiObjMotionOpt_Scalarization::CMultiObjMotionOpt_Scalarization | ( | ) |
|
staticprotected |
|
overridevirtual |
Resets the object state; use if the parameters change, so they are re-read and applied.
Reimplemented from mrpt::nav::CMultiObjectiveMotionOptimizerBase.
Definition at line 25 of file CMultiObjMotionOpt_Scalarization.cpp.
References mrpt::nav::CMultiObjectiveMotionOptimizerBase::clear(), m_expr_scalar_formula, and m_expr_scalar_vars.
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
inlinestatic |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
static |
|
inlinestatic |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inherited |
The main entry point for the class: returns the 0-based index of the best of the N motion candidates in movs
.
If no valid one is found, -1
will be returned.
Definition at line 27 of file CMultiObjectiveMotionOptimizerBase.cpp.
References mrpt::format(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase::formula_score, mrpt::nav::CMultiObjectiveMotionOptimizerBase::impl_decide(), mrpt::keep_max(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::log_entries, mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_expr_vars, mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_movement_assert_exprs, mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_params_base, mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_score_exprs, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase::movement_assert, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::score_values, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase::scores_to_normalize, THROW_EXCEPTION_FMT, and val.
|
inlineinherited |
Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
Definition at line 168 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().
|
staticnoexceptinherited |
Class factory from C++ class name.
Definition at line 223 of file CMultiObjectiveMotionOptimizerBase.cpp.
References mrpt::rtti::TRuntimeClassId::createObject(), mrpt::rtti::findRegisteredClass(), and mrpt::rtti::registerAllPendingClasses().
Referenced by mrpt::nav::CAbstractPTGBasedReactive::loadConfigFile().
|
inlinestatic |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::nav::CMultiObjectiveMotionOptimizerBase.
|
static |
|
overrideprotectedvirtual |
Implements mrpt::nav::CMultiObjectiveMotionOptimizerBase.
Definition at line 52 of file CMultiObjMotionOpt_Scalarization.cpp.
References mrpt::expr::CRuntimeCompiledExpression::compile(), mrpt::expr::CRuntimeCompiledExpression::eval(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::final_evaluation, m_expr_scalar_formula, m_expr_scalar_vars, parameters, mrpt::nav::CMultiObjMotionOpt_Scalarization::TParams::scalar_score_formula, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TResultInfo::score_values, THROW_EXCEPTION_FMT, and val.
|
overridevirtual |
Implements mrpt::nav::CMultiObjectiveMotionOptimizerBase.
Definition at line 32 of file CMultiObjMotionOpt_Scalarization.cpp.
References mrpt::nav::CMultiObjMotionOpt_Scalarization::TParams::loadFromConfigFile(), and parameters.
|
inlinenoexcept |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inlinenoexcept |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inline |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inlinenoexcept |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inlinestatic |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
inline |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
overridevirtual |
Implements mrpt::nav::CMultiObjectiveMotionOptimizerBase.
Definition at line 42 of file CMultiObjMotionOpt_Scalarization.cpp.
References parameters, and mrpt::nav::CMultiObjMotionOpt_Scalarization::TParams::saveToConfigFile().
|
staticprotected |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
static |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
|
protected |
Definition at line 57 of file CMultiObjMotionOpt_Scalarization.h.
Referenced by clear(), and impl_decide().
|
protected |
Definition at line 58 of file CMultiObjMotionOpt_Scalarization.h.
Referenced by clear(), and impl_decide().
TParams mrpt::nav::CMultiObjMotionOpt_Scalarization::parameters |
Definition at line 52 of file CMultiObjMotionOpt_Scalarization.h.
Referenced by impl_decide(), loadConfigFile(), and saveConfigFile().
|
staticprotected |
Definition at line 28 of file CMultiObjMotionOpt_Scalarization.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |