GAMS
1.4.0
|
An algorithm for covering an area in formation with a synchronous model of computation. More...
#include <GroupBarrier.h>
Public Member Functions | |
GroupBarrier (const std::vector< std::string > &members, std::string barrier_name, double interval, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0) | |
Constructor. More... | |
~GroupBarrier () | |
Destructor. More... | |
virtual int | analyze (void) |
Analyzes environment, platform, or other information. More... | |
virtual int | execute (void) |
Plans the next execution of the algorithm. More... | |
variables::Agents * | get_agents (void) |
Gets the list of agents. More... | |
variables::AlgorithmStatus * | get_algorithm_status (void) |
Gets algorithm status variables. More... | |
madara::knowledge::KnowledgeBase * | get_knowledge_base (void) |
Gets the knowledge base. More... | |
platforms::BasePlatform * | get_platform (void) |
Gets the platform. More... | |
variables::Self * | get_self (void) |
Gets self-defined variables. More... | |
variables::Sensors * | get_sensors (void) |
Gets the available sensor information. More... | |
void | operator= (const GroupBarrier &rhs) |
Assignment operator. More... | |
virtual int | plan (void) |
Plans the next execution of the algorithm. More... | |
virtual void | set_agents (variables::Agents *agents) |
Sets the list of agents in the swarm. More... | |
virtual void | set_platform (platforms::BasePlatform *platform) |
Sets the platform. More... | |
virtual void | set_self (variables::Self *self) |
Sets the map of sensor names to sensor information. More... | |
virtual void | set_sensors (variables::Sensors *sensors) |
Sets the map of sensor names to sensor information. More... | |
Protected Member Functions | |
int | get_position_in_member_list (std::string id, std::vector< std::string > &member_list) |
Gets the position of the id in the member list. More... | |
Protected Attributes | |
variables::Agents * | agents_ |
the list of agents potentially participating in the algorithm More... | |
madara::knowledge::containers::Barrier | barrier_ |
movement barrier More... | |
madara::utility::EpochEnforcer< std::chrono::steady_clock > | enforcer_ |
enforcer of barrier times More... | |
unsigned int | executions_ |
number of executions More... | |
madara::knowledge::KnowledgeBase * | knowledge_ |
provides access to the knowledge base More... | |
std::vector< std::string > | members_ |
members of the formation(e.g., agent.0, agent.1, etc.) More... | |
platforms::BasePlatform * | platform_ |
provides access to the platform More... | |
int | position_ |
position in member assignment More... | |
variables::Self * | self_ |
the algorithm's concept of self More... | |
variables::Sensors * | sensors_ |
provides access to sensor information More... | |
variables::AlgorithmStatus | status_ |
provides access to status information for this platform More... | |
An algorithm for covering an area in formation with a synchronous model of computation.
Allows specification of arbitrary group or swarm.
Definition at line 79 of file GroupBarrier.h.
gams::algorithms::GroupBarrier::GroupBarrier | ( | const std::vector< std::string > & | members, |
std::string | barrier_name, | ||
double | interval, | ||
madara::knowledge::KnowledgeBase * | knowledge = 0 , |
||
platforms::BasePlatform * | platform = 0 , |
||
variables::Sensors * | sensors = 0 , |
||
variables::Self * | self = 0 |
||
) |
Constructor.
members | the members of the formation |
barrier_name | the barrier name to synchronize on |
interval | interval in seconds between barrier increments |
knowledge | the context containing variables and values |
platform | the underlying platform the algorithm will use |
sensors | map of sensor names to sensor information |
self | self-referencing variables |
gams::algorithms::GroupBarrier::~GroupBarrier | ( | ) |
Destructor.
|
virtual |
Analyzes environment, platform, or other information.
Implements gams::algorithms::BaseAlgorithm.
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
inherited |
Gets the knowledge base.
|
inherited |
Gets the platform.
|
protected |
Gets the position of the id in the member list.
id | the id of the member |
member_list | the list of members |
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
void gams::algorithms::GroupBarrier::operator= | ( | const GroupBarrier & | rhs | ) |
Assignment operator.
rhs | values to copy |
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
virtualinherited |
Sets the list of agents in the swarm.
agents | list of agents |
|
virtualinherited |
Sets the platform.
platform | the underlying platform the algorithm will use |
|
virtualinherited |
Sets the map of sensor names to sensor information.
self | pointer to self-referencing variables container |
|
virtualinherited |
Sets the map of sensor names to sensor information.
sensors | map of sensor names to sensor information |
|
protectedinherited |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
|
protected |
movement barrier
Definition at line 147 of file GroupBarrier.h.
|
protected |
enforcer of barrier times
Definition at line 150 of file GroupBarrier.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
members of the formation(e.g., agent.0, agent.1, etc.)
Definition at line 141 of file GroupBarrier.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protected |
position in member assignment
Definition at line 144 of file GroupBarrier.h.
|
protectedinherited |
the algorithm's concept of self
Definition at line 213 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to sensor information
Definition at line 216 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.