GAMS  1.2.2
MinTimeAreaCoverage.h
Go to the documentation of this file.
1 
59 #ifndef _GAMS_ALGORITHMS_AREA_COVERAGE_MIN_TIME_AREA_COVERAGE_H_
60 #define _GAMS_ALGORITHMS_AREA_COVERAGE_MIN_TIME_AREA_COVERAGE_H_
61 
63 
64 #include <map>
65 #include <set>
66 #include <string>
67 
68 #include "madara/knowledge/KnowledgeUpdateSettings.h"
69 
70 #include "gams/pose/SearchArea.h"
73 
74 
75 namespace gams
76 {
77  namespace algorithms
78  {
79  namespace area_coverage
80  {
85  {
86  public:
99  const std::string& search_id, double e_time,
100  madara::knowledge::KnowledgeBase * knowledge = 0,
101  platforms::BasePlatform * platform = 0, variables::Sensors * sensors = 0,
102  variables::Self * self = 0, variables::Agents * agents = 0,
103  const std::string& algo_name = "mtac");
104 
109  void operator= (const MinTimeAreaCoverage & rhs);
110 
114  virtual int analyze (void);
115 
116  protected:
118  virtual void generate_new_position (void);
119 
124  virtual double get_utility (const utility::Position& start,
126  const utility::Position& end, std::set<utility::Position>& online);
127 
129  virtual void review_last_move ();
130 
133 
136 
138  std::set<utility::Position> valid_positions_;
139 
141  std::map<utility::Position, double> position_value_map_;
142 
144  unsigned int last_generation_;
145  }; // class MinTimeAreaCoverage
146 
151  : public AlgorithmFactory
152  {
153  public:
154 
169  virtual BaseAlgorithm * create (
170  const madara::knowledge::KnowledgeMap & args,
171  madara::knowledge::KnowledgeBase * knowledge,
172  platforms::BasePlatform * platform,
173  variables::Sensors * sensors,
174  variables::Self * self,
175  variables::Agents * agents);
176  };
177  } // namespace area_coverage
178  } // namespace algorithms
179 } // namespace gams
180 
181 #endif // _GAMS_ALGORITHMS_AREA_COVERAGE_MIN_TIME_AREA_COVERAGE_H_
Base class for algorithm factories that classes derived from.
A factory class for creating minimum time area coverage algorithms.
A container for sensor information.
Definition: Sensor.h:80
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
std::map< utility::Position, double > position_value_map_
positions we will be passing through and their previous values
pose::SearchArea search_area_
Search Area to cover.
A utility class for search areas.
Definition: SearchArea.h:71
The base platform for all platforms to use.
Definition: BasePlatform.h:190
std::vector< Agent > Agents
An array of agent knowledge.
Definition: Agent.h:246
Base class for all area coverages.
unsigned int last_generation_
time step of last position generation
Contains all GAMS-related tools, classes and code.
A container for self referencing information.
Definition: Self.h:69
#define GAMS_EXPORT
Definition: GamsExport.h:20
Area coverage that minimizes the time taken for covering an area.
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:94
Copyright (c) 2014 Carnegie Mellon University.
A position in an x, y, z coordinate system.
Definition: Position.h:77
Copyright (c) 2014 Carnegie Mellon University.
variables::Sensor min_time_
time since last coverage
Copyright (c) 2014 Carnegie Mellon University.
std::set< utility::Position > valid_positions_
discretized positions in search area