An agent formation.
More...
#include <StructuralFormation.h>
|
| StructuralFormation () |
| Constructor. More...
|
|
virtual | ~StructuralFormation () |
| Constructor. More...
|
|
virtual void | from_args (madara::knowledge::FunctionArguments &args) |
| Configures the formation from arguments. More...
|
|
virtual double | goodness (const std::string &id="", double buffer=3.0) const |
| Checks the goodness of an agent in the current formation. More...
|
|
virtual bool | is_extra (const std::string &id="") const |
| Checks if the agent is an extra member of the formation. More...
|
|
virtual bool | is_member (const std::string &id="") const |
| Checks if the agent is a member of the formation. More...
|
|
An agent formation.
Definition at line 73 of file StructuralFormation.h.
◆ StructuralFormation()
gams::formations::StructuralFormation::StructuralFormation |
( |
| ) |
|
◆ ~StructuralFormation()
virtual gams::formations::StructuralFormation::~StructuralFormation |
( |
| ) |
|
|
virtual |
◆ from_args()
virtual void gams::formations::StructuralFormation::from_args |
( |
madara::knowledge::FunctionArguments & |
args | ) |
|
|
virtual |
Configures the formation from arguments.
- Parameters
-
args | arguments to check through |
◆ goodness()
virtual double gams::formations::StructuralFormation::goodness |
( |
const std::string & |
id = "" , |
|
|
double |
buffer = 3.0 |
|
) |
| const |
|
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::StructuralFormation::is_extra |
( |
const std::string & |
id = "" | ) |
const |
|
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::StructuralFormation::is_member |
( |
const std::string & |
id = "" | ) |
const |
|
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
The documentation for this class was generated from the following file: