Class subtask_sel_probability
Defined in File subtask_sel_probability.hpp
Inheritance Relationships
Base Types
public rer::client< subtask_sel_probability >
public rmath::sigmoid
Class Documentation
-
class subtask_sel_probability : public rer::client<subtask_sel_probability>, public rmath::sigmoid
Calculates the probability that a robot selects subtask 2 when it has most recently executed subtask 1 (assuming partitioning is employed).
Adapted from TA:Brutschy2014-taskseq,Harwell:2018-partitioning. Note that TA:Brutschy2014-taskseq using the interface wait time for subtask as the input time estimates, and Harwell:2018-partitioning using the estimate of the overall execution time of subtasks. Mixing the two approaches will not give good results.
Depends on:
The robot’s time estimates of how long it takes to complete each of the two subtasks/estimates of interface time for each subtask.
The reactivity parameter: how quickly should the increase in sel probability be for an increasing difference between subtask time estimates.
The offset parameter: how quickly should controller react to an increasing difference between subtask time estimates?
reactivity > 0.
offset > 1.
0 < gamma < 1.
Public Functions
-
explicit subtask_sel_probability(const config::sigmoid_sel_config *config)
Initialize subtask sel probability with method + parameter values.
-
explicit subtask_sel_probability(std::string method)
Initialize subtask sel probability with default values, based on whatever the selected method is.
-
~subtask_sel_probability(void) override = default
-
void init_sigmoid(double reactivity, double offset, double gamma)
After construction initialization of parameters (may be needed in some situations).
-
inline const std::string &method(void) const
-
double operator()(const time_estimate *subtask1, const time_estimate *subtask2, rmath::rng *rng)
Calculate the sel probability based on the configured method, using the most recent time estimates of each subtask.
Public Static Attributes
-
static constexpr const double kBRUTSCHY2014_GAMMA = 0.01
-
static constexpr const double kBRUTSCHY2014_OFFSET = 8.0
-
static constexpr const double kBRUTSCHY2014_REACTIVITY = 1.0
-
static constexpr const double kHARWELL2018_GAMMA = 1.0
-
static constexpr const double kHARWELL2018_OFFSET = 1.25
-
static constexpr const double kHARWELL2018_REACTIVITY = 8.0
-
static const std::string kMethodBrutschy2014 = "brutschy2014"
-
static const std::string kMethodHarwell2018 = "harwell2018"
-
static const std::string kMethodRandom = "random"