An agent formation.
More...
#include <AgentFormation.h>
|
| AgentFormation () |
| Constructor. More...
|
|
virtual | ~AgentFormation () |
| Constructor. More...
|
|
virtual void | from_args (madara::knowledge::FunctionArguments &args)=0 |
| Configures the formation from arguments. More...
|
|
virtual double | goodness (const std::string &id="", double buffer=3.0) const =0 |
| Checks the goodness of an agent in the current formation. More...
|
|
virtual bool | is_extra (const std::string &id="") const =0 |
| Checks if the agent is an extra member of the formation. More...
|
|
virtual bool | is_member (const std::string &id="") const =0 |
| Checks if the agent is a member of the formation. More...
|
|
void | set_id (const std::string &id) |
| Sets the id of the current agent(e.g. More...
|
|
An agent formation.
Definition at line 73 of file AgentFormation.h.
◆ AgentFormation()
gams::formations::AgentFormation::AgentFormation |
( |
| ) |
|
◆ ~AgentFormation()
virtual gams::formations::AgentFormation::~AgentFormation |
( |
| ) |
|
|
virtual |
◆ from_args()
virtual void gams::formations::AgentFormation::from_args |
( |
madara::knowledge::FunctionArguments & |
args | ) |
|
|
pure virtual |
Configures the formation from arguments.
- Parameters
-
args | arguments to check through |
◆ goodness()
virtual double gams::formations::AgentFormation::goodness |
( |
const std::string & |
id = "" , |
|
|
double |
buffer = 3.0 |
|
) |
| const |
|
pure virtual |
Checks the goodness of an agent in the current formation.
- Parameters
-
id | the agent id to check. Null means check all agents |
buffer | maximum allowed offset from correct location in meters |
- Returns
- the goodness of the formation, where 0 is bad and 1 is good
◆ is_extra()
virtual bool gams::formations::AgentFormation::is_extra |
( |
const std::string & |
id = "" | ) |
const |
|
pure virtual |
Checks if the agent is an extra member of the formation.
- Parameters
-
id | the agent id(e.g. agent.0 or agent.leader). If null, uses the current agent's id |
- Returns
- true if the agent is an extra member in the formation
◆ is_member()
virtual bool gams::formations::AgentFormation::is_member |
( |
const std::string & |
id = "" | ) |
const |
|
pure virtual |
Checks if the agent is a member of the formation.
- Parameters
-
id | the agent id(e.g. agent.0 or agent.leader). If null, uses the current agent's id |
- Returns
- true if the agent is in the formation
◆ set_id()
void gams::formations::AgentFormation::set_id |
( |
const std::string & |
id | ) |
|
Sets the id of the current agent(e.g.
"agent.0" or "agent.leader")
- Parameters
-
◆ group_factory_
◆ id_
std::string gams::formations::AgentFormation::id_ |
|
protected |
◆ knowledge_
madara::knowledge::KnowledgeBase* gams::formations::AgentFormation::knowledge_ |
|
protected |
The documentation for this class was generated from the following file: