ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::fun::EvaluatorWeightedSum Class Reference

#include <evaluator_weighted_sum.h>

Inheritance diagram for adore::fun::EvaluatorWeightedSum:
Inheritance graph
Collaboration diagram for adore::fun::EvaluatorWeightedSum:
Collaboration graph

Public Member Functions

 EvaluatorWeightedSum ()
 
void setTurnState (Turnstate state)
 
void addParameterPair (std::string name, std::string weight_string)
 
void init ()
 
double getCost (int id)
 
int getIndex (int id)
 
int evaluateToBest (const PlanningResultMap &planning_results) override
 
- Public Member Functions inherited from adore::fun::ATrajectoryEvaluator
virtual std::vector< double > evaluateToVector (const PlanningResultMap &planning_results, const std::vector< double > &weights)
 
virtual std::vector< double > evaluateToVector (const PlanningResultMap &planning_results)
 
virtual int evaluateToBest (const PlanningResultMap &planning_results, const std::vector< double > &weights)
 
 ATrajectoryEvaluator ()
 

Private Attributes

std::vector< std::pair< std::string, double > > objectives_
 
std::vector< std::pair< int, double > > cost_list_
 
double max_cost_
 
Turnstate turnstate_
 

Detailed Description

A weighted sum of individual objective functions is used to select the best trajectory.

Constructor & Destructor Documentation

◆ EvaluatorWeightedSum()

adore::fun::EvaluatorWeightedSum::EvaluatorWeightedSum ( )
inline

Member Function Documentation

◆ addParameterPair()

void adore::fun::EvaluatorWeightedSum::addParameterPair ( std::string  name,
std::string  weight_string 
)
inline
Here is the caller graph for this function:

◆ evaluateToBest()

int adore::fun::EvaluatorWeightedSum::evaluateToBest ( const PlanningResultMap planning_results)
inlineoverridevirtual

evaluate - assign navigation cost of last point in SetPointRequest

Reimplemented from adore::fun::ATrajectoryEvaluator.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCost()

double adore::fun::EvaluatorWeightedSum::getCost ( int  id)
inline
Returns
cost of plan with given id
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIndex()

int adore::fun::EvaluatorWeightedSum::getIndex ( int  id)
inline
Returns
index in cost_list_ for plan with id, -1 if not found
Here is the caller graph for this function:

◆ init()

void adore::fun::EvaluatorWeightedSum::init ( )
inline
Here is the caller graph for this function:

◆ setTurnState()

void adore::fun::EvaluatorWeightedSum::setTurnState ( Turnstate  state)
inline

Member Data Documentation

◆ cost_list_

std::vector<std::pair<int,double> > adore::fun::EvaluatorWeightedSum::cost_list_
private

◆ max_cost_

double adore::fun::EvaluatorWeightedSum::max_cost_
private

◆ objectives_

std::vector<std::pair<std::string,double> > adore::fun::EvaluatorWeightedSum::objectives_
private

◆ turnstate_

Turnstate adore::fun::EvaluatorWeightedSum::turnstate_
private

The documentation for this class was generated from the following file: