|
GAMS
1.2.2
|
Area coverage that minimizes the time taken for covering an area. More...
#include <MinTimeAreaCoverage.h>
Public Member Functions | |
| MinTimeAreaCoverage (const std::string &search_id, double e_time, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0, const std::string &algo_name="mtac") | |
| Constructor. More... | |
| virtual int | analyze (void) |
| Increment sensor values. 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 MinTimeAreaCoverage &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) |
| generate new next position More... | |
| virtual double | get_utility (const utility::Position &start, const utility::Position &end, std::set< utility::Position > &online) |
| A better way to manage this would probably be to take a function pointer to handle utility calculation. More... | |
| virtual void | review_last_move () |
| review if last move was good, did we hit all cells we said we would 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... | |
| unsigned int | last_generation_ |
| time step of last position generation More... | |
| double | max_time_ |
| for keeping track of the time set for maximum coverage time More... | |
| variables::Sensor | min_time_ |
| time since last coverage More... | |
| utility::GPSPosition | next_position_ |
| next position More... | |
| platforms::BasePlatform * | platform_ |
| provides access to the platform More... | |
| std::map< utility::Position, double > | position_value_map_ |
| positions we will be passing through and their previous values More... | |
| pose::SearchArea | search_area_ |
| Search Area to cover. 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... | |
| std::set< utility::Position > | valid_positions_ |
| discretized positions in search area More... | |
Area coverage that minimizes the time taken for covering an area.
Definition at line 84 of file MinTimeAreaCoverage.h.
| gams::algorithms::area_coverage::MinTimeAreaCoverage::MinTimeAreaCoverage | ( | const std::string & | search_id, |
| double | e_time, | ||
| madara::knowledge::KnowledgeBase * | knowledge = 0, |
||
| platforms::BasePlatform * | platform = 0, |
||
| variables::Sensors * | sensors = 0, |
||
| variables::Self * | self = 0, |
||
| variables::Agents * | agents = 0, |
||
| const std::string & | algo_name = "mtac" |
||
| ) |
Constructor.
| search_id | the region or search area to be covered |
| e_time | amount of time to execute algorithm, 0 for infinite |
| 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 |
| agents | variables relating to agents |
| algo_name | name to use in Sensor for differentiation |
|
virtual |
Increment sensor values.
Reimplemented from gams::algorithms::area_coverage::BaseAreaCoverage.
|
protectedinherited |
Check if finished based on time.
|
virtualinherited |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
protectedvirtual |
generate new next position
Implements gams::algorithms::area_coverage::BaseAreaCoverage.
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
inherited |
Gets the knowledge base.
|
inherited |
Get next position.
|
inherited |
Gets the platform.
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
|
protectedvirtual |
A better way to manage this would probably be to take a function pointer to handle utility calculation.
get utility of moving from one index position to another
Reimplemented in gams::algorithms::area_coverage::PrioritizedMinTimeAreaCoverage.
| void gams::algorithms::area_coverage::MinTimeAreaCoverage::operator= | ( | const MinTimeAreaCoverage & | rhs | ) |
Assignment operator.
| rhs | values to copy |
|
virtualinherited |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
protectedvirtual |
review if last move was good, did we hit all cells we said we would
|
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.
|
protectedinherited |
enforcer for maximum time
Definition at line 149 of file BaseAreaCoverage.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protectedinherited |
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 |
time step of last position generation
Definition at line 144 of file MinTimeAreaCoverage.h.
|
protectedinherited |
for keeping track of the time set for maximum coverage time
Definition at line 146 of file BaseAreaCoverage.h.
|
protected |
time since last coverage
Definition at line 135 of file MinTimeAreaCoverage.h.
|
protectedinherited |
next position
Definition at line 140 of file BaseAreaCoverage.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protected |
positions we will be passing through and their previous values
Definition at line 141 of file MinTimeAreaCoverage.h.
|
protected |
Search Area to cover.
Definition at line 132 of file MinTimeAreaCoverage.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.
|
protected |
discretized positions in search area
Definition at line 138 of file MinTimeAreaCoverage.h.