Class bi_tab_sel_probability
Defined in File bi_tab_sel_probability.hpp
Inheritance Relationships
Base Types
public rer::client< bi_tab_sel_probability >
public rmath::sigmoid
Class Documentation
-
class bi_tab_sel_probability : public rer::client<bi_tab_sel_probability>, public rmath::sigmoid
Calculates the probability that a robot selects a given TAB or its child/parent TAB (depending on whether the most recently finished/aborted task is a child or the root of the current TAB).
Let the current TAB be TAB i, and the child/parent TAB be TAB j. We compute how balanced/unbalanced the execution time estimates of root vs (child1 + child2) for both TABs. If the resulting ratios are equal (or very close), then there is probably a good distribution of controller executing tasks from each TAB, and the execution estimates are probably fairly reliable, and you should not switch TABs.
Assume the ratio for TAB j (the other TAB) is 1.0. Then, as the TAB i ratio goes to 0 or infinity, the probability of switching to TAB j goes to 1.0.
Depends on:
The robot’s time estimates of how long it takes to complete task in each TAB.
The reactivity parameter: How quickly should the increase in sel probability be for an increasing difference between TAB balance ratios.
The offset parameter: What is the threshold beneath which differences in the TAB balance ratios are not considered consequential, and above which controller should prefer to switch TABs with quickly increasing probability.
reactivity > 0.
offset > 1.
0 < gamma < 1.
Used in Harwell2020a-demystify.
Public Functions
-
explicit bi_tab_sel_probability(const config::src_sigmoid_sel_config *config)
Initialize subtask sel probability with method + parameter values.
-
explicit bi_tab_sel_probability(const std::string &method)
Initialize subtask sel probability with default values, based on whatever the selected method is.
-
inline const std::string &method(void) const
Public Static Attributes
-
static constexpr const double kHARWELL2019_GAMMA = 1.0
-
static constexpr const double kHARWELL2019_OFFSET = 1.25
-
static constexpr const double kHARWELL2019_REACTIVITY = 8.0
-
static const std::string kMethodHarwell2019 = "harwell2019"
-
static const std::string kMethodRandom = "random"