GAMS  1.4.0
gams::formations::StructuralFormation Class Reference

An agent formation. More...

#include <StructuralFormation.h>

Public Member Functions

 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...
 

Detailed Description

An agent formation.

Definition at line 73 of file StructuralFormation.h.

Constructor & Destructor Documentation

◆ StructuralFormation()

gams::formations::StructuralFormation::StructuralFormation ( )

Constructor.

◆ ~StructuralFormation()

virtual gams::formations::StructuralFormation::~StructuralFormation ( )
virtual

Constructor.

Member Function Documentation

◆ from_args()

virtual void gams::formations::StructuralFormation::from_args ( madara::knowledge::FunctionArguments &  args)
virtual

Configures the formation from arguments.

Parameters
argsarguments 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
idthe agent id to check. Null means check all agents
buffermaximum 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
idthe 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
idthe 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: