Class tasking_oracle
Defined in File tasking_oracle.hpp
Inheritance Relationships
Base Type
public rer::client< tasking_oracle >
Class Documentation
-
class tasking_oracle : public rer::client<tasking_oracle>
Repository of perfect knowledge about swarm level task allocation. Used to provide an upper bound on the performance of different allocation methods.
Public Types
-
using variant_type = std::variant<cta::time_estimate>
Public Functions
-
tasking_oracle(const coconfig::tasking_oracle_config *config, const cta::ds::bi_tdgraph *graph)
-
boost::optional<variant_type> ask(const std::string &query) const
Ask the oracle something.
exec_est.<task name> interface_est.<task name>
- Parameters:
query – The question to ask. Currently oracles:
- Returns:
The answer to the query. Empty answer if query was ill-formed.
-
void listener_add(cta::bi_tdgraph_executive *executive)
Adds the oracle to the task finish and task abort callback lists for the specified executive. Should be called once during initialization to attach the oracle to each robot so that it can build a perfect map of task allocation information as the simulation progresses.
This results in asynchronous/irregular updates to the oracle’s map of task allocation information as robots finish/abort tasks.
-
void task_abort_cb(const cta::polled_task *task)
-
void task_finish_cb(const cta::polled_task *task)
-
inline bool update_exec_ests(void) const
-
inline bool update_int_ests(void) const
-
using variant_type = std::variant<cta::time_estimate>