GAMS
1.4.0
|
Base class for all area coverages. More...
#include <BaseAreaCoverage.h>
Public Member Functions | |
BaseAreaCoverage (madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0, double e_time=-1.0) | |
Constructor. More... | |
virtual | ~BaseAreaCoverage () |
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... | |
utility::GPSPosition | get_next_position (void) const |
Get next position. 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 BaseAreaCoverage &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 | check_if_finished (int ret_val) const |
Check if finished based on time. More... | |
virtual void | generate_new_position (void)=0 |
Generate new next position. More... | |
Protected Attributes | |
variables::Agents * | agents_ |
the list of agents potentially participating in the algorithm More... | |
madara::utility::EpochEnforcer< std::chrono::steady_clock > | enforcer_ |
enforcer for maximum time More... | |
unsigned int | executions_ |
number of executions More... | |
bool | initialized_ |
indicates whether the algorithm is initialized More... | |
madara::knowledge::KnowledgeBase * | knowledge_ |
provides access to the knowledge base More... | |
double | max_time_ |
for keeping track of the time set for maximum coverage time More... | |
utility::GPSPosition | next_position_ |
next position More... | |
platforms::BasePlatform * | platform_ |
provides access to the platform 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... | |
Base class for all area coverages.
Definition at line 73 of file BaseAreaCoverage.h.
gams::algorithms::area_coverage::BaseAreaCoverage::BaseAreaCoverage | ( | madara::knowledge::KnowledgeBase * | knowledge = 0 , |
platforms::BasePlatform * | platform = 0 , |
||
variables::Sensors * | sensors = 0 , |
||
variables::Self * | self = 0 , |
||
variables::Agents * | agents = 0 , |
||
double | e_time = -1.0 |
||
) |
Constructor.
knowledge | the knowledge base of variables and values |
platform | the underlying platform the algorithm will use |
sensors | map of sensor names to sensor information |
self | self-referencing variables of this agent |
agents | list of agents in the swarm |
e_time | execution time |
|
virtual |
Destructor.
|
virtual |
Analyzes environment, platform, or other information.
Implements gams::algorithms::BaseAlgorithm.
Reimplemented in gams::algorithms::area_coverage::WaypointsCoverage, and gams::algorithms::area_coverage::MinTimeAreaCoverage.
|
protected |
Check if finished based on time.
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
protectedpure virtual |
Generate new next position.
Implemented in gams::algorithms::area_coverage::WaypointsCoverage, gams::algorithms::area_coverage::UniformRandomEdgeCoverage, gams::algorithms::area_coverage::UniformRandomAreaCoverage, gams::algorithms::area_coverage::SnakeAreaCoverage, gams::algorithms::area_coverage::PriorityWeightedRandomAreaCoverage, gams::algorithms::area_coverage::PerimeterPatrolCoverage, gams::algorithms::area_coverage::MinTimeAreaCoverage, and gams::algorithms::area_coverage::LocalPheremoneAreaCoverage.
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
inherited |
Gets the knowledge base.
utility::GPSPosition gams::algorithms::area_coverage::BaseAreaCoverage::get_next_position | ( | void | ) | const |
Get next position.
|
inherited |
Gets the platform.
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
void gams::algorithms::area_coverage::BaseAreaCoverage::operator= | ( | const BaseAreaCoverage & | 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 |
enforcer for maximum time
Definition at line 149 of file BaseAreaCoverage.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protected |
indicates whether the algorithm is initialized
Definition at line 143 of file BaseAreaCoverage.h.
|
protectedinherited |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
for keeping track of the time set for maximum coverage time
Definition at line 146 of file BaseAreaCoverage.h.
|
protected |
next position
Definition at line 140 of file BaseAreaCoverage.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.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.