54 #ifndef _GAMS_ALGORITHMS_BASE_ALGORITHM_H_
55 #define _GAMS_ALGORITHMS_BASE_ALGORITHM_H_
62 #include "madara/knowledge/KnowledgeBase.h"
110 madara::knowledge::KnowledgeBase * knowledge = 0,
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
The base class that algorithms in GAMS use.
variables::Agents * get_agents(void)
Gets the list of agents.
platforms::BasePlatform * platform_
provides access to the platform
variables::Agents * agents_
the list of agents potentially participating in the algorithm
madara::knowledge::KnowledgeBase * knowledge_
provides access to the knowledge base
virtual ~BaseAlgorithm()
Destructor.
virtual int execute(void)=0
Plans the next execution of the algorithm.
platforms::BasePlatform * get_platform(void)
Gets the platform.
variables::Self * get_self(void)
Gets self-defined variables.
variables::Sensors * sensors_
provides access to sensor information
variables::AlgorithmStatus * get_algorithm_status(void)
Gets algorithm status variables.
virtual int plan(void)=0
Plans the next execution of the algorithm.
virtual int analyze(void)=0
Analyzes environment, platform, or other information.
virtual void set_sensors(variables::Sensors *sensors)
Sets the map of sensor names to sensor information.
variables::Self * self_
the algorithm's concept of self
virtual void set_agents(variables::Agents *agents)
Sets the list of agents in the swarm.
variables::Sensors * get_sensors(void)
Gets the available sensor information.
unsigned int executions_
number of executions
variables::AlgorithmStatus status_
provides access to status information for this platform
BaseAlgorithm(madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0)
Constructor.
virtual void set_self(variables::Self *self)
Sets the map of sensor names to sensor information.
virtual void set_platform(platforms::BasePlatform *platform)
Sets the platform.
void operator=(const BaseAlgorithm &rhs)
Assignment operator.
madara::knowledge::KnowledgeBase * get_knowledge_base(void)
Gets the knowledge base.
The basic controller that can be used to perform actions on platforms and algorithms.
A controller that has the capability of managing multiple controllers.
A container for algorithm status information.
A container for self referencing information.
AlgorithmAnalyzeStatus
Possible algorithm statuses, as returnable by analyze()
std::vector< BaseAlgorithm * > Algorithms
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
std::vector< Agent > Agents
An array of agent knowledge.
Contains all GAMS-related tools, classes and code.
Copyright(c) 2014 Carnegie Mellon University.