Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes
mrpt::nav::CMultiObjMotionOpt_Scalarization Class Reference

Detailed Description

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

See also
CReactiveNavigationSystem, CReactiveNavigationSystem3D

Definition at line 27 of file CMultiObjMotionOpt_Scalarization.h.

#include <mrpt/nav/reactive/CMultiObjMotionOpt_Scalarization.h>

Inheritance diagram for mrpt::nav::CMultiObjMotionOpt_Scalarization:
Inheritance graph

Classes

struct  TParams
 

Public Member Functions

voidoperator new (size_t size)
 
voidoperator new[] (size_t size)
 
void operator delete (void *ptr) noexcept
 
void operator delete[] (void *ptr) noexcept
 
void operator delete (void *memory, void *ptr) noexcept
 
voidoperator 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...
 

Static Public Member Functions

static voidoperator 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
 

Private Attributes

TParamsBasem_params_base
 
std::map< std::string, mrpt::expr::CRuntimeCompiledExpressionm_score_exprs
 score names -> score compiled expressions More...
 
std::vector< mrpt::expr::CRuntimeCompiledExpressionm_movement_assert_exprs
 
std::map< std::string, double > m_expr_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::TRuntimeClassIdGetRuntimeClassIdStatic ()
 
static mrpt::rtti::CObjectCreateObject ()
 
template<typename... Args>
static Ptr Create (Args &&... args)
 
template<typename... Args>
static UniquePtr CreateUnique (Args &&... args)
 
virtual const mrpt::rtti::TRuntimeClassIdGetRuntimeClass () const override
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::rtti::CObjectclone () const override
 Returns a deep copy (clone) of the object, indepently of its class. More...
 

Member Typedef Documentation

◆ ConstPtr

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ ConstUniquePtr

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ Ptr

A type for the associated smart pointer

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ UniquePtr

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

Constructor & Destructor Documentation

◆ CMultiObjMotionOpt_Scalarization()

mrpt::nav::CMultiObjMotionOpt_Scalarization::CMultiObjMotionOpt_Scalarization ( )

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::rtti::TRuntimeClassId* mrpt::nav::CMultiObjMotionOpt_Scalarization::_GetBaseClass ( )
staticprotected

◆ clear()

void CMultiObjMotionOpt_Scalarization::clear ( )
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.

◆ clone()

virtual mrpt::rtti::CObject* mrpt::nav::CMultiObjMotionOpt_Scalarization::clone ( ) const
overridevirtual

Returns a deep copy (clone) of the object, indepently of its class.

Implements mrpt::rtti::CObject.

◆ Create()

template<typename... Args>
static Ptr mrpt::nav::CMultiObjMotionOpt_Scalarization::Create ( Args &&...  args)
inlinestatic

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ CreateObject()

static mrpt::rtti::CObject* mrpt::nav::CMultiObjMotionOpt_Scalarization::CreateObject ( )
static

◆ CreateUnique()

template<typename... Args>
static UniquePtr mrpt::nav::CMultiObjMotionOpt_Scalarization::CreateUnique ( Args &&...  args)
inlinestatic

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ decide()

int CMultiObjectiveMotionOptimizerBase::decide ( const std::vector< mrpt::nav::TCandidateMovementPTG > &  movs,
TResultInfo extra_info 
)
inherited

◆ duplicateGetSmartPtr()

mrpt::rtti::CObject::Ptr CObject::duplicateGetSmartPtr ( ) const
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 169 of file CObject.h.

References mrpt::rtti::CObject::clone().

Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().

◆ Factory()

CMultiObjectiveMotionOptimizerBase::Ptr CMultiObjectiveMotionOptimizerBase::Factory ( const std::string className)
staticnoexceptinherited

◆ getClassName()

static constexpr auto mrpt::nav::CMultiObjMotionOpt_Scalarization::getClassName ( )
inlinestaticconstexpr

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ GetRuntimeClass()

virtual const mrpt::rtti::TRuntimeClassId* mrpt::nav::CMultiObjMotionOpt_Scalarization::GetRuntimeClass ( ) const
overridevirtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::nav::CMultiObjectiveMotionOptimizerBase.

◆ GetRuntimeClassIdStatic()

static const mrpt::rtti::TRuntimeClassId& mrpt::nav::CMultiObjMotionOpt_Scalarization::GetRuntimeClassIdStatic ( )
static

◆ impl_decide()

int CMultiObjMotionOpt_Scalarization::impl_decide ( const std::vector< mrpt::nav::TCandidateMovementPTG > &  movs,
TResultInfo extra_info 
)
overrideprotectedvirtual

◆ loadConfigFile()

void CMultiObjMotionOpt_Scalarization::loadConfigFile ( const mrpt::config::CConfigFileBase c)
overridevirtual

◆ operator delete() [1/3]

void mrpt::nav::CMultiObjMotionOpt_Scalarization::operator delete ( void memory,
void ptr 
)
inlinenoexcept

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator delete() [2/3]

void mrpt::nav::CMultiObjMotionOpt_Scalarization::operator delete ( void ptr)
inlinenoexcept

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator delete() [3/3]

void mrpt::nav::CMultiObjMotionOpt_Scalarization::operator delete ( void ptr,
const std::nothrow_t &   
)
inlinenoexcept

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator delete[]()

void mrpt::nav::CMultiObjMotionOpt_Scalarization::operator delete[] ( void ptr)
inlinenoexcept

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator new() [1/3]

void* mrpt::nav::CMultiObjMotionOpt_Scalarization::operator new ( size_t  size)
inline

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator new() [2/3]

void* mrpt::nav::CMultiObjMotionOpt_Scalarization::operator new ( size_t  size,
const std::nothrow_t &   
)
inlinenoexcept

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator new() [3/3]

static void* mrpt::nav::CMultiObjMotionOpt_Scalarization::operator new ( size_t  size,
void ptr 
)
inlinestatic

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ operator new[]()

void* mrpt::nav::CMultiObjMotionOpt_Scalarization::operator new[] ( size_t  size)
inline

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ saveConfigFile()

void CMultiObjMotionOpt_Scalarization::saveConfigFile ( mrpt::config::CConfigFileBase c) const
overridevirtual

Member Data Documentation

◆ _init_CMultiObjMotionOpt_Scalarization

mrpt::rtti::CLASSINIT mrpt::nav::CMultiObjMotionOpt_Scalarization::_init_CMultiObjMotionOpt_Scalarization
staticprotected

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ className

constexpr const char* mrpt::nav::CMultiObjMotionOpt_Scalarization::className = "CMultiObjMotionOpt_Scalarization"
staticconstexpr

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.

◆ m_expr_scalar_formula

mrpt::expr::CRuntimeCompiledExpression mrpt::nav::CMultiObjMotionOpt_Scalarization::m_expr_scalar_formula
protected

Definition at line 59 of file CMultiObjMotionOpt_Scalarization.h.

Referenced by clear(), and impl_decide().

◆ m_expr_scalar_vars

std::map<std::string, double> mrpt::nav::CMultiObjMotionOpt_Scalarization::m_expr_scalar_vars
protected

Definition at line 60 of file CMultiObjMotionOpt_Scalarization.h.

Referenced by clear(), and impl_decide().

◆ m_expr_vars

std::map<std::string, double> mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_expr_vars
privateinherited

◆ m_movement_assert_exprs

std::vector<mrpt::expr::CRuntimeCompiledExpression> mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_movement_assert_exprs
privateinherited

◆ m_params_base

TParamsBase& mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_params_base
privateinherited

◆ m_score_exprs

std::map<std::string, mrpt::expr::CRuntimeCompiledExpression> mrpt::nav::CMultiObjectiveMotionOptimizerBase::m_score_exprs
privateinherited

◆ parameters

TParams mrpt::nav::CMultiObjMotionOpt_Scalarization::parameters

Definition at line 54 of file CMultiObjMotionOpt_Scalarization.h.

Referenced by impl_decide(), loadConfigFile(), and saveConfigFile().

◆ runtimeClassId

const mrpt::rtti::TRuntimeClassId mrpt::nav::CMultiObjMotionOpt_Scalarization::runtimeClassId
staticprotected

Definition at line 30 of file CMultiObjMotionOpt_Scalarization.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST