GAMS  1.2.2
Swarm.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_VARIABLES_SWARM_H_
55 #define _GAMS_VARIABLES_SWARM_H_
56 
57 #include <string>
58 
59 #include "gams/GamsExport.h"
60 #include "madara/knowledge/containers/Integer.h"
61 #include "madara/knowledge/containers/String.h"
62 #include "madara/knowledge/containers/Double.h"
63 #include "madara/knowledge/containers/Vector.h"
64 #include "madara/knowledge/containers/Map.h"
65 #include "madara/knowledge/KnowledgeBase.h"
66 #include "AccentStatus.h"
67 
68 namespace gams
69 {
70  namespace variables
71  {
76  {
77  public:
81  Swarm ();
82 
86  ~Swarm ();
87 
92  void operator= (const Swarm & agent);
93 
99  void init_vars (madara::knowledge::KnowledgeBase & knowledge,
100  const madara::knowledge::KnowledgeRecord::Integer& swarm_size = 1);
101 
107  void init_vars (madara::knowledge::Variables & knowledge,
108  const madara::knowledge::KnowledgeRecord::Integer& swarm_size = 1);
109 
111  madara::knowledge::containers::String algorithm;
112 
114  madara::knowledge::containers::Integer algorithm_id;
115 
117  madara::knowledge::containers::Map algorithm_args;
118 
120  madara::knowledge::containers::Double min_alt;
121 
123  madara::knowledge::containers::Integer size;
124 
127 
128  protected:
133  void init_vars (const madara::knowledge::KnowledgeRecord::Integer& swarm_size);
134  };
135 
142  GAMS_EXPORT void init_vars (Swarm & variables,
143  madara::knowledge::KnowledgeBase & knowledge,
144  const madara::knowledge::KnowledgeRecord::Integer& swarm_size = 1);
145 
152  GAMS_EXPORT void init_vars (Swarm & variables,
153  madara::knowledge::Variables & knowledge,
154  const madara::knowledge::KnowledgeRecord::Integer& swarm_size = 1);
155  }
156 }
157 
158 #endif // _GAMS_VARIABLES_SWARM_H_
A container for swarm information.
Definition: Swarm.h:75
AccentStatuses accents
container for accents
Definition: Swarm.h:126
Copyright (c) 2014 Carnegie Mellon University.
madara::knowledge::containers::Integer size
the number of agents participating in the swarm
Definition: Swarm.h:123
madara::knowledge::containers::Double min_alt
minimum altitude for swarm to use
Definition: Swarm.h:120
std::vector< AccentStatus > AccentStatuses
An array of accents.
Definition: AccentStatus.h:126
madara::knowledge::containers::Map algorithm_args
number of arguments for command
Definition: Swarm.h:117
GAMS_EXPORT void init_vars(AccentStatuses &variables, madara::knowledge::KnowledgeBase &knowledge, const std::string &prefix)
Initializes accent status containers.
Contains all GAMS-related tools, classes and code.
#define GAMS_EXPORT
Definition: GamsExport.h:20
madara::knowledge::containers::String algorithm
the current command given to the swarm
Definition: Swarm.h:111
madara::knowledge::containers::Integer algorithm_id
the current command given to the swarm
Definition: Swarm.h:114